search cancel

Getting error "Failed to process web request. Invalid object name '#trusteeScopeCollections'."

book

Article ID: 162611

calendar_today

Updated On:

Products

IT Management Suite

Issue/Introduction

Customer recently upgraded and he noticed that some of the agent policies work and some do not.  When he selects one of the broken policies, he gets just a generic error page.

Message 1:
HTTP Request failed:
/Altiris/NS/Admin/SoftwareDelivery/AgentInstall.aspx?Guid=303e418d-b9a3-4e6e-8635-b9319a2db5d4&Url=http%3a%2f%2fsal-spmpw01%2faltiris%2fconsole%2ftree.aspx%3fViewGuid%3da57fb0e9-0676-4e00-929a-6bb37dc1f888%26%26ConsoleGuid%3d1b22db4e-a898-443f-9b99-855b1653d3f5&TreeGuid=a57fb0e9-0676-4e00-929a-6bb37dc1f888&ParentGuid=00000000-0000-0000-0000-000000000000&ItemGuid=303e418d-b9a3-4e6e-8635-b9319a2db5d4&ViewGuid=a57fb0e9-0676-4e00-929a-6bb37dc1f888&ConsoleGuid=1b22db4e-a898-443f-9b99-855b1653d3f5

Invalid object name '#trusteeScopeCollections'.

Message 2:
Failed to process web request.
Exception of type 'System.Web.HttpUnhandledException' was thrown.
[System.Web.HttpUnhandledException @ System.Web]
at System.Web.UI.Page.HandleError(Exception e)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest()
at System.Web.UI.Page.ProcessRequest(HttpContext context)
at Altiris.NS.UI.Controls.PageCachePage.ProcessRequest(HttpContext context)
at Altiris.NS.UI.AltirisPage.ProcessRequest(HttpContext context)

Invalid object name '#trusteeScopeCollections'.

Cause

Some stored procedures, in this case spResourceTargetTempPopulate and spResolveResourceTargetFullPrepare, didn't update and there were still referencing an invalid temp table. They had a previous reference to '#trusteeScopeCollections' rather than been updated to '#temp_trustees'.

Resolution

Grab the same stored procedures from a working server and run them on the customer's database. The proper references should be created.

Attached the stored procedures on this KB as reference.

Attachments

spResourceTargetTempPopulate.sql get_app
spResolveResourceTargetFullPrepare.sql get_app