Moving log file after configured Log Shipping

  • Hi experts,

    I have configured Log shipping on a database on production server. The database's data and log files are on same drive. If I want to move the log file to different drive (which is being created), will the log shipping break? plz advice me step by step.

  • Hi,

    Do you want to move it on the secondary, too? That'd be more problematic

    I'd say no, it won't break it. Log shipping is just a backup, copy, restore of the transaction logs on a schedule. None of that has any reliance over where the database files physically reside.

  • can u plz tell me how to move log file on secondary?

  • smtzac (9/19/2013)


    can u plz tell me how to move log file on secondary?

    I don't think it's possible. You have to reset the log shipping if you want to move the files. You can detach a database which is in standby mode but you cannot reattach it.

  • Hi,

    The easiest way to move logshipped database

    1)Stop logshipping

    use master

    alter database [xxx] set offline

    alter database [xx] modify file (name=xxx_log, FILENAME='some_path\xxx_log.ldf')

    2)Physically move log files to path 'some_path'

    3)alter database [xxx] set online

    6)Resume logshipping

    Cheers,

    Marcin

  • markoz.job (9/20/2013)


    use master

    alter database [xxx] set offline

    Is it necessary to make it offline can we make it single user and then then do the rest of steps ?

    -------Bhuvnesh----------
    I work only to learn Sql Server...though my company pays me for getting their stuff done;-)

  • Hi,

    No, single user mode will not work.

    Altering database in this way require setting int off and online.

    Cheers,

    Marcin

Viewing 7 posts - 1 through 6 (of 6 total)

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