0

I have two servers, a 2003 R2 and a 2008 R2, setup to run the same executable as a task as I work on migrating content over to the new server. The task started failing recently and the task scheduler is just giving a message of "Task stopping due to timeout reached" and "The last run of the task was terminated by the user". Not helpful.

If I manually run the task on the 2003 server, it throws up a Microsoft .NET Framework error message with a detailed explanation of exactly what's wrong. The detailed message includes the exception, the process chain, a list of loaded assemblies, and instructions on how to enable just-in-time (JIT) debugging, but the summary of the error and what I primarily need.

Violation of PRIMARY KEY constraint 'PK_UserId'. Cannot insert duplicate key in object 'dbo.Removed'. The statement has been terminated.

If I manually run the task on the 2008 server, it isn't giving me anything more than the automated execution gave.

What do I need to do to get the .NET Framework error (or anything comparable) to show up?

  • You will need to tell us more details - what task? tell us the error message! [edit] your question to provide those infos. – guntbert Oct 12 '15 at 20:18
  • The task just runs an executable that moves SQL records around. The error was caused because the destination table already had those unique keys. The problem is I couldn't find this error message anywhere in the 2008 version and would have wasted hours trying to guess the problem. – Script Wolf Oct 12 '15 at 20:36
  • Change your .NET program to log the error. – pkr Oct 14 '15 at 17:33
  • @pkr298 But what about execution errors in general, when I can't just edit the executable like in this one case? Where can I get useful, detailed error messages by default instead of by design of the executable? – Script Wolf Oct 19 '15 at 15:45

0 Answers0