When you execute a SQL Script by using Web Deploy, you may receive an error message similar to the following:
An error occurred during execution of the database script. The approximate location of the error was between lines 'x’ and 'y' of the script.
The exact text of the error message will vary depending on the failure. Following are some examples:
Example A
Error: An error occurred during execution of the database script. The approximate location of the error was between lines '3' and '8' of the script. The verbose log may have more information about the error.
The command started with:
/****** Object: Database [AdventureWorks]
http://go.microsoft.com/fwlink/?LinkId=178587
Error: DROP DATABASE statement cannot be used inside a user transaction.
Error count: 1.
Example B
Error: An error occurred during execution of the database script. The approximate location of the error was between lines '1' and '3' of the script. The verbose log may have more information about the error.
The command started with:
USE [master] InvalidScript
http://go.microsoft.com/fwlink/?LinkId=178587
Error: Incorrect syntax near 'InvalidScript'.
Error count: 1.