Logship Add file.

  • Hi All,

    In logship, at primary server, someone had added a data file to the database. how to add the same file to the stand by server without hampering the overall logship process.

    Note: the database is in "inrecovery" mode.

    Thanks.

  • IIFC it should automatically appear when the logfile is restored on the secondary.

  • This can be achived by following command

    Restore log test

    from disk='I:\Test_logshipping\Test_20120228055827.trn'

    with move 'logical name of new file'to 'Physical location on DR where it will be placed',norecovery

  • Adding a data file is a logged operation. Just make sure that your target server has the same drive configurations if you want that to happen automatically.

    I learned this lesson a while back when I added a new data file on a drive letter that existed on the primary but not the target. Suddenly my log shipping started to fail.

  • But you'd have to make sure that you issue the 'with move' while you restore the log with the add file command.

  • lptech (10/4/2012)


    But you'd have to make sure that you issue the 'with move' while you restore the log with the add file command.

    You are correct. When you are aware that your LS servers have disparate paths you should

    • Stop all 3 LS jobs prior to adding the file
    • Add the new file to the primary
    • Take a differential backup on the primary
    • Restore the diff to secondary with move to place the new file(s) correctly.
    • Resume LS jobs

    -----------------------------------------------------------------------------------------------------------

    "Ya can't make an omelette without breaking just a few eggs" 😉

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

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