Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Restore database from SQL Server 2012 to SQL Server 2008 R2 Expand / Collapse
Author
Message
Posted Wednesday, January 09, 2013 3:10 PM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Monday, April 14, 2014 12:18 PM
Points: 36, Visits: 145
Hi,

I initially took backup from SQL Server 2012 (database compatibility mode was set to SQL Server 2008 (100)) but when I try to restore that backup on SQL Server 2008 R2 it is giving me error as "Specified cast is not valid".

I would appreciate if anyone can help me or if there is any alternate solution to backup from SQL Server 2012 and successfully restore it on SQL Server 2008 R2, please let me know.

Thank you.

Post #1405038
Posted Wednesday, January 09, 2013 3:17 PM


SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Yesterday @ 5:44 PM
Points: 893, Visits: 6,894
As far as I know, there is no way to do a backward restore, even if the database was in a compatibility mode that matched the lower version. The compatibility mode impacts how certain sql constructs behave on a database but it doesn't mean that the database is actually internally structured as a database on that native version would be. A 2012 database, no matter what the compatibility mode, is still a 2012 database internally, so a 2008 server wouldn't understand that internal structure or be able to restore it.

Best advice is to script out all the objects, create them on the older database, then copy the data.




And then again, I might be wrong ...
David Webb
Post #1405041
Posted Wednesday, January 09, 2013 4:13 PM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Wednesday, April 16, 2014 9:25 AM
Points: 7,070, Visits: 12,523
David Webb-200187 (1/9/2013)
As far as I know, there is no way to do a backward restore, even if the database was in a compatibility mode that matched the lower version. The compatibility mode impacts how certain sql constructs behave on a database but it doesn't mean that the database is actually internally structured as a database on that native version would be. A 2012 database, no matter what the compatibility mode, is still a 2012 database internally, so a 2008 server wouldn't understand that internal structure or be able to restore it.

Best advice is to script out all the objects, create them on the older database, then copy the data.

+1


__________________________________________________________________________________________________
There are no special teachers of virtue, because virtue is taught by the whole community. --Plato

Believe you can and you're halfway there. --Theodore Roosevelt

Everything Should Be Made as Simple as Possible, But Not Simpler --Albert Einstein

The significant problems we face cannot be solved at the same level of thinking we were at when we created them. --Albert Einstein

1 apple is not exactly 1/8 of 8 apples. Because there are no absolutely identical apples. --Giordy
Post #1405067
Posted Thursday, January 10, 2013 2:06 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Wednesday, August 28, 2013 2:37 AM
Points: 5,075, Visits: 4,834
David Webb-200187 (1/9/2013)
As far as I know, there is no way to do a backward restore, even if the database was in a compatibility mode that matched the lower version. The compatibility mode impacts how certain sql constructs behave on a database but it doesn't mean that the database is actually internally structured as a database on that native version would be. A 2012 database, no matter what the compatibility mode, is still a 2012 database internally, so a 2008 server wouldn't understand that internal structure or be able to restore it.

Best advice is to script out all the objects, create them on the older database, then copy the data.


+1, couldnt of said it better myself.




Want an answer fast? Try here
How to post data/code for the best help - Jeff Moden
Need a string splitter, try this - Jeff Moden
How to post performance problems - Gail Shaw
CrossTabs-Part1 & Part2 - Jeff Moden
SQL Server Backup, Integrity Check, and Index and Statistics Maintenance - Ola Hallengren
Managing Transaction Logs - Gail Shaw
Troubleshooting SQL Server: A Guide for the Accidental DBA - Jonathan Kehayias and Ted Krueger

Post #1405275
Posted Thursday, January 10, 2013 5:59 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Thursday, September 26, 2013 6:05 AM
Points: 117, Visits: 77
+1

Scripts (create table and etc) out with comptiable to SQL 2008.
Post #1405368
Posted Thursday, January 10, 2013 7:55 AM


SSC-Insane

SSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-Insane

Group: General Forum Members
Last Login: Today @ 8:21 PM
Points: 22,506, Visits: 30,219
David Webb-200187 (1/9/2013)
As far as I know, there is no way to do a backward restore, even if the database was in a compatibility mode that matched the lower version. The compatibility mode impacts how certain sql constructs behave on a database but it doesn't mean that the database is actually internally structured as a database on that native version would be. A 2012 database, no matter what the compatibility mode, is still a 2012 database internally, so a 2008 server wouldn't understand that internal structure or be able to restore it.

Best advice is to script out all the objects, create them on the older database, then copy the data.


Have to agree 100%.



Lynn Pettis

For better assistance in answering your questions, click here
For tips to get better help with Performance Problems, click here
For Running Totals and its variations, click here or when working with partitioned tables
For more about Tally Tables, click here
For more about Cross Tabs and Pivots, click here and here
Managing Transaction Logs

SQL Musings from the Desert Fountain Valley SQL (My Mirror Blog)
Post #1405473
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse