March 25, 2008 at 9:36 pm
Hi All,
I require a script (or what ever) to e-mail me when a row count on a certain table exceeds a count of say 100,000.
Any one able to help me. SQL2005 BTW
Thanks
Graeme
March 27, 2008 at 3:50 am
Simply write an after insert trigger for a table, check row count and send mail with sp_send_dbmail procedure.
http://msdn2.microsoft.com/en-us/library/ms190307.aspx
However, you shouldn't do it on a high volume table.
March 27, 2008 at 4:44 am
Another option is to create a custom perfmon counter; SQL Server, User Settable Object
Then, use that performance counter in an Alert to send the message.
Additionally, if you ever want to graphically see the row count at any time you can open Perfmon and add that customer counter; SQLServer : User Settable. Or, if you want to watch a trend over time you set up a counter log in perfmon.
March 27, 2008 at 3:40 pm
Thanks heaps guys, all good stuff I will have a play today.:D:hehe:
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply