How to remove unwanted connector from old restored DB

Document ID : KB000116097
Last Modified Date : 27/09/2018
Show Technical Document Details
Introduction:
We are building a new SOI 4.2 environment. To preserve all the customization we had in our old DB we have restored 4.0 DB from our old SOI environment to our 4.2 environment. Now we are seeing the old connector's from 4.0 environment on SOIUI and need to know how to remove them. All these unwanted connector's are showing online as well
Instructions:
- All of the old connector's are still showing online. To remove the data (CI and Alerts) published from these unwanted connector the connector's needs to be offline before they can be removed. The procedure below shows how to offline the connector's in the DB so that user's can remove them from the SOIUI\Administration\Connector Configuraiton by clicking the "Remove Connector" button so that SOI removes the connector and its related data properly.
- Run the following query to get the ConnectorID for the old unwanted connector's and write them down
  select * from ConnectorConfiguration
 Note: If it is a IFW (catalyst 2.5) connector like Spectrum then there will be ConnectorService entry for the SOI   Integration Service. Similarly a catalyst 3.x connector also going have an entry. The                 connectorDesc column on the ConnectorConfiguration table tells you what connector it is. The ConnectorService entry on the MDRName column related to the unwanted connector also needs to be offlined     before you can remove. 
- I am going to use two connector's CA:00005 (spectrum) and CA:00050 (UIM) as an example, each of these connector will have two entries in ConnectorConfiguration table. Run the above select query to get     the ConenctorID for all four entries. Lets say the ConnectorID's for four connector you need to remove are 1, 2, 3, and 4. We need to update two columns Status and ConnectorStatusDesc on the                   ConnectorConfiguration table to make these four connector appear offline on the SOIUI\Administration\Connector Configuration.  Use the following SQL query to update
    
Update ConnectorConfiguration set Status=0,ConnectorStatusDesc='No heartbeat message was received for this connector in over 200 seconds. Setting status to Offline' where ConnectorID='<connector id>'

- Once you run the above SQl query for all four of the connector entries in our example will show as offline. Now you can remove these connector's from SOIUI\Administration\Connector Configuration by clicking on the "Remove Connector". If you have lot of data from these connector's then you may see "Remove Connector" button getting highlighted again which means it couldn't remove all data, in this case you'll have click "Remove Connector" button again. In some cases you may have to click on "Remove Connector" button 4/5 times before the connector is removed from the GUI.

- If you want to you can also use soitoolbox instead of clicking on "Remove Connector" button to remove the connector and its data. To do this use --cleanImportedData with soitoolbox, you'll need -c option to identify the connector's. You can prevent soitoolbox from timing out by using large enough timeout value with -t option. soitoolbox --help will provide more detail.