There are two ways to get this issue resolved. Try one of the following two:
- Grab the attached file called RebuildMetaData.zip and decompress it and run RebuildMetaData.exe on your Notification Server. It will take few seconds to verify the MetaData Objects on your Altiris Database. A prompt window will open and close automatically. Make sure that you run the executable as the Application Identity or as the Admininstrator account. Then restart the Altiris Services and IIS.
- If the step above doesn't fix the issue, run the following query on SQL Query Analyzer against the Altiris Database (remember to have a backup of your database just in case; however this query should not damage the database) and after running the query please run the NSSetup Wizard (http://localhost/Altiris/NS/install/nssetup.aspx) :
/****************************/
/* */
/* MetaObject Update Script 6.0 SP3*/
/* */
/***************************/
Use Altiris
DECLARE @dbid int
DECLARE @objectid int
DECLARE @removedobjects int
DECLARE @updatedobjects int
DECLARE @correctdb nvarchar(255)
DECLARE @correctdbid int
SET @removedobjects = 0
SET @updatedobjects = 0
SET @correctdbid = -1
SET nocount ON
SELECT @correctdbid = dbid FROM master.dbo.sysdatabases WHERE
name = DB_NAME()
DECLARE MetaObjectCursor CURSOR FOR SELECT SysDbId, SysObjectId
FROM MetaObject
OPEN MetaObjectCursor
FETCH NEXT FROM MetaObjectCursor INTO @dbid, @objectid
WHILE @@FETCH_STATUS = 0
BEGIN
IF @correctdbid IS NOT NULL
BEGIN
IF @dbid <> @correctdbid
BEGIN
IF EXISTS(SELECT 1 FROM MetaObject WHERE SysDbId =
@correctdbid AND SysObjectId = @objectid)
BEGIN
DELETE FROM MetaObject WHERE SysDbId = @dbid AND
SysObjectId = @objectid
DELETE FROM MetaObjectColumn WHERE SysDbId =
@dbid AND SysObjectId = @objectid
SET @removedobjects = @removedobjects + 1
END
ELSE
BEGIN
UPDATE MetaObject SET SysDbId = @correctdbid
WHERE SysDbId = @dbid AND SysObjectId = @objectid
UPDATE MetaObjectColumn SET SysDbId =
@correctdbid WHERE SysDbId = @dbid AND SysObjectId = @objectid
SET @updatedobjects = @updatedobjects + 1
END
END
END
ELSE
BEGIN
PRINT 'Unable to update the metaobject with SysDbId = '
+ CAST(@dbid AS nvarchar(25)) + ' and SysObjectId = ' + CAST(@objectid
AS nvarchar(25)) + ' since the correct database could not be determined'
END
FETCH NEXT FROM MetaObjectCursor INTO @dbid, @objectid
END
CLOSE MetaObjectCursor
DEALLOCATE MetaObjectCursor
SET nocount OFF
IF @removedobjects > 0
BEGIN
PRINT CAST(@removedobjects AS nvarchar(10)) + '
metaobject(s) have been removed from the database since they referred to
an incorrect database'
END
IF @updatedobjects > 0
BEGIN
PRINT CAST(@updatedobjects AS nvarchar(10)) + '
metaobject(s) have been updated to refer to the correct database'
END
Note: If an error is seen running the rebuildMetaData.exe, see article 35303, "Errors running RebuildMetaData.exe"
Applies To
Notification Server 6.0