I am using SQL Data Compare to generate a script that updates data in a QA database (SQL Server 2012).
The script is around 500mb and I added a GO
every 100 lines.
When I start the script with:
sqlcmd -E -S [server] -d [db] -i "[path to file]"
the connection is made but it is stuck on the first sql query made by sqlcmd and not the script with the error message:
SET TEXTSIZE 4096
I tried to let it run one afternoon just to see if I get an error or a timeout etc but I get nothing it just get stuck on it. All I can do is stop sqlcmd (CTRL+C in the console).
I tried with Management Studio 2008 and 2012.
Does anyone have an idea why I get this error?
Update : I tried running it with the -o but nothing was written to the file even after 3 hours. These are the first lines of the generated script :
SET NUMERIC_ROUNDABORT OFF
GO
SET ANSI_PADDING, ANSI_WARNINGS, CONCAT_NULL_YIELDS_NULL, ARITHABORT, QUOTED_IDENTIFIER, ANSI_NULLS, NOCOUNT ON
GO
SET DATEFORMAT YMD
GO
SET XACT_ABORT ON
GO
SET TRANSACTION ISOLATION LEVEL SERIALIZABLE
GO
BEGIN TRANSACTION
-- Pointer used for text / image updates. This might not be needed, but is declared here just in case
DECLARE @pv binary(16)
[delete update or insert...]
TEXTSIZE
should be set by the driver when connecting. As @srutzky mentioned it would be helpful to see the first few lines of your script. Also make sure you're in SQLCMD mode in SSMS. I don't think that would cause this error, but it is good to double check. – Erik Oct 22 '15 at 16:37-o
-> output file and see exactly where your script gets stuck. There might be blocking going on. – Kin Shah Oct 22 '15 at 16:40GO
statements were placed every 100 lines. The point being, maybe best to not get hung up on "SET TEXTSIZE" and instead focus on "why aren't statements being processed". – Solomon Rutzky Oct 22 '15 at 16:44