| Business Application Development with: SQL Server, C#, VB, VB.Net, ASP, ASP.Net, and XML |
| N | S |
Novick Software Management • Design • Programming • Training • Consulting |
|
|
News Links Schedule Site Map Contact |
|
Tips and Tricks for: SQL Server
The Problem: A Stalled SQL Server Agent cmdexec job.After moving a job to a new server I found one of the jobs still running in the morning when I returned to work. It was at a cmdexe step and hadn't used any CPU. I also found two messages in the Event Logs. The first one was in the Application Even Log:
The other message was in the System Even log:
Solution: Proper error handling in .Net ProgramsThe immediate solution was a permission problem. The program didn't have permission to write to it's log file. But the real problem was that when it couldn't write to the log it threw an unhandled event. The .net's runtime unhandled event handler popped up a message and was stuck. SQL Server Agent doesn't attach to the NT console so there was nowhere for the popup to go, hence the events. So the real solution is proper even handling in .Net programs. Living with no event hander is not an option if the job is going to run in unattended in SQL Server Agent.
|
|
|
Copyright © 2003-2008 Novick Software, Inc. | Terms of Use | Privacy Policy | Nice Things People Say| |