Logshipping

  • Dear All,

    How I can change the recovery status of the secondary database from Norecovery to Standby mode or from Standby to Norecovery mode in Logshipping in SQLServer2005?

    Please advise.

    Thanks in advance.

    Ravichandra.

  • when you restore the last log from primary to secondary, you have to provide the option as 'with standby'.

    It will make your secondary server database in standby mode and will accept any more logs to be restored.

    When you want to switch your secondary as primary, just restore the last log as 'with recovery'

    ----------
    Ashish

  • Thanks Ashish.

    Actually my query is how to change the recovery status from standby mode to norecovery mode.

    I have configured logshipping in SQLServer2005 with sencondary database in Standby mode.

    Now,I want to change it to Norecovery mode.

    Regards.

    Ravichandra.

  • what do you mean by norecovery, your database already in norecovery mode as its in standby mode.

    be familiar with the term of recovery and norecovery on below link

    http://msdn.microsoft.com/en-us/library/ms177446.aspx

    ----------
    Ashish

  • I have restored the secondary database with norecovery mode.

    Now,I want to change it to standby mode for reporting purpose( read-only mode ) i.e, to run select queries.

    Thanks and Regards,

    Ravichandra.

  • When you restoring the last log,

    replace occurrence of "WITH NORECOVERY" with "WITH STANDBY = [some _filename]".

    [some_filename] = you can mention as 'c:\undo.txt' or whatever....

    ----------
    Ashish

  • Thanks very much.

    One more doubt !!

    Is it same method have to use when changing from standby mode to norecovery? please

    Thanks and Regards,

    Ravichandra.

  • your database is already in standby mode which means as well in norecovery mode.

    So let it be in standby mode because it will help you in 2 way :-

    1) will help users to read updated data(depends how frequently logs are getting restored)

    2) Allow you to restore logs.

    Or you have any specific requirement to change it back to norecovery mode?

    ----------
    Ashish

  • Thanks, you are correct, it will be useful;but Just I want to know how to change it back to norecovery mode.

    Thanks and Regards,

    Ravichandra.

  • yes, it will be same.

    whenever you want to change to norecovery, simply restore ...... with norecovery and then if you change your mind, simply restore log with standby... and so on...till you happy 😀 😀 😀

    ----------
    Ashish

  • Thanks a lot Ashish.

    Regards,

    Ravichandra.

Viewing 11 posts - 1 through 10 (of 10 total)

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