Welcome to dbForumz.com!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Failing NSEvent Begin Batch procs

 
   Database Forums (Home) -> Notification Services RSS
Next:  Scheduling a job to run every 30 seconds...  
Author Message
Todd C

External


Since: Nov 16, 2005
Posts: 110



(Msg. 1) Posted: Thu Jun 21, 2007 11:43 am
Post subject: Failing NSEvent Begin Batch procs
Archived from groups: microsoft>public>sqlserver>notificationsvcs (more info?)

Hello All:

I have a somple NS app with an Event Class. I am submitting events as follows:

The source Db has a trigger that gets fired ON INSERT
The trigger call a Stored Procedure in the same Database.
The SP then calls the 3 procedures in NS to submit the event
(Begin/Write/Flush).

All that works fine, but I want the users of the source Db to be able to
insert records into their table even if the NS procs fail.

In the middle proc, I have the following:
BEGIN TRY
BEGIN TRAN
<EXEC the 3 procs>
COMMIT TRAN
END TRY
BEGIN CATCH
ROLLBACK TRAN
SELECT GETDATE()
END CATCH

Now, even if the NS database is off line, I can still execute the above proc
by itself and it executes fine ("Command executed sucessfully.") But when it
gets call from the trigger, it does not go through, the trigger fails, and
the INSERT does not happen.

How can I get this middle proc to SUCCEED even if NS is unavailable?
(WITHOUT having to resort to a Service Broker app!)

Thanks in advance!

--
Todd C

 >> Stay informed about: Failing NSEvent Begin Batch procs 
Back to top
Login to vote
Display posts from previous:   
   Database Forums (Home) -> Notification Services All times are: Pacific Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]