Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Generating script for backward compatibility
Message
From
09/11/2015 11:05:29
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
09/11/2015 08:48:45
General information
Forum:
Microsoft SQL Server
Category:
Other
Environment versions
SQL Server:
SQL Server 2012
Application:
Web
Miscellaneous
Thread ID:
01627248
Message ID:
01627264
Views:
36
>I have generated a script from SQL Server 2014 to be compatible for SQL Server 2008 R2. So, I selected the option to target at SQL Server 2008 R2. I still see errors such as:
>
>Msg 102, Level 15, State 6, Line 1
>Incorrect syntax near 'CONTAINMENT'.
>Msg 102, Level 15, State 6, Line 1
>Incorrect syntax near 'FILESTREAM'.
>Msg 102, Level 15, State 6, Line 1
>Incorrect syntax near 'TARGET_RECOVERY_TIME'.
>Msg 102, Level 15, State 1, Line 1
>Incorrect syntax near 'DISABLED'.
>
>Anyone could explain that?

I guess you weren't exactly using SQL server to generate the script, you were pulling metadata from it and using SSMS to generate it. I've found SSMS very flaky in this regard, almost every script it generated had to be tweaked manually for this or that, even when generating for the same version of SQL as the SSMS.

I'd recommend using Toad for SQL for this. Still not perfect, but much better - errors are rare, the checkboxes to flip most of the options are in a collapsible pane above the script, the script is in a full code pane and not in a card-sized editbox, and there's even a button to copy the whole script into an editor page. And you don't have to go through a series of right and left clicks to get to it, it's in the rightmost page when viewing a table (other pages are table properties, columns, browse, statistics etc).

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform