# Disable-NSACM-and-enhance-CI-lifecycle-in-SaaS_688987700
Salesforce is a CMS standalone customer, previously OpenText want Salesforce to show interest on AMX, so at the beginning of Salesforce tenant provisioning, we use current ESM SaaS automation to set up SMAX + CMS + NSACM, with enhanced CI lifecycle enabled, after CMS 24.1 upgrade, we enhanced the CI lifecycle solution that CI deletion from all sources can't be physically deleted but set discovered state as 'purgeable', this is not applicable to Salesforce standalone CMS use case, so we need to disable NSACM and enhance CI lifecycle for Salesforce by performing below steps.

### Disable NSACM

Step 1: Disable NSACM flag manually by following: [Disable Native SACM manually](https://confluence.opentext.com/display/ICSD/Disable+Native+SACM+manually).

Step 2: Clean up SMAX existing CIs, choose **one of the ways**:

**For small data volume via SMAX UI:**

1. From the main menu, select **Build > Service Asset & Configuration**.
2. From **SACM Home**, select **Devices**.
3. Drill down the grid for device, system element, service component, actual service respectively, select all CIs in the list, and click ‘Delete’ to mass delete them, ignore the warning like “maximum 500 records are allowed in one batch..”

**For large data volume via database:**

In the xservices\_ems database for SMAX

1) Run the following SQL command to count CI number for each entity type, replace <tenant-ID> to the real SMAX tenant ID:

***select [d.name](http://d.name/),count(1) from maas\_admin.entities\_<tenant-ID> e inner join (select distinct id,name from maas\_admin.entity\_descriptor where name in ('Device','ActualService','SystemElement','ServiceComponent')) d on e.entity\_type\_id= [d.id](http://d.id/) where e.is\_deleted=false group by 1***

Get the results like

![](attachments/688987700/688987689.png)

2) Run the following SQL to soft delete all CIs of each entity type, replace <tenant-ID> to the real SMAX tenant ID:

***update maas\_admin.entities\_<tenant-ID> set is\_deleted=true where entity\_type\_id in (select distinct id from maas\_admin.entity\_descriptor where name in ('Device','ActualService','SystemElement','ServiceComponent')) and is\_deleted=false***

3) Re-run SQL in #1 and make sure all CIs are gone.

![](attachments/688987700/688987690.png)

4) You can also go to SMAX agent interface UI, double check all devices, system elements, service components, actual services are gone.

### Disable enhanced CI lifecycle

1. Go to JMX-console – URM Services - use listResourceTypes – iterate this for each customer ID
- - Settings\_STATE\_CUSTOMER\_SETTING – and select **[enable.enhanced.ci](http://enable.enhanced.ci/).lifecycle** – open it and set it as false instead of **true**:

2\. To clean up the cache from UCMDB, you can perform **one of the ways** to make this change effective:

- Restart this customer: Go to JMX, search for 'stopCustomer', input the related customerID, wait for few mins, go back to JMX, search for 'startCustomer', input the related customerID
- Restart server just to make sure the setting is reset

3\. Validate the enhanced Ci lifecycle is disabled: go to CMS UI → Home → Administration → Infrastructure Settings Management → search for enhanced Ci lifecycle, check the value is false.

![](attachments/688987700/688987693.png)

### Post-operation tasks owned by customer

After SaaS Ops disabled NSACM and enhanced CI lifecycle, there are some tasks need CMS customer to handle with existing CMS CIs. Customers can review these tasks and choose whether they need to do it or not based on their business.

1. Clean up useless attributes in existing Cis: **metaphase, discovery\_state,** **sd\_type.** These 3 attributes are used for enhanced CI lifecycle and NSACM, it’s useless now, customer can create an enrichment rule to set the value of these 3 attributes to empty
2. Multi-tenancy is enabled by default in SaaS farm, the default tenant is ‘All Tenants’ so it will not impact single tenant use case. With MT enabled, under NSACM solution, there are some additional steps performed in SaaS CMS customer, please check whether you need to revert the changes:
	1. Disable OwnerTenant attribute, do you need to enable it?
		2. ![](attachments/688987700/688987694.png)
		3. Change Identification rule to ‘No identification’ for 3 CI types, do you need to set it to default value?
		4. ![](attachments/688987700/688987696.png)
3. For enhanced CI lifecycle solution, there is a step to assign the attribute ‘metaphase’ for node element CI type with default value: **Inherited from the parent node**. You may need to set the default value to empty if you have done this step before, see the setting details: [https://docs.microfocus.com/doc/SMAX/23.4/EnableEnhancedCiAging#Configure\_metaphase\_for\_node\_elements\_in\_UCMDB](https://docs.microfocus.com/doc/SMAX/23.4/EnableEnhancedCiAging#Configure_metaphase_for_node_elements_in_UCMDB).
