SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


what is the best way to copy database from 2012 to 2008r2


what is the best way to copy database from 2012 to 2008r2

Author
Message
rajborntodare
rajborntodare
SSC Eights!
SSC Eights! (881 reputation)SSC Eights! (881 reputation)SSC Eights! (881 reputation)SSC Eights! (881 reputation)SSC Eights! (881 reputation)SSC Eights! (881 reputation)SSC Eights! (881 reputation)SSC Eights! (881 reputation)

Group: General Forum Members
Points: 881 Visits: 510
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??

Hehe
GilaMonster
GilaMonster
SSC Guru
SSC Guru (223K reputation)SSC Guru (223K reputation)SSC Guru (223K reputation)SSC Guru (223K reputation)SSC Guru (223K reputation)SSC Guru (223K reputation)SSC Guru (223K reputation)SSC Guru (223K reputation)

Group: General Forum Members
Points: 223205 Visits: 46294
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, MVP, M.Sc (Comp Sci)
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


rajborntodare
rajborntodare
SSC Eights!
SSC Eights! (881 reputation)SSC Eights! (881 reputation)SSC Eights! (881 reputation)SSC Eights! (881 reputation)SSC Eights! (881 reputation)SSC Eights! (881 reputation)SSC Eights! (881 reputation)SSC Eights! (881 reputation)

Group: General Forum Members
Points: 881 Visits: 510
Hi Gail,

I generated the scripts and executing the query already,

I will follow your whole idea and let you know
rajborntodare
rajborntodare
SSC Eights!
SSC Eights! (881 reputation)SSC Eights! (881 reputation)SSC Eights! (881 reputation)SSC Eights! (881 reputation)SSC Eights! (881 reputation)SSC Eights! (881 reputation)SSC Eights! (881 reputation)SSC Eights! (881 reputation)

Group: General Forum Members
Points: 881 Visits: 510
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
Hehe
GilaMonster
GilaMonster
SSC Guru
SSC Guru (223K reputation)SSC Guru (223K reputation)SSC Guru (223K reputation)SSC Guru (223K reputation)SSC Guru (223K reputation)SSC Guru (223K reputation)SSC Guru (223K reputation)SSC Guru (223K reputation)

Group: General Forum Members
Points: 223205 Visits: 46294
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, MVP, M.Sc (Comp Sci)
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


rajborntodare
rajborntodare
SSC Eights!
SSC Eights! (881 reputation)SSC Eights! (881 reputation)SSC Eights! (881 reputation)SSC Eights! (881 reputation)SSC Eights! (881 reputation)SSC Eights! (881 reputation)SSC Eights! (881 reputation)SSC Eights! (881 reputation)

Group: General Forum Members
Points: 881 Visits: 510
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
swwg69
swwg69
SSC Journeyman
SSC Journeyman (87 reputation)SSC Journeyman (87 reputation)SSC Journeyman (87 reputation)SSC Journeyman (87 reputation)SSC Journeyman (87 reputation)SSC Journeyman (87 reputation)SSC Journeyman (87 reputation)SSC Journeyman (87 reputation)

Group: General Forum Members
Points: 87 Visits: 37
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... Sad
rajborntodare
rajborntodare
SSC Eights!
SSC Eights! (881 reputation)SSC Eights! (881 reputation)SSC Eights! (881 reputation)SSC Eights! (881 reputation)SSC Eights! (881 reputation)SSC Eights! (881 reputation)SSC Eights! (881 reputation)SSC Eights! (881 reputation)

Group: General Forum Members
Points: 881 Visits: 510
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
Steve-3_5_7_9
Steve-3_5_7_9
SSCrazy
SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)

Group: General Forum Members
Points: 2914 Visits: 1609
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... Sad




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.



Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search