September 12, 2015 at 12:56 am
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!
September 12, 2015 at 2:09 am
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.
😎
September 12, 2015 at 3:19 am
Would Log Shipping help? (although I think that might be deprecated in SQL2014 ?)
September 14, 2015 at 5:24 am
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!
September 14, 2015 at 5:35 am
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
September 14, 2015 at 5:56 am
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