Transactional log file restore job

  • Dear All,

    I have a database which gets refreshed on the daily by restoring 1 transactional file log, at the moment it is done manually but I'm trying to create an automation job which would get the transactional life file and restoring it, is it at all possible to achieve please?

    Thank you in advance!

  • tt-615680 (9/12/2015)


    Dear All,

    I have a database which gets refreshed on the daily by restoring 1 transactional file log, at the moment it is done manually but I'm trying to create an automation job which would get the transactional life file and restoring it, is it at all possible to achieve please?

    Thank you in advance!

    Quick suggestion, during the manual restore click the "generate script" button in the restore database dialog, it will produce a script which you can use as a template for automating the job.

    😎

  • Would Log Shipping help? (although I think that might be deprecated in SQL2014 ?)

  • thank you for your reply!

    I have the following script, but it only does a restore of the transaction log; the script doesn't have the flexibility to pick the latest file:

    RESTORE LOG [database name]

    FROM DISK = N'\\SHARED FILE\TLOGFILENAME.trn'

    WITH FILE = 1,

    STANDBY = N'e:\SQL Server\MSSQL12.MSSQLSERVER\MSSQL\Backup\ROLLBACK_UNDO_DATABASENAME.BAK',

    NOUNLOAD, STATS = 10

    GO

    Thank you!

  • Kristen-173977 (9/12/2015)


    Would Log Shipping help? (although I think that might be deprecated in SQL2014 ?)

    It would, and it is not deprecated.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • Thanks Gail, must have misread something, somewhere, to have got that into my head!

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

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