Deleting Components in Bulk
Component Deletion Using an XML File
Entries of the following format should be included in the XML file that is created exclusively for deleting multiple components of different types from the eG Enterprise system:
<?xml version="1.0" encoding="UTF-8"?>
<Component action="deletion">
<Agent>
<Component1 to be deleted>
</Agent>
<Agent>
<Component2 to be deleted>
</Agent>
.
.
.
.
</Component>
For example, to remove an Oracle and a Microsoft SQL database server from the eG Enterprise system, use the following specification:
<?xml version="1.0" encoding="UTF-8"?>
<Component action="delete">
<Agent>
<componenttype>Oracle database</componenttype>
<hostip>192.168.10.8</hostip>
<componentname>oracle8</componentname>
<port>1521</port>
<sid>egora</sid>
</Agent>
<Agent>
<componenttype>Microsoft SQL</componenttype>
<hostip>192.168.10.9</hostip>
<componentname>mssql</componentname>
<port>1433</port>
</Agent>
</Component>
If you wish to use the hostname of the Orace and Microsoft SQL database server from the eG Enterprise system instead of the IP address of the host, then use the following specification:
<?xml version="1.0" encoding="UTF-8"?>
<Component action="delete">
<Agent>
<componenttype>Oracle database</componenttype>
<hostname>egurkha25</hostname>
<componentname>oracle8</componentname>
<port>1521</port>
<sid>egora</sid>
</Agent>
<Agent>
<componenttype>Microsoft SQL</componenttype>
<hostname>egurkha26</hostname>
<componentname>mssql</componentname>
<port>1433</port>
</Agent>
</Component>
As already stated, if an Oracle database server is added with multiple SIDs, then the eG Enterprise system will monitor each SID as a different Oracle server. Therefore, while removing an Oracle database server that supports multiple SIDs, each SID should be treated as a different Oracle server, and a separate specification for each SID should be included in the XML file. For example, say, an Oracle database server has been added with the following SIDs: egdemo,egora. To remove this Oracle server completely, your XML file should contain the following entries:
<?xml version="1.0" encoding="UTF-8"?>
<Component action="delete">
<Agent>
<componenttype>Oracle database</componenttype>
<hostip>192.168.10.8</hostip>
<componentname>oracle8</componentname>
<port>1521</port>
<sid>egdemo</sid>
</Agent>
<Agent>
<componenttype>Oracle database</componenttype>
<hostip>192.168.10.8</hostip>
<componentname>oracle8</componentname>
<port>1521</port>
<sid>egora</sid>
</Agent>
</Component>
Once the XML file is created on the orchestrator’s host, invoke the following command from the orchestrator to delete all the components specified in the XML file:
eGCLI DelComponent -managerid <ManagerID> -file <Fullpath_to_the_XML_file>
For example:
eGCLI DelComponent -managerID mgr153 -file c:\delcomp.xml
Note:
- Each deletion entry should be included within the main <Component></Component> block only.
- A single XML file should not contain more than one <Component></Component> block.
- An XML file that is created for deleting component details should not include sections pertaining to any other operation.
- A single XML file can be used for deleting components of different types.
- Components included in a zone, segment, or service cannot be deleted.
Component Deletion Using a CSV File
The components to be deleted simultaneously from the eG Enterprise system should be included in a CSV file that is created exclusively for this purpose.
Such a CSV file should contain entries of the following format:
Element,action
Component,delete
componenttype,hostip/hostname,componentname,port
<Component1 to be deleted>
<Component2 to be deleted>
.
.
.
For example, if you want to delete an Oracle and an MS SQL server together using their respective host IPs, then your CSV file should include the following entries:
Element,action
Component,delete
componenttype,hostip,componentname,port,sid
Oracle database,192.168.10.96,ora96,1521,egora
Microsoft SQL,192.168.10.173,sql173,1433,
If you want to delete an Oracle and an MS SQL server together using their respective host names, then your CSV file should include the following entries:
Element,action
Component,delete
componenttype,hostname,componentname,port,sid
Oracle database,egurkha25,ora96,1521,egora
Microsoft SQL,egurkha26,sql173,1433,
As already stated, if an Oracle database server is added with multiple SIDs, then the eG Enterprise system will monitor each SID as a different Oracle server. Therefore, while removing an Oracle database server that supports multiple SIDs, each SID should be treated as a different Oracle server, and a separate specification for each SID should be included in the CSV file. For example, say, an Oracle database server has been added with the following SIDs: egdemo,egora. To remove this Oracle server completely, your CSV file should contain the following entries:
Element,action
Component,delete
componenttype,hostip,componentname,port,sid
Oracle database,192.168.10.96,ora96,1521,egora
Oracle database,192.168.10.96,ora96,1521,egdemo
Note:
Components included in a zone, segment, or service cannot be deleted.