"Unexpected exception while getting next task to run: Could not find stored procedure 'tmGetNextTaskToRun'"

Article:TECH34871  |  Created: 2007-09-18  |  Updated: 2007-10-12  |  Article URL http://www.symantec.com/docs/TECH34871
Article Type
Technical Solution


Issue



After upgrading Service and Asset Management Suite Level 2, the following error appears almost every 10 seconds:

Priority: 1
Date: 9/18/2007 6:16:30 AM
Tick Count: 45600390
Host Name: ServerName
Process: AtrsHost.exe (5852)
Thread ID: 4080
Module: AltirisNativeHelper.dll
Source: Altiris.TaskManagement.ServerTasks.ServerTaskManager.GetNextServerTaskToWake
Description: Unexpected exception while getting next task to run: System.Data.SqlClient.SqlException: Could not find stored procedure 'tmGetNextTaskToRun'.   at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream)
   at System.Data.SqlClient.SqlCommand.ExecuteReader()
   at Altiris.TaskManagement.ServerTasks.ServerTaskManager.GetNextServerTaskToWake(ExecutionStatus& status)

The following warning also started appearing in the Carbon Copy logs almost every two minutes:

Priority: 2
Date: 9/18/2007 7:17:34 AM
Tick Count: 1319046
Host Name: ServerName
Process: AtrsHost.exe (4780)
Thread ID: 3808
Module: AltirisNativeHelper.dll
Source: Altiris.ClientTask.*
Description: Credential check for "Domain\svc_altiris" failed: System.Net.WebException: The remote server returned an error: (500) Internal Server Error.
   at System.Net.HttpWebRequest.CheckFinalStatus()
   at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
   at System.Net.HttpWebRequest.GetResponse()
   at Altiris.ClientTask.Server.AltirisAgentSettings.CheckCredentials(NetworkCredential credentials, String authenticateWebBaseUrl)


Environment



Notification Server 6.0.6074 SP3
Notification Server 6.0 SP3 Update (KB34317) or R6
Task Management Solution 6.0

Cause



Unknown. Possibly during the upgrade there were some timeouts or the upgrade process didn't allowed to finish with the remaining components on the Task Management Solution.

Solution



  1. Since the error refers to a missing stored procedure, tmGetNextTaskToRun, look at the database (under the Stored Procedures) and see if it actually is missing. You may find out that all the Stored Procedures for Task Management Solution are missing (you should be able to see approx. 11 stored procedures that starts with dbo.tm and approx. 5 that start with dbo.ts) even though the Currently Installed page says that Task Management Solution is installed.
  2. Run a repair on Task Mgm Solution. Go to Add or Remove Programs and run a repair to Task Management Solution.
    If you are not able to run a repair from the Add or Remove Programs because the installation MSI seems to be missing, try to run a repair directly on the setup MSI (under C:\Program Files\Altiris\Setup Files\Task Server\TaskManagementSetup.msi). It should populate the database with the missing stored procedures. The error should stop.
  3. Regarding to the warning, you may notice that many components are not installed for the Task Server. For example, you don't see the Task Server folder (under the Configuration > Server Settings > Notification Server Settings) or some of the Sample Jobs and Tasks are not listed (under Tasks > Task Management). You may need to run some configuration files manually if you don't want to remove and reinstall the Task Management Solution. Run the TaskManagement config file manually. Here is the command (in this case the files were stored in the D:\ drive):

    D:\Program Files\Altiris\Notification Server\bin>aexconfig /configure "D:\Program Files\Altiris\TaskManagement\Config\TaskManagement.config"

  4. If you notice that in the Notification Server logs there is a warning about not creating one of the folders for the Task Server,  then the folder GUID was '01EA1EEE-F91E-4786-9076-26AD9A536A3F' (the GUID for the missing folder was for the Task Server folder, usually under the Configuration tab > Server Settings > Notification Server Infrastructure). If this is the case, then run the ClientTask config file. Here is the command line that you can use:

    D:\Program Files\Altiris\Notification Server\bin>aexconfig /configure "D:\Program Files\Altiris\Client Task Management\Config\ClientTask.config"

  5. After running the ClientTask config file, run the TaskManagement config file again. It should fix the issue with the missing pieces for the Task Server as well fix the warnings.

Legacy ID



38168


Article URL http://www.symantec.com/docs/TECH34871


Terms of use for this information are found in Legal Notices