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

  • 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:

  • 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
  • Hi Gail,

    I generated the scripts and executing the query already,

    I will follow your whole idea and let you know

  • 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:

  • 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
  • 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

  • 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... 🙁

  • 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

  • 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.

Viewing 9 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic. Login to reply