Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Cannot attach a database from one version to another
Message
From
21/11/2014 14:25:51
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
 
 
To
20/11/2014 11:35:44
General information
Forum:
Microsoft SQL Server
Category:
Other
Environment versions
SQL Server:
SQL Server 2012
Application:
Web
Miscellaneous
Thread ID:
01611241
Message ID:
01611304
Views:
54
>>I think you'll have to script the database and data in SQL2012 and then run those scripts on SQL2008 dealing with any incompatibilities. (if any)
>
>Yes, I have script procedure. But, that database is too big. That is why I had to dump the table into a temporary database, zip, download, upload, unzip, attach.

Do it in smaller chunks. Have scripts for each table which would insert perhaps one megabyte at a time. Use the ability of 2012 to insert multiple records at a time (something MySql had eight years ago) so you don't have to repeat the field names, as 2008 will accept that. Just tried this and it worked in 2008:
insert into tableX (
   cField, intField) VALUES ('blabla',0), ('blabla2', 2)
SQL is simply NOT forwards compatible, it won't even restore a backup from a later version, and I don't know of an utility which would allow you to export a database in a compatible format, other than building a script. Which is exactly the reason I have both 2008 and 2012 running on my box, and I did have to write a generator of insert scripts (doesn't utilize this multiple record insert, as I'm doing it for almost blank databases so I don't need it).

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