vbNewbie
vbNewbie

Reputation: 3345

msg102 level 15 error - sql server

I was trying to run a script to create a DB with all the tables and data on a server, which I created using script wizard in SSMS 2008. The destination server is 2005 and since I am unable to just restore a backup, I had to go through this long process which entailed running it through sqlcmd cause it was too large to open in SSMS. But after running for more than 5 hours, I checked on it and it had the following error:

msg 102 level 15 state 1, incorrect syntax near 'VA'

Now I tried finding the source of the error and looking in the script the only reference to 'VA' are in the data types nvarchar or varchar.

Please help, I really need to deploy this DB.

EDIT For those who have answered, thanks for the responses. I guess I will have to rerun the script but I would like to know if anyone has any ideas on running the script in SSMS. The script is over 2GB in size since it has to recreate the data and there is no other way to deploy this 2008 DB to a 2005 sql server edition.

Upvotes: 0

Views: 1451

Answers (3)

gbn
gbn

Reputation: 432551

Either: you have scripted a SQL Server 2008 only option which can be changed in SSMS (tools..options somewhere)

Or (assuming no other VA strings) the word VARCHAR has truncated to VA. I've had this happen with dynamic SQL: can be a real pain to track down

Upvotes: 1

Wyatt Barnett
Wyatt Barnett

Reputation: 15663

Really tricky to track these down, but you could either try to generate the script setting the compatibility level for SQL 2005 or use the SQL 2005 tools to generate the script.

Upvotes: 0

KM.
KM.

Reputation: 103677

in SSMS if you double click on the error message in the results pane, it will usually change focus and highlight that line of code. Now, how close that line of code is to the actual error depends on the actual problem, but you should be able to find the line of code it is complaining about.

Upvotes: 0

Related Questions