Moving SQL Server DB's

  • Like2SQL

    SSCommitted

    Points: 1662

    We have a SQL Server located in India; We need to move all the DB's on that server to a server residing locally for various legal reasons. The Server in India is a 2008 running 24 databases. 3 of these DB's are over 100GB and all 3 of them are being replicated from a third server in India. I am looking for high-level steps I will need to perform this so as to make sure I don't miss anything. Please advise, especially on problems I can expect to run into.

    thanks!

  • Gail Shaw

    SSC Guru

    Points: 1004474

    Back up databases

    Script logins (with SIDs and passwords)

    Script any linked servers

    Script any jobs

    Copy backups, restore on new server, run the scripts you created.

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

    SSCommitted

    Points: 1662

    Thanks for the response Gila. Any comments or experience on moving the files of VLDB's over the net? I am particularly concerned about the time it might take to copy the files over.

  • AppSup_dba

    SSCrazy

    Points: 2215

    Use robocopy for transferring the backup files... Cant really comments on time taken to transfer... depends on your network speed

    If you can use a compressed backup , even better...

    Try breaking backup into multiple files instead of one big file..

    Cheers

  • Perry Whittle

    SSC Guru

    Points: 233859

    Like2SQL (7/31/2014)


    We have a SQL Server located in India; We need to move all the DB's on that server to a server residing locally for various legal reasons. The Server in India is a 2008 running 24 databases. 3 of these DB's are over 100GB and all 3 of them are being replicated from a third server in India. I am looking for high-level steps I will need to perform this so as to make sure I don't miss anything. Please advise, especially on problems I can expect to run into.

    thanks!

    What network connection facilities do you have between sites if any?

    -----------------------------------------------------------------------------------------------------------

    "Ya can't make an omelette without breaking just a few eggs" 😉

  • dbrown 5874

    SSC Rookie

    Points: 40

    Excellent. I was about to ask the same basic question.

    Do I need to copy the system databases to the new location?:ermm:

  • Gail Shaw

    SSC Guru

    Points: 1004474

    Like2SQL (7/31/2014)


    Any comments or experience on moving the files of VLDB's over the net?

    Be patient, take a good book.

    Or copy the files to an external drive and courier/drive it to the new location.

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

    SSC-Dedicated

    Points: 32407

    Or copy the files to an external drive and courier/drive it to the new location.

    😀

    It genuinely can be quicker to get on a plane with a hard drive yourself.

  • sqldriver

    SSChampion

    Points: 10440

    Beatrix Kiddo (8/1/2014)


    Or copy the files to an external drive and courier/drive it to the new location.

    😀

    It genuinely can be quicker to get on a plane with a hard drive yourself.

    I'm about to copy 25 terabytes worth of databases from DAS to SAN.

    Gonna be a lot of pencils in the ceiling.

    A lot of pencils.

    :hehe:

  • umarrizwan

    Old Hand

    Points: 344

    you mentioned that 3 of databases are part of replication. then there may be a publisher and distributer.

    when you move these databases then you need to generate new publications and then subscribe to these database.

    restore MSDB backup ,all jobs will be restored.

  • DNA_DBA

    SSCertifiable

    Points: 7833

    Do a test transfer of a large file in advance to gauge how long the 100gb databases will take to transfer across the network.

    If the speed is slow or you can't have much of an outage, you could transfer a full backup across to the new server a few days in advance and then transfer daily differentials and finally transaction logs backups to break up the process into smaller files.

  • Like2SQL

    SSCommitted

    Points: 1662

    Thanks for the responses guys. So far we have moved 8 of the smaller databases via simple backup and restore with no issues. However needed further guidance on the 3 VLDB's which are publishers in a replicated setup. Any advice on duplicating the replication will be appreciated. Best way to do this, gotchas etc. All 3 are publishers, 1 of them is using snapshot replication and the other 2 are using merge.

    Thanks!

  • sql-lover

    SSCoach

    Points: 18530

    Like2SQL (7/31/2014)


    We have a SQL Server located in India; We need to move all the DB's on that server to a server residing locally for various legal reasons. The Server in India is a 2008 running 24 databases. 3 of these DB's are over 100GB and all 3 of them are being replicated from a third server in India. I am looking for high-level steps I will need to perform this so as to make sure I don't miss anything. Please advise, especially on problems I can expect to run into.

    thanks!

    I did something similar when I was working for HP few years ago. I moved the backup file(s) over the network using robocopy from a server in China to one in USA. If I recall well, robocopy has a retry flag or command so it also helps during the process.

    The whole process took almost a week though and I split the backup on several files. Using a single backup file won't work over a WAN.

    Also, the speed and reliability of the WAN link is key. Otherwise, it may be better using old fashion methods like sending a backup tape via FedEx or similar services.

  • WorkasDBA

    SSCommitted

    Points: 1684

    Assuming its not a complicated database with any kind of encryption

    1. Back up the database. Use native or third party compression tool

    2. Transmit and apply the back up , any related login scripts, linked server, jobs et al.

    3. Test the restored back up functionality et al

    4. Daily or hourly restore of differential back up . (Log shipping can be set up also if you can make changes to ur server).

    5. On the day of cut over,

    a. Stop the Prod server.

    b. Make sure there is no untransmitted records on the publisher to distributor/ distributor to subscriber

    c. Stop all the replication jobs - Publisher/Distributor/Subscriber

    e. Transmit and apply the final compressed backup on the ToBe server. Apply any changed logins/ et al.

    f. Restore MSDB for all jobs

    g. DNS changes.

    h. Start all the replication jobs

    The pain will be if replication errors out, the snaphot will take longer for the 100GB.

Viewing 14 posts - 1 through 14 (of 14 total)

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