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

what is the best way to copy database from 2012 to 2008r2 Expand / Collapse
Author
Message
Posted Wednesday, September 4, 2013 12:31 PM
SSC-Enthusiastic

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

Group: General Forum Members
Last Login: Tuesday, February 11, 2014 10:12 AM
Points: 110, Visits: 501
Hi Everyone

I am asked to copy and move database from 2012 instance to 2008r2 instance; those are on separate VM(virtual machine)

i know backup and restore does not work in this case.

i am trying to do it by using Generate scripts option, i am not sure how long its going to be succeed.

I tried Export and import tool, but i failed, may be due to my inefficiency of operating the tool


May i know what is the best way to do this job??

Post #1491480
Posted Wednesday, September 4, 2013 12:46 PM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: General Forum Members
Last Login: Today @ 1:14 PM
Points: 39,977, Visits: 36,340
Script all objects (not the data, just the objects)
Create the new database
Use import/export, SSIS or bcp to move the data



Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass

Post #1491484
Posted Wednesday, September 4, 2013 12:47 PM
SSC-Enthusiastic

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

Group: General Forum Members
Last Login: Tuesday, February 11, 2014 10:12 AM
Points: 110, Visits: 501
Hi Gail,

I generated the scripts and executing the query already,

I will follow your whole idea and let you know
Post #1491485
Posted Wednesday, September 4, 2013 1:26 PM
SSC-Enthusiastic

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

Group: General Forum Members
Last Login: Tuesday, February 11, 2014 10:12 AM
Points: 110, Visits: 501
Hi Guys,

i have just finished with copying the DB from 2012 to 2008r2,
'
i chose a hard and lengthy method other than Gail recomended,

But i would say +1 for gail,

I generated the scripts along with schema and Data by changing it in the options.


I would prefer to follows gail's style instead wat i did from next time.....

Thanks,

Raj
Post #1491501
Posted Wednesday, September 4, 2013 1:27 PM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: General Forum Members
Last Login: Today @ 1:14 PM
Points: 39,977, Visits: 36,340
rajborntodare (9/4/2013)
I generated the scripts along with schema and Data by changing it in the options.


That works OK for tiny databases. Over a couple hundred MB, that generally crashes Management Studio.



Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass

Post #1491502
Posted Wednesday, September 4, 2013 1:29 PM
SSC-Enthusiastic

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

Group: General Forum Members
Last Login: Tuesday, February 11, 2014 10:12 AM
Points: 110, Visits: 501
That works OK for tiny databases. Over a couple hundred MB, that generally crashes Management Studio.


Ok thats a TIP....

I will remember that....

Thank u Gail
Post #1491505
Posted Thursday, September 5, 2013 5:58 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Monday, July 21, 2014 10:02 AM
Points: 12, Visits: 23
The hardest part for a non-trivial database is making sure the tables are built in the correct order to maintain RI. You can script out the table structures etc and build the new database, OK.
You can set the flag to allow index insertion, but if a record references a a table that is still empty...


Post #1491736
Posted Thursday, September 5, 2013 7:21 AM
SSC-Enthusiastic

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

Group: General Forum Members
Last Login: Tuesday, February 11, 2014 10:12 AM
Points: 110, Visits: 501
Hi Swwg


When i tried to migrate it by using Export import tool, i got the same prob,

I couldnt get the whole schema as it was in source, so i tried with generating scripts.

It did gave me exact schema to target as source
Post #1491778
Posted Thursday, September 5, 2013 8:17 AM
SSC Eights!

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

Group: General Forum Members
Last Login: Friday, September 26, 2014 6:02 AM
Points: 919, Visits: 1,434
swwg69 (9/5/2013)
The hardest part for a non-trivial database is making sure the tables are built in the correct order to maintain RI. You can script out the table structures etc and build the new database, OK.
You can set the flag to allow index insertion, but if a record references a a table that is still empty...




Actually when doing any kind of bulk load, you should drop the fk constraints, then load and finally add the constraints. You won't need to worry about parent/child relationships and the load will happen faster.




Post #1491812
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse