June 16, 2010 at 8:34 am
I have the following Job scheduled to run every hour on the hour for our production database:
DECLARE @weekday varchar(20)
SELECT @weekday = 'DBTr_' + DATENAME(weekday,getdate())
BACKUP TRANSACTION DB TO @weekday WITH NOINIT
This job was set up prior to my arrival and after searching BOL and search engines have been unable to locate any indication that this syntax exists. I'm not sure what it is intended to do. I thought that in Full Backup mode (or any backup method) transactions are automatically logged to the LDF.
I've seen 'BACKUP LOG' but can't find reference to this anywhere. No error messages when it runs either.
Is 'BACKUP TRANSACTION' valid? If so what is it's purpose? If there is any online documentation on this I'd love to read it too.
Thank you!
Even as a mother protects with her life
Her child, her only child,
So with a boundless heart
Should one cherish all living beings;
June 16, 2010 at 3:11 pm
I know for sure of SAVE TRANSACTION, but I've never heard of BACKUP TRANSACTION.
-- Gianluca Sartori
June 16, 2010 at 3:44 pm
A backup transaction command does the same as a backup log. Its not the accepted command though and I expect it will be deprecated at some point (if not already). It came over from sybase. I still use it sometimes because I have a sybase background and occasionally have a brain freeze and cannot remember is it backup log or backup transaction?
So that command is backing up your transaction log once an hour. you would be wise to check the files are being produced and if you have not already do a trial restore.
for future proofing change it to backup log.
I could not find a reference to it either but am sure I have used it (accidentaly).
---------------------------------------------------------------------
June 16, 2010 at 5:09 pm
I will change it to backup log this week. We're upgrading to 2008 on Saturday and that may break it.
Thanks for the feedback!
Even as a mother protects with her life
Her child, her only child,
So with a boundless heart
Should one cherish all living beings;
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply