Unregistering IQ Bot from the Control Room
- Updated: 2022/11/08
Unregistering IQ Bot from the Control Room
You have to unregister IQ Bot from the Control Room if the IQ Bot URL changes because of installation or uninstallation of IQ Bot, or when a load balancer is added.
Procedure
- Using the sysadmin role, run two separate SQL queries in different databases.
-
Run the first set of SQL statements in the Control Room
database to delete the following data:
Run the following SQL statements for versions A2019.10 to A2019.13:
DELETE FROM [AAE-Database].[dbo].[ACTIVEMQ_ACKS]
DELETE FROM [AAE-Database].[dbo].[ACTIVEMQ_MSGS]
DELETE FROM [AAE-Database].[dbo].[SERVICE_USER]
DELETE FROM [AAE-Database].[dbo].[USERS] where user_type='APP'
Run the following SQL statements for version A2019.14 and later:- Run the following query:
USE [AAE-Database] SELECT T.uuid As TenantID,T.name AS TenantName,T.created_by,T.enabled,U.id AS IQBotAppUserId,U.user_type,S.url AS IQBotURL FROM [dbo].[TENANTS] T LEFT JOIN [dbo].[USERS] U ON T.uuid = U.tenant_uuid LEFT JOIN [dbo].[SERVICE_USER] S ON U.id = S.id WHERE (U.user_type='APP' AND S.type='IQBOT')
- The above query will provide you an 'IQBotAppUserId' number. Replace id = 'IQBotAppUserId'.
- Execute the following delete queries:
DELETE FROM [AAE-Database].[dbo].[SERVICE_USER] WHERE [type]='IQBOT'
-
DELETE FROM [AAE-Database].[dbo].[USERS] WHERE id = 'IQBotAppUserId'
- Run the following query:
-
Run the second set of SQL statements in the IQ Bot
configuration database to delete the following data:
-
DELETE FROM [IQBot].[dbo].[Configurations] where [key]='controlRoomVersion'
-
DELETE FROM [IQBot].[dbo].[Configurations] where [key]='appRegistered'
-
DELETE FROM [IQBot].[dbo].[Configurations] where [key]='controlRoomUrl'
-
DELETE FROM [IQBot].[dbo].[Configurations] where [key]='appId'
You have unregistered successfully. -