moving files on log shipping secondary

  • been a while and dont have true test enviornment, but I need to detach the database on one of my seconday receiving log shipping server and move a few of the index files around due to space issue. Wanted to make sure but this action would not break the log shipping change in place would it?

  • As the DB is in no recovery or standby mode you wont be able to alter the file locations without dropping the database.

    The only way would be to drop the database, restore it to the new locations with norecovery, restore all the logs up to the latest log and then let it all just carry on.

    Don't need to make any changed to the log shipping plan, let the backups, and copy jobs run as normal, may want to disable the restore job until you have finished then re-enable it again.

  • Hi, if the secondary log shipping database is too large and take long time to restore and create log shipping again. maybe you can try:

    1. Set the secondary to recovery mode (because on stand by mode, you cant exec alter database command)

    2. Disable all log shipping job

    3. Alter your database to modify path: "alter database

    Yourlogshippingdb modify file (name = logicalname, filename = 'newpathofyoursecondarydblocation')

    4. Stop sql server service on your secondary log shipping server

    5. Move your physical file to new location

    6. Start sql server service

    7. Enable log shipping job

    8. Verify your log shipping db

    I've done this on my prod server and it works.

    Regards

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

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