June 9, 2014 at 10:59 pm
Comments posted to this topic are about the item Display All Errors Fired in a Restore Procedure
June 10, 2014 at 1:26 am
I like the idea behind this article but I get an error when I try to setup the extended event...
"Msg 25706, Level 16, State 8, Line 1
The event attribute or predicate source, "ERROR", could not be found."
Did I miss something?
June 10, 2014 at 2:34 am
Hi Eric
Thanks very much for trying the solution.
The Extended Event session was written using SQL Server 2008R2.
If you are using SQL Server 2012 replace "ERROR =" with "ERROR_NUMBER ="
That should get you going
June 10, 2014 at 2:44 am
I was indeed using 2012 and your suggestion did the trick
Thanks for teaching me something very interesting 🙂
June 10, 2014 at 3:25 am
I'm glad it's working for you now 🙂
June 10, 2014 at 6:15 am
Good article and a great, practical use of extended events.
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
June 10, 2014 at 7:28 am
Thanks Jack
Much appreciated
June 10, 2014 at 10:50 am
I don't see where the event session code is run. Does it need to run all the time or is it created at the start of the stored procedure?
Thanks,
Duncan
June 10, 2014 at 12:24 pm
Hi Duncan
The extended event code is just run the once by itself on the instance that you are running the restore code.
The provided script will create an extended event session that will always be present and running even after a server restart.
The extended event will in effect lie dormant until the event specified in the code occurs which in this case is a restore error generated by the stored procedure account, the event then fires; writing the error details to the target.
In the conclusion, I have included a link to a series of articles which provides a detail introduction to extended events
June 12, 2014 at 7:37 am
Kudos to an awesome use of XE!
June 12, 2014 at 11:46 am
Thanks very much 🙂
June 12, 2014 at 2:22 pm
Thanks very much!
June 13, 2019 at 3:34 pm
Great way to capture the errors Brian.
Thank you for sharing.
Viewing 13 posts - 1 through 12 (of 12 total)
You must be logged in to reply to this topic. Login to reply