Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Cannot attach a database from one version to another
Message
De
21/11/2014 14:25:51
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
20/11/2014 11:35:44
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Versions des environnements
SQL Server:
SQL Server 2012
Application:
Web
Divers
Thread ID:
01611241
Message ID:
01611304
Vues:
52
>>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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform