LogShipping DB migration to New Sql server

pdsqsql 391 Reputation points
2022-11-17T17:58:56.45+00:00

Hello,
I am thinking to migrate our current Logshipping databases (Primary and Secondary) to newer sql server 2019 or 2022.
Due to license cost issue, we are using Sql Express and would like to use Express so we can't use Always ON or other edition.
As We have Express edition configured for our Logshipping so we don't have any Sql Agent and we use Windows Task Scheduler.
Any idea, what's the best way to migrate everything from current Logshipping servers to new servers.

I am checking because of Logshipping on Express with Task Scheduler otherwise normally I do regulars database migration.

Thank you!

SQL Server Migration Assistant
SQL Server Migration Assistant
A Microsoft tool designed to automate database migration to SQL Server from Access, DB2, MySQL, Oracle, and SAP ASE.
488 questions
{count} votes

5 answers

Sort by: Most helpful
  1. Seeya Xi-MSFT 16,436 Reputation points
    2022-11-18T02:26:13.163+00:00

    Hi @pdsqsql ,

    Welcome to Microsoft Q&A!
    Please refer to this: https://learn.microsoft.com/en-us/sql/database-engine/log-shipping/upgrading-log-shipping-to-sql-server-2016-transact-sql?view=sql-server-ver16#UpgradeSecondaries
    The upgrade process involves upgrading the secondary server instances of SQL Server before upgrading the primary server instance. Always upgrade the secondary SQL Server instances first. Log shipping continues throughout the upgrade process because the upgraded secondary server instances continue to restore the log backups from primary server instance. If the primary server instance is upgraded before the secondary server instance, log shipping will fail because a backup created on a newer version of SQL Server cannot be restored on an older version of SQL Server. You can upgrade the secondary instances simultaneously or serially, but all secondary instance must be upgraded before the primary instance is upgraded to avoid a log shipping failure.
    Hope this would give you some help.

    Best regards,
    Seeya


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


  2. pdsqsql 391 Reputation points
    2023-01-18T21:25:50.95+00:00

    Thank You!

    0 comments No comments

  3. pdsqsql 391 Reputation points
    2023-01-27T17:52:31.0533333+00:00

    Thanks Seeya.

    My confusion is that Both the new server I have installed Sql 2022 Express edition and Task scheduler job has been set up but when I am ready to migrate Database with objects and data on both the New servers (Primary and Secondary) from my existing Primary and Secondary servers.

    For this I can use Microsoft Data Migration Assistant?

    1. I can migrate first Existing Primary server DB to New Primary Server?
    2. Then I can migrate Existing Second server DB to New Secondary Server?
    3. Then Enable the Log shipping job?

    Thanks for your help!

    0 comments No comments

  4. Erland Sommarskog 100.8K Reputation points MVP
    2023-02-05T21:07:50.4566667+00:00

    Wouldn't the easiest be to upgrade just the primary database and then set up log shipping a new?

    For migrating the database I would use BACKUP/RESTORE.


  5. pdsqsql 391 Reputation points
    2023-02-08T22:55:09.9233333+00:00

    Hello,

    I am getting my Logshipping job failed due to following error:

    The backup set holds a backup of a database other than the existing DB

    I have installed Sql server 2022 Express edition into both my Primary and Secondary server.

    I have restored backup from my existing Primary server 2014 sql server and restore into Sql Server 2022 Primary server.

    I have created new empty database into my secondary server with same name as my Primary server.

    So now, I have restored version of 2014 into Sql server 2022 with data in New Primary server and New Secondary server 2022 with empty database.

    I started my Log shipping job and I am getting error:

    The backup set holds a backup of a database other than the existing

    Any idea?

    Thanks for your help!