SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 

Get your favorite SSC scripts directly in SSMS with the free SQL Scripts addin. Search for scripts directly from SSMS, and instantly access any saved scripts in your SSC briefcase from the favorites tab.
Download now (direct download link)

Open Transaction Alarm to Log to the Event log

By Edward Pochinski,

Example is a sharepoint crawl that should complete in 20 min but seems to hang sometimes and then interfer with other operations. The Share Point Admin can stop or pause a crawl if it is causing any issues on the system. The script will log to the event logs using xp_logevent and a 3rd party tool can then geneate a ticket. You can modify the block of code to a send a page or an email using the Database mail. This can run as a T-SQL job step with in a SQL Agent Job and run every hour. You can also modify the time to alarm on the open transaction. Hope you find this usefull. We used this as a counter measure from an incident.

Total article views: 580 | Views in the last 30 days: 4
 
Tags
agent jobs    
transactions    
 
Contribute