Getting "Procedure or function 'spTreeOverrideGet' expects parameter '@TreeGuid', which was not supplied." when opening the Altiris Console 6.5
search cancel

Getting "Procedure or function 'spTreeOverrideGet' expects parameter '@TreeGuid', which was not supplied." when opening the Altiris Console 6.5

book

Article ID: 176913

calendar_today

Updated On:

Products

IT Management Suite

Issue/Introduction

Customer ran a repair on the Notification Server trying to fix some other issues with the Notification Server. After the repair was done, when he tried to open the Altiris Console 6.0, the following error occurred:

"Error: An error occurred constructing the tree from the XML provided by the server: 'error' is null or not an object (-2146823281)."

If he tries to open the Altiris Console 6.5, this message appears:

Server Error in '/Altiris/Console' Application.

Procedure or function 'spTreeOverrideGet' expects parameter '@TreeGuid', which was not supplied.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: Procedure or function 'spTreeOverrideGet' expects parameter '@TreeGuid', which was not supplied.

The customer tried to run a repair on the installed Update for the Notification Server, but the issue persisted, as well he tried to compare the SIDs on his database and the Server as KB 29263 suggested but he has the right SIDs.

Cause

In this particular case, after comparing the 'spTreeOverrideGet' stored procedure with the same one from another Notification Server, we found out that those were different. The stored procedure from the affected Notification Server was missing some pieces, causing to fail when it was been called by the Altiris Console.

Resolution

1. Run the 'spTreeOverrideGet' stored procedure on the database from the affected Notification Server. You may get a message like this as well:
Procedure or function 'spTreeOverrideGet' expects parameter '@TreeGuid', which was not supplied.

2. If you get a message as mentioned in step 1, then try to do the same from a Notification Server that has not the issue. You should get something like this as result:
NodeGuid                                                                OverrideTreeGuid
------------------------------------                          ------------------------------------
C7D3A820-EA61-4F0D-916A-063CD30FA02D 1610A220-7C40-41F0-9CE1-39433BC50638

3. If you run sp_helptext spTreeOverrideGet on both databases, you should see that both stored procedures are different.
4. In order to get the Altiris Console loading properly, you may need to overwrite the stored procedure with the right queries. Run the following to get the stored procedure as it should be:

GO
/****** Object: StoredProcedure [dbo].[spTreeOverrideGet] Script Date: 04/23/2009 08:12:54 ******/

SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER OFF
GO
ALTER proc [dbo].[spTreeOverrideGet]

@TreeGuid
uniqueidentifier = null
as
IF @TreeGuid IS null
          BEGIN
                       select [NodeGuid], [OverrideTreeGuid] 
                       from [TreeOverride]
          END
ELSE
          BEGIN
                       select [NodeGuid], [OverrideTreeGuid]
                       from [TreeOverride]
                       where [SourceTreeGuid] = @TreeGuid
          END

 5. Now try to open the Altiris Console, either 6.0 and 6.5, and now you should be able to see the treeview properly under your Tabs/Menu.

If they are running MSDE (SQL 2000) They need to use the Microsoft Query tool that comes with the Software -- Or you will need to remove the Environment variables from the procedure or it will not run properly. (meaning you would start from "ALTER proc [dbo].[spTreeOverrideGet]")The preferred method is to use the Microsoft tools, or upgrade SQL to a more current version. As without those commands we cannot ensure the correct execution.

Applies To
Notification Server 6.0.6074 SP3 + Rx