Procedure tmBuildTargetDeviceCache has no parameters and arguments were supplied.
search cancel

Procedure tmBuildTargetDeviceCache has no parameters and arguments were supplied.

book

Article ID: 171649

calendar_today

Updated On:

Products

IT Management Suite

Issue/Introduction

Initially the customer reported that the PMImport task is staying in a queued state and never starts. He found that he could not stop or delete several tasks in the state, including a new one just created. He also found that he could not add a computer to the quick run – nothing would load when selecting the drop down, and typing/pasting a known computer name would not return a result. In using the new schedule > Add drop down and selecting Computers or Devices, no computers show up.

The NS logs showed a message like this:

Rebuilding target device cache (5/300): failed all retries (5)

   [Altiris.Database.DatabaseContextRetryFailureException @ ]

Procedure tmBuildTargetDeviceCache has no parameters and arguments were supplied.

Rebuilding target device cache (5/300): failed all retries (5)

   [Altiris.Database.DatabaseContextRetryFailureException @ ]

Procedure tmBuildTargetDeviceCache has no parameters and arguments were supplied.

Environment

ITMS 8.1 RU6

Cause

In this particular instance, this issue occurred after upgrading from 8.1 RU4 (or RU5) to RU6. The procedure tmBuildTargetDeviceCache didn't update properly to its new version.

Resolution

Usually means that you don't have the most up to date version of this procedure. In order to fix this issue, please try the following:

  1. From the command prompt (running it as Administrator), run the following from the "<install Drive>\Program Files\Altiris\Notification Server\Bin" directory:
    aexconfig /configure "C:\Program Files\Altiris\TaskManagement\Config\TaskManagement_Hotfix.config
  2. Restart "Altiris Services" service and IIS (iisreset)

or just grab the updated version from TaskManagement_Hotfix_SqlObjects.config.

The stored procedure should look like this (from TaskManagement_Hotfix_SqlObjects.config):

CREATE PROCEDURE [dbo].[tmBuildTargetDeviceCache]
    @rebuildTime datetime output
AS
    SET TRANSACTION ISOLATION LEVEL READ COMMITTED
    BEGIN TRANSACTION

    -- delete all items from the cache
    TRUNCATE TABLE [dbo].[TaskTargetDeviceCache]

    -- insert all items from the view
/*
    IF EXISTS ( SELECT TOP 1 1 FROM [dbo].[TaskResourceTypes] WHERE ResourceTypeGuid NOT IN ( '2C3CB3BB-FEE9-48DF-804F-90856198B600', '493435F7-3B17-4C4C-B07F-C23E7AB7781F' ) )
        -- insert any Resourse
        INSERT INTO  [dbo].[TaskTargetDeviceCache]
            SELECT   [Guid], [ResourceTypeGuid], [Name], [IsManaged], [IsLocal], [IP Address], [MAC Address], [OS Name], [Domain]
                FROM [dbo].[vTaskTargetDevices] vt
    ELSE
*/

        -- insert Computer Resourse only
        INSERT INTO  [dbo].[TaskTargetDeviceCache]
            SELECT   [Guid], [ResourceTypeGuid], [Name], [IsManaged], [IsLocal], [IP Address], [MAC Address], [OS Name], [Domain]
                FROM [dbo].[vTaskTargetDevicesFromComputer] vt
       
    COMMIT TRANSACTION
    set @rebuildTime = GETUTCDATE()

 

So, it is most likely the one in the database is missing  @rebuildTime datetime output