Log Shipping Role Reversal

  • changing Logshipping roles seems easy from BOL...but I experience lots of hurdles in each step....

    I am not able to execute:

    EXEC sp_change_secondary_role

        @db_name = 'test',

        @do_load = 1,

        @force_load = 1,

        @final_state = 1,

        @access_level = 1,

        @terminate = 1,

        @stopat = NULL

    GO

     

    when I executed this SP, I got an error:

    Server: Msg 22029, Level 16, State 1, Line 0

    sqlmaint.exe failed.

    [Microsoft SQL-DMO (ODBC SQLState: 42000)] Error 3101: [Microsoft][ODBC SQL Server Driver][SQL Server]Exclusive access could not be obtained because the database is in use.                                                                                  

    Have anyone successfully changed roles in Logshipping ?

    Thanks.

  • Per following

    http://support.microsoft.com/default.aspx?scid=kb;en-us;294397&Product=sql2k

    I can resolve the issue above by

    1)

    Ensure that there are no outstanding transaction logs before you execute the sp_change_secondary_role stored procedure. Manually running the RESTORE job on the secondary server before you run sp_change_secondary_role ensures that there are no outstanding transaction logs.

    2)

    You could pass the value of zero to the @terminate parameter (@terminate = 0) while you execute the sp_change_secondary_role stored procedure. However, the user must verify that there are no users connected to the database before the stored procedure is executed to ensure that the RESTORE LOG works successfully.

     

    I would like to choose option 1. However I am not sure how can find out which transactions logs are missing? and how to apply them?

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

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