February 25, 2005 at 12:14 pm
I am trying to run a backup log statement in a proc and it returns an error as
Server: Msg 3021, Level 16, State 1, Line 1
Cannot perform a backup or restore operation within a transaction.
Server: Msg 3013, Level 16, State 1, Line 1
BACKUP LOG is terminating abnormally.
What i am trying is to run this proc from osql and return a success/failure to check job status. ANyone has a better way of doing this?
TIA
February 27, 2005 at 5:39 pm
You can run a log backup in a stored proc, but you can't do it inside a transaction. Look in you proc for the words "Begin Transaction" and "Commit Transaction". Make sure that the transaction is only used for updating data, not the backup.
Aunt Kathi Data Platform MVP
Author of Expert T-SQL Window Functions
Simple-Talk Editor
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply