Cloud & SQLSailor

Cloud, Databases & Beyond!

SQLServer Log Shipping Work File ! What is this all about ?


A short and sweet post for a gorgeous morning –

Have you seen a file with extension .wrk in the log shipping copy folder ?

Logshipping work file

What is this all about, Curious? Then here is the answer –

When the transaction log backup files are copied from the primary server to the secondary server the file is named as a work file(.wrk) till the copy operation is completed.

This will ensure that the restore job in the secondary will not pick the file and try a restore.

Once the file is completely copied, then it will be named as .trn, the one which is very familiar to us.

Logshipping work file2

Normally when the log backups are very small you wont really observe the .wrk file. In a flash they are converted to a .trn file. When the log backups are relatively bigger, then you can see .wrk file available in the copy folder for a longer period of time.

Thanks for reading and keep watching this space for more.

5 responses to “SQLServer Log Shipping Work File ! What is this all about ?”

  1. Mike Smith Avatar
    Mike Smith

    Hi AnupWarrier,

    It’s very good blog about the.wrk file. I kept monitoring in my production environment such kind of files.
    Please advise the time suggestion to keep upto date the most recent file restore on secondary server.
    Such as I keep delay 5 minutes for copy job after the log backup job finish on production server.
    then again 5 minutes delay schedule for restore job.
    So everyone get a chance to perform without any interrupt.

    Thanks,
    Mike Smith

    1. AnupWarrier Avatar

      That sounds like the right strategy

  2. Ashish Singh Avatar
    Ashish Singh

    Hi Anup,
    Can u please tell me how many no.s of secondary servers we can add in logshipping with proof???

    1. AnupWarrier Avatar

      I don’t believe there is a limit or restrictions, but why you will ever want to have more than 2 to 3 secondaries?

  3. venkatesh Avatar
    venkatesh

    There is no limit for secondaries but Microsoft recommends 10 secondaries.

Leave a reply to Ashish Singh Cancel reply