views:

16

answers:

3

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.

A: 

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.

KM
I ran the script in sqlcmd in dos window
vbNewbie
A: 

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.

Wyatt Barnett
thanks.. i did set the compatibility level and I guess will just rerun the script.
vbNewbie
+1  A: 

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

gbn
thanks for the response. I guess I will have to rerun the script.
vbNewbie