Migrate MSSQL user databases.

2024-06-19T11:18:38.2+00:00

Hi,

I am about to migrate 1,000 databases from several older SQL installations (2008-2019) to a new SQL Server 2022 environment.

Is it recommended by Microsoft to migrate databases by using either backup and restore (log shipping for larger databases) OR detach --> copy files --> attach database?

Please recommend best practices for a production environment migration, and why if possible.

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
13,104 questions
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. Olaf Helper 42,561 Reputation points
    2024-06-19T17:22:07.47+00:00

    The safest way way is to backup & restore; never use detach/attach, worst case is the database files get damaged in some way.

    For the rest of your post: You provided to less information to give a meanfull answer.

    0 comments No comments

  2. Erland Sommarskog 103.8K Reputation points MVP
    2024-06-19T21:32:20.84+00:00

    I concur with Olaf: Use BACKUP/RESTORE. And log ship for larger databases where you cannot accept a longer downtime.

    As for best practices, are all these databases of the same schema? That is, do you have a multi-tenant solution with one database per customer? Or are these 1000 databases all part of different applications?

    Good practice is to conduct some level of testing before you migrate, and if this is a multi-tenant solution, I guess you only need to test one or two. If they are 1000 different applications, there is a ton of work for you and your organisation...

    0 comments No comments

  3. ZoeHui-MSFT 34,581 Reputation points
    2024-06-20T02:03:13.8633333+00:00

    Hi @Morten Brennebjerg Civitarese Olsen,

    Use back up files and then restore maybe the easiest way.

    Please try in your test environment first and then apply to your production environment.

    You may also use SSIS to transfer the databases.

    Regards,

    Zoe Hui


    If the answer is helpful, please click "Accept Answer" and upvote it.

    0 comments No comments