# Disable-Native-SACM-manually_686073918
## Introduction

When moving tenants, if the source tenant has Native SACM enabled and the target tenant only needs the data from the source tenant and doesn't want Native SACM. This topic describes how to disable Native SACM manually.

## Instructions

To disable Native SACM manually, follow these steps:

1. In the database, run the following SQL command:  
	```
	UPDATE maas_admin."TenantSettings_<Tenant_ID>" set body = body || '{"value": "false"}' where body->>'key'='ENABLE_CMSX'
	```
2. In a web browser, go to https://<hostname>/sap/rest-client?TENANTID=<Tenant\_ID>.  
	**NOTE**: Replace <hostname> and <Tenant\_ID> with the FQDN of the SaaS farm and the tenant ID, respectively.
3. ![](attachments/686073918/686073898.png)
4. Select **POST** as the request method and click **Send**.
5. In the bo\_ats database, run the following SQL command:  
	```
	UPDATE bo_db_user.tenant_entity set native_sacm_enabled='false' where id='<Tenant_ID>'
	```
	  
	Replace <Tenant\_ID> with the actual tenant ID.
6. Restart platform offline pod to shutdown the websocket client.

**(In SMAX version 24.2 and later where the offline ng pod is adopted by default, the following actions are also required to finish disabling Native SACM)**

## Restart the offline NG pod

Restart the pod to release the task listener:

`kubectl rollout restart deployment itom-xruntime-platform-offline-ng -n $(kubectl get namespace |grep itsma | cut -f1 -d " ")`

## Delete the Native SACM rabbitmq queue for for the tenant

1. Enter the rabbitmq pod:  
	`kubectl exec infra-rabbitmq-0 -c itom-xruntime-rabbitmq -n $(kubectl get namespace |grep itsma | cut -f1 -d " ")` ` -it bash`
2. Check if the queues exist:  
	`rabbitmqctl list_queues --vhost xservices4|grep WorkerTask_CMSX|awk -F' ' '{print $1}' |grep <tenantId>`
3. Delete the queues for the specified tenant:  
	`rabbitmqctl delete_queue WorkerTask_CMSXSystemElementQueue_<tenantId> --vhost xservices4`  
	`rabbitmqctl delete_queue WorkerTask_CMSXServiceComponentQueue_<tenantId>  --vhost xservices4`  
	`rabbitmqctl delete_queue WorkerTask_CMSXDeviceQueue_<tenantId> --vhost xservices4`  
	`rabbitmqctl delete_queue WorkerTask_CMSXActualServiceQueue_<tenantId> --vhost xservices4`

## Attachments:

[image-2025-1-21\_14-13-22.png](attachments/686073918/686073898.png) (image/png)
