September 2, 2012 at 8:30 pm
Hi Everyone,
Just want to ask if anyone have "script" or jobs that will automatically check database blocking. I want to automate this kind of scenario and also create an email alert if there's database blocking.
This will be a big help to me.
Thanks in advance guys 🙂
September 2, 2012 at 10:49 pm
marygrace_laurente23 (9/2/2012)
Hi Everyone,Just want to ask if anyone have "script" or jobs that will automatically check database blocking. I want to automate this kind of scenario and also create an email alert if there's database blocking.
This will be a big help to me.
Thanks in advance guys 🙂
Did you try out something so far ?
Please let us know if have any issue in your approach.
--rhythmk
------------------------------------------------------------------
To post your question use below link
https://www.sqlservercentral.com/articles/forum-etiquette-how-to-post-datacode-on-a-forum-to-get-the-best-help
🙂
September 2, 2012 at 11:15 pm
Blocking is a pretty normal activity as the database establishes locks to allow some queries to complete before beginning others. I don't think you really want to get an email in those instances, because in a high volume application you'll get tons of emails!
SELECT * FROM sys.sysprocesses WHERE blocked <> 0
The above query identifies blocked processes. It would probably be better to dump all of them into a log table and then analyze them at periodic intervals.
This link may help: http://blogs.msdn.com/b/nikhilsi/archive/2008/07/13/how-to-identify-blocked-sql-processes-quickly.aspx
My thought question: Have you ever been told that your query runs too fast?
My advice:
INDEXing a poor-performing query is like putting sugar on cat food. Yeah, it probably tastes better but are you sure you want to eat it?
The path of least resistance can be a slippery slope. Take care that fixing your fixes of fixes doesn't snowball and end up costing you more than fixing the root cause would have in the first place.
Need to UNPIVOT? Why not CROSS APPLY VALUES instead?[/url]
Since random numbers are too important to be left to chance, let's generate some![/url]
Learn to understand recursive CTEs by example.[/url]
[url url=http://www.sqlservercentral.com/articles/St
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply