|
|
|
SSCrazy
      
Group: General Forum Members
Last Login: 2 days ago @ 2:18 PM
Points: 2,278,
Visits: 2,999
|
|
|
|
|
|
SSCrazy
      
Group: General Forum Members
Last Login: 2 days ago @ 3:27 PM
Points: 2,692,
Visits: 1,075
|
|
|
|
|
|
SSCommitted
      
Group: General Forum Members
Last Login: Sunday, May 12, 2013 4:26 PM
Points: 1,696,
Visits: 1,742
|
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Thursday, February 03, 2011 7:44 AM
Points: 151,
Visits: 341
|
|
Hi,
I am trying to create notification in server A and want the read the queue data using stored procedure from server B. Can you help me with sample article of how to achieve this? I am struck with creating notification in server A and making it to pass the data to server B. Where do i mention that the data should go to server B. Greatly appreciate your help.
BASKAR BV http://geekswithblogs.net/baskibv/Default.aspx In life, as in football, you won’t go far unless you know where the goalposts are.
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Monday, February 18, 2013 12:26 PM
Points: 5,
Visits: 100
|
|
HI,
Thanks For the Post.
I tried the sample Event Notification given in the blog. And it looks all fine.
For the each Event(ERRORLOG) it is using one Conversation Group for all the raised errors. SO i manually ended the conversation and then i raised a custom exception. This time no messaes sent to any Queue.
Please let me know your thought
Thanks, Vinay K
|
|
|
|
|
SSCommitted
      
Group: General Forum Members
Last Login: Sunday, May 12, 2013 4:26 PM
Points: 1,696,
Visits: 1,742
|
|
|
|
|
|
Mr or Mrs. 500
      
Group: General Forum Members
Last Login: Friday, May 10, 2013 3:10 PM
Points: 518,
Visits: 920
|
|
Hi Jonathan, Before I ask a question I wanted to say that I really like your articles, especially in the events area. Here is the question: I have create a queue for auditing database management on alter, create, drop, etc. everything looks fine, I can query the queue and displaying the records.. But, for some reason this queue becomes "disabled" within a minute after re-enabling and I have to manually or programmatically re-enable it. I have created couple of other ones that work fine, such as audit login failed, and one adapted from your awesome code on AutoGrowFile.. Any advise would be grand thx again Jonathan
Cheers, John Esraelo
|
|
|
|
|
SSCommitted
      
Group: General Forum Members
Last Login: Sunday, May 12, 2013 4:26 PM
Points: 1,696,
Visits: 1,742
|
|
John Esraelo-498130 (11/10/2012) Hi Jonathan, Before I ask a question I wanted to say that I really like your articles, especially in the events area. Here is the question: I have create a queue for auditing database management on alter, create, drop, etc. everything looks fine, I can query the queue and displaying the records.. But, for some reason this queue becomes "disabled" within a minute after re-enabling and I have to manually or programmatically re-enable it. I have created couple of other ones that work fine, such as audit login failed, and one adapted from your awesome code on AutoGrowFile.. Any advise would be grand thx again Jonathan
Hey John,
My first guess would be that you have a poison message in the queue that is causing the activation procedure to rollback and after 5 rollbacks it will automatically disable the queue. To troubleshoot this, I would disable activation and then enable the queue and look at the next message on it to see what is wrong with it. I'd also see why the activation procedure has to rollback during processing of the message. To do this:
-- Turn activation off ALTER QUEUE [YourQueue] WITH ACTIVATION ( STATUS = OFF, EXECUTE AS OWNER);
-- Enable the queue ALTER QUEUE [YourQueue] WITH STATUS = ON;
Then just do a standard SELECT against the queue to view it's contents.
SELECT * FROM [YourQueue];
You can also clear the items in the queue by using RECEIVE:
DECLARE @message_body XML;
-- Get the top message from the queue RECEIVE TOP (1) @message_body = CAST([message_body] AS XML) FROM [YourQueue]);
Hopefully that helps you resolve the problems.
Cheers,
Jonathan Kehayias | Principal Consultant | MCM: SQL Server 2008 My Blog | Twitter | MVP Profile Training | Consulting | Become a SQLskills Insider Troubleshooting SQL Server: A Guide for Accidental DBAs
|
|
|
|
|
Mr or Mrs. 500
      
Group: General Forum Members
Last Login: Friday, May 10, 2013 3:10 PM
Points: 518,
Visits: 920
|
|
Jonathan Kehayias (11/10/2012)
John Esraelo-498130 (11/10/2012) Hi Jonathan, Before I ask a question I wanted to say that I really like your articles, especially in the events area. Here is the question: I have create a queue for auditing database management on alter, create, drop, etc. everything looks fine, I can query the queue and displaying the records.. But, for some reason this queue becomes "disabled" within a minute after re-enabling and I have to manually or programmatically re-enable it. I have created couple of other ones that work fine, such as audit login failed, and one adapted from your awesome code on AutoGrowFile.. Any advise would be grand thx again Jonathan
Hey John, My first guess would be that you have a poison message in the queue that is causing the activation procedure to rollback and after 5 rollbacks it will automatically disable the queue. To troubleshoot this, I would disable activation and then enable the queue and look at the next message on it to see what is wrong with it. I'd also see why the activation procedure has to rollback during processing of the message. To do this: -- Turn activation off ALTER QUEUE [YourQueue] WITH ACTIVATION ( STATUS = OFF, EXECUTE AS OWNER);
-- Enable the queue ALTER QUEUE [YourQueue] WITH STATUS = ON;
Then just do a standard SELECT against the queue to view it's contents. SELECT * FROM [YourQueue];
You can also clear the items in the queue by using RECEIVE: DECLARE @message_body XML;
-- Get the top message from the queue RECEIVE TOP (1) @message_body = CAST([message_body] AS XML) FROM [YourQueue]);
Hopefully that helps you resolve the problems. Cheers,
Thank you Jonathan, I will give it a shot in a minute and keep you posted of the results . thx again
Cheers, John Esraelo
|
|
|
|
|
Mr or Mrs. 500
      
Group: General Forum Members
Last Login: Friday, May 10, 2013 3:10 PM
Points: 518,
Visits: 920
|
|
FYI I wonder if my AUDIT_DATABASE_MANAGEMENT_EVENT statement in the paragraph in below does not exist or typed incorrectly.. so, I am going to search on internet / msdn and see what I can find out ..
CREATE EVENT NOTIFICATION [CaptureAuditDatabaseManagementEvents] ON SERVER WITH FAN_IN FOR AUDIT_DATABASE_MANAGEMENT_EVENT TO SERVICE 'AuditDatabaseManagementEventService', 'current database'; GO
Cheers, John Esraelo
|
|
|
|