Performing an mcs reset on UIM 20.3.3 with MSSQL server

book

Article ID: 212250

calendar_today

Updated On:

Products

DX Infrastructure Management

Issue/Introduction

Attention: Going through the steps of the Article will completely reset MCS and all monitoring profiles will have to be recreated manually.

Information on performing an mcs reset on UIM 20.3.3

Environment

Release : 20.3

Component : UIM - MCS

Resolution

-run the following in SQL Management Studio (as a user that has full permissions to the UIM database) (it should not return any errors unless there is a permissions issue, or the resource is not there):

drop procedure SSRV2GetCustomAttributes;
drop procedure SSRV2GetProfileName;
drop function SSRV2GroupParentPath;
drop procedure SSRV2RunSql;
drop procedure SSRV2SplitString;
drop view SSRV2GroupWithPath;
drop table SSRV2CONTAINERPROPERTY;
drop table SSRV2POLICYPROFILEBLOB;
drop table SSRV2PROBETEMPLATEUPGRADE;
drop table SSRV2PROBETEMPLATESPACKAGE;
drop table SSRV2SchemaMigration;
drop table SSRV2TEMPLATEFILTER;
drop table SSRV2POLICYTARGETSTATUS;
drop table SSRV2PROFILEEVENT;

IF OBJECT_ID('dbo.SSRV2ProfileCondition', 'U') IS NOT NULL
 DROP TABLE SSRV2ProfileCondition
GO
IF OBJECT_ID('dbo.SSRV2DynamicDeviceDataRequest', 'U') IS NOT NULL
 DROP TABLE SSRV2DynamicDeviceDataRequest
GO
IF OBJECT_ID('dbo.SSRV2ConditionEvalRecordProfile', 'U') IS NOT NULL
 DROP TABLE SSRV2ConditionEvalRecordProfile
GO
IF OBJECT_ID('dbo.SSRV2ConditionEvalRecProfile', 'U') IS NOT NULL
 DROP TABLE SSRV2ConditionEvalRecProfile
GO
IF OBJECT_ID('dbo.SSRV2ConditionEvalRecord', 'U') IS NOT NULL
 DROP TABLE SSRV2ConditionEvalRecord
GO
IF OBJECT_ID('dbo.SSRV2DeviceCustomAttributeValue', 'U') IS NOT NULL
 DROP TABLE SSRV2DeviceCustomAttributeValue
GO
IF OBJECT_ID('dbo.SSRV2DeviceCustomAttrValue', 'U') IS NOT NULL
 DROP TABLE SSRV2DeviceCustomAttrValue
GO
IF OBJECT_ID('dbo.SSRV2CallbackParameter', 'U') IS NOT NULL
 DROP TABLE SSRV2CallbackParameter
GO
IF OBJECT_ID('dbo.SSRV2ConfigValue', 'U') IS NOT NULL
 DROP TABLE SSRV2ConfigValue
GO
IF OBJECT_ID('dbo.SSRV2ContainerProperty', 'U') IS NOT NULL
 DROP TABLE SSRV2ContainerProperty
GO
IF OBJECT_ID('dbo.SSRV2Container', 'U') IS NOT NULL
 DROP TABLE SSRV2Container
GO
IF OBJECT_ID('dbo.SSRV2DevicePackage', 'U') IS NOT NULL
 DROP TABLE SSRV2DevicePackage
GO
IF OBJECT_ID('dbo.SSRV2PackageTemplate', 'U') IS NOT NULL
 DROP TABLE SSRV2PackageTemplate
GO
IF OBJECT_ID('dbo.SSRV2Profile', 'U') IS NOT NULL
 DROP TABLE SSRV2Profile
GO
IF OBJECT_ID('dbo.SSRV2Removal', 'U') IS NOT NULL
 DROP TABLE SSRV2Removal
GO
IF OBJECT_ID('dbo.SSRV2Package', 'U') IS NOT NULL
 DROP TABLE SSRV2Package
GO
IF OBJECT_ID('dbo.SSRV2PackageOrigin', 'U') IS NOT NULL
 DROP TABLE SSRV2PackageOrigin
GO
IF OBJECT_ID('dbo.SSRV2Poller', 'U') IS NOT NULL
 DROP TABLE SSRV2Poller
GO
IF OBJECT_ID('dbo.SSRV2PollerGroup', 'U') IS NOT NULL
 DROP TABLE SSRV2PollerGroup
GO
IF OBJECT_ID('dbo.SSRV2SelectOption', 'U') IS NOT NULL
 DROP TABLE SSRV2SelectOption
GO
IF OBJECT_ID('dbo.SSRV2AuditTrailModification', 'U') IS NOT NULL
 DROP TABLE SSRV2AuditTrailModification
GO
IF OBJECT_ID('dbo.SSRV2AuditTrail', 'U') IS NOT NULL
 DROP TABLE SSRV2AuditTrail
GO
IF OBJECT_ID('dbo.SSRV2BackupConfigValue', 'U') IS NOT NULL
 DROP TABLE SSRV2BackupConfigValue
GO
IF OBJECT_ID('dbo.SSRV2BackupProfile', 'U') IS NOT NULL
 DROP TABLE SSRV2BackupProfile
GO
IF OBJECT_ID('dbo.SSRV2PackageAccount', 'U') IS NOT NULL
 DROP TABLE SSRV2PackageAccount
GO
IF OBJECT_ID('dbo.SSRV2DefaultConfigValue', 'U') IS NOT NULL
 DROP TABLE SSRV2DefaultConfigValue
GO
IF OBJECT_ID('dbo.SSRV2Field', 'U') IS NOT NULL
 DROP TABLE SSRV2Field
GO
IF OBJECT_ID('dbo.SSRV2Callback', 'U') IS NOT NULL
 DROP TABLE SSRV2Callback
GO

IF OBJECT_ID('dbo.SSRV2Option', 'U') IS NOT NULL
 DROP TABLE SSRV2Option
GO 
IF OBJECT_ID('dbo.SSRV2DefaultConfigValue', 'U') IS NOT NULL
 DROP TABLE SSRV2DefaultConfigValue
GO 
IF OBJECT_ID('dbo.SSRV2DefaultProfile', 'U') IS NOT NULL
 DROP TABLE SSRV2DefaultProfile
GO 
IF OBJECT_ID('dbo.SSRV2Template', 'U') IS NOT NULL
 DROP TABLE SSRV2Template
GO 
IF OBJECT_ID('dbo.SSRV2DeviceCustomAttribute', 'U') IS NOT NULL
 DROP TABLE SSRV2DeviceCustomAttribute
GO
IF OBJECT_ID('dbo.SSRV2DeviceGroup', 'U') IS NOT NULL
 DROP TABLE SSRV2DeviceGroup
GO
IF OBJECT_ID('dbo.SSRV2Device', 'U') IS NOT NULL
 DROP TABLE SSRV2Device
GO
IF OBJECT_ID('dbo.SSRV2Version', 'U') IS NOT NULL
 DROP TABLE SSRV2Version
GO
IF OBJECT_ID('dbo.SSRV3PolicyTemplates', 'U') IS NOT NULL
 DROP TABLE SSRV3PolicyTemplates
GO
IF OBJECT_ID('dbo.SSRV3ProbeTemplate', 'U') IS NOT NULL
 DROP TABLE SSRV3ProbeTemplate
GO
IF OBJECT_ID('dbo.SSRV3ProbeTemplateBundle', 'U') IS NOT NULL
 DROP TABLE SSRV3ProbeTemplateBundle
GO
IF OBJECT_ID('dbo.SSRV3ProbeTemplateBundleTemplates', 'U') IS NOT NULL
 DROP TABLE SSRV3ProbeTemplateBundleTemplates
GO
IF OBJECT_ID('dbo.SSRV3TemplatePolicy', 'U') IS NOT NULL
 DROP TABLE SSRV3TemplatePolicy
GO
IF OBJECT_ID('dbo.SSRV3ProbeTemplatePolicy', 'U') IS NOT NULL
 DROP TABLE SSRV3ProbeTemplatePolicy
GO
IF OBJECT_ID('dbo.SSRV2ProfileComposite', 'U') IS NOT NULL
 DROP TABLE SSRV2ProfileComposite
GO
IF OBJECT_ID('dbo.SSRV2ObjectLock', 'U') IS NOT NULL
 DROP TABLE SSRV2ObjectLock
GO
-- Triggers
IF  EXISTS (SELECT * FROM sys.triggers WHERE object_id = OBJECT_ID(N'T_CM_GROUP_MEMBER_UPDT_SSRV2DEVICE')) DROP TRIGGER T_CM_GROUP_MEMBER_UPDT_SSRV2DEVICE;
GO
IF  EXISTS (SELECT * FROM sys.triggers WHERE object_id = OBJECT_ID(N'T_CM_GROUP_INS_SSRV2DEVICEGROUP')) DROP TRIGGER T_CM_GROUP_INS_SSRV2DEVICEGROUP
GO
IF  EXISTS (SELECT * FROM sys.triggers WHERE object_id = OBJECT_ID(N'T_CM_GROUP_UPDT_SSRV2DEVICEGROUP')) DROP TRIGGER T_CM_GROUP_UPDT_SSRV2DEVICEGROUP;
GO
-- Functions
IF OBJECTPROPERTY (object_id('dbo.concat'), 'IsScalarFunction') > 0
 DROP FUNCTION concat
GO

-delete the mon_config_service probe from the primary hub
-delete the C:\Program Files (x86)\Nimsoft\probes\service\mon_config_service folder and its contents from the primary hub
-drag and drop mon_config_service 20.33 from the archive to the primary hub
-activate the mon_config_service probe (allow for 2-3 minutes after a port and pid)
-run the following query and validate that you have 144 objects (20.3.3)

SELECT name AS [Name], 
       SCHEMA_NAME(schema_id) AS schema_name, 
       type_desc, 
       create_date, 
       modify_date
FROM sys.objects
WHERE name like '%ssrv%' order by type_desc, name;

-install all template packages that you plan on using via drag and drop from the archive to the primary hub