April 20, 2004 at 10:56 am
hi all,
Please help me out with the foll. scenario.
Firstly with sp_addmessage stored procedure I added a custom error message to the sysmessages table with a severity level of 10.
Secondly I created an alert with this custom message and error number. I used notification by net send as my prefered choice.
Thirdly, I used raiserror with the above mentioned error number eg) 55555.
However in this scenario the alert was not fired.
I changed the severity level of the transaction to 16 but the transaction was not commited.
I want that the transaction be commited and at the same time the alert should be fired.
Thanks
petrushka
April 22, 2004 at 1:21 am
I'm not sure, you might need
RAISERROR .. WITH LOG
Although this needs admin privs. (If attempted by a nonadmin, you get an error for that, which is logged anyway, but it will not be your custom error.)
I didnt get the bit about "not committed" either - why you dont put a Commit before RaiseError if you want to ? Or Rollback for that matter.
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply