July 1, 2008 at 1:33 pm
My company want me to write the task that will send email out when the log file reach every 100MB ( like 100M, 200M, 300M....). I know how to send the email out but just dont know how to check the log file automatic. Please help
very best regards
Nick
July 1, 2008 at 2:48 pm
Look up "DBCC SQLPERF (LOGSPACE)" in Books Online. That should have what you need.
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
July 1, 2008 at 3:18 pm
Dear SSCrazy,
Thanks. Now i know how to check the log file. Might I have another question? I can write the store procedure that will check the log file and send out email, but how can I add that store procedure to a process ( like an alert) that will exec it automatically. Many thanks
Regards
Nick
July 2, 2008 at 7:28 am
In Management Studio, open up SQL Server Agent (should be at the bottom of list), and right-click on Jobs, select Create New Job, and follow the directions on the screen. You can schedule any stored procedure to run in a job, and set a schedule for how often you want it to run, etc.
Make sure to add the stored procedure as a Step, and to add the schedule on that tab.
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply