Friday, March 11, 2011

Unable to Delete Management Object in ConfigMgr

Recently I was having problem with one of my branch distribution points. I could no longer replicate packages to it and after some investigation I found that it had two machine records. (one was marked obsolete) The problem is that you can't delete the obsolete record until remove the Distribution Point role from the site system. After I removed the Distribution Point role from the server I was still unable to delete the record and this time the console gave me this error:

"Failure deleteing management object"

and if I expanded the details I got:

ConfigMgr Error Object:
instance of SMS_ExtendedStatus
{
 CauseInfo = "9";
 Description = "Error deleting discovery data in SQL";
 ErrorCode = 2168655109;
 File = "e:\\nts_sms_fre\\sms\\siteserver\\sdk_provider\\smsprov\\sspresource.cpp";
 Line = 388;
 Operation = "DeleteInstance";
 ParameterInfo = "SMS_R_System.ResourceId=3090";
 ProviderName = "WinMgmt";
 StatusCode = 2147749889;
};

I found the following post on myitforum.com and I ran the four SQL queries that were posted (about half way down the page) in the forum and I was then able to delete the record.

SELECT *
FROM PkgServers
WHERE NALPath='["Display=\\DP Name\"]MSWNET:["SMS_SITE=Site Code"]\\DP Name\'

DELETE
FROM PkgServers
WHERE NALPath='["Display=\\DP Name\"]MSWNET:["SMS_SITE=Site Code"]\\DP Name\'

SELECT *
FROM PkgStatus
WHERE PkgServer='["Display=\\DP Name\"]MSWNET:["SMS_SITE=Site Code"]\\DP Name\'

DELETE
FROM PkgStatus
WHERE PkgServer='["Display=\\DP Name\"]MSWNET:["SMS_SITE=Site Code"]\\DP Name\'