Introduction
This document describes the methods in order to clear the duplicated subnetwork in Cisco Prime Optical (CPO) through Oracle Database.
Prerequisites
Requirements
Cisco recommends that you have knowledge of these topics:
Components Used
This document is not restricted to specific software and hardware versions.
The information in this document was created from the devices in a specific lab environment. All of the devices used in this document started with a cleared (default) configuration. If your network is live, ensure that you understand the potential impact of any command.
Background Information
You might observe this issue in 9.6.3 software release and normally occurs if someone accidentally creates a subnetwork which is part of another group in CPO.
The software version of the CPO used here is: 9.6.3 Server:9.6.3 Build:403 Patches:4 (large).
Duplicate Subnetwork TestDwdm
Issue (with Example):You have a duplicate subnetwork TestDwdm and you need to delete it as shown in the image.

From the image, it can be seen that the subnetwork TestDwdm is available under zoneDWDM group as well as WestZoneDWDM group:
Note:Duplicate subnetwork is under WestZoneDWDM group, as it is unwanted subnet.
You need to delete the subnetwork TestDwdm from WestZoneDWDM group by logging into the Oracle DB.
Solution
First method in order to clear the duplicate subnetwork:
Step 1. Select duplicate subnetwork and click Edit.
Step 2. Select Delete from the Edit. (select the duplicate subnetwork > EDIT > DELETE).
In some cases, even if you delete the duplicate subnetwork from CPO by the mentioned steps, it can reappear once you refresh the CPO.
In that case, you can try to follow these steps in order to delete the subnetwork:
Step 1. In order to open the duplicated subnetwork, double-click the subnetwork.
Step 2. Select all the nodes under the duplicated subnetwork, then right click and mark the nodes as out of service.
Step 3. Delete the nodes one by one from the Edit tab in CPO.
Note: Don’t select the delete all option from Edit tab, since it deletes the nodes from the active and duplicate subnetworks.
In some case, these two options do not work and in that case you need to delete the duplicate subnetwork by logging into the Oracle DB.
This is a known bug and the procedure in order to clear the issue is described here with reference to the mentioned example.
In this example, you need to delete the subnetwork TestDwdm from WestZoneDWDM group by logging into the Oracle DB.
Procedure to delete the duplicate subnetwork by logging into Oracle DB (screenshots of each step are also attached):
Step1. Log in to the Oracle database as shown in the image.
root@PObackupS ~] # su – cporacle
cporacle@PObackupS ~] $ sqlplus / as sysdba

Step 2. Get the group id from the group name with the command and as shown in the image.
SQL> select groupid from group_info_table where groupname=<duplicated subtended group name>;

This step is used in order to find out the group id allotted for the duplicate subnetwork.
Note: In this example, the group name is TestDwdm, you must enter appropriate duplicate subtended group name.
The actual font size of the commands might differ from the given example.
Step 3. Get the PARENTID from the group id as shown in the image.
SQL>select * from domain_table where childid=<GROUPID>;

In this case, there are two subnetworks (one original and one duplicated), so each of these two subnetworks have different PARENTID’s.
Note: 143 is the CHILDID (GROUP ID) which you can derive from Step 2. This varies from case to case.
Step 4. Find out the group name from the PARENTID obtained from Step 3. and as shown in the image.
SQL> select groupname from group_info_table where groupid=<PARENTID>;

This is to confirm which PARENTID belongs to which group and find the duplicate subnetwork and delete accordingly.
Note: In this case, with this command, you can confirm that the PARENTID -124 is the duplicated subnetwork and which is present under WestZoneDWDM group in CPO. Here the groupid is the PARENTID which you can derive from Step 3.
The actual font size of the commands might differ from the given example.
Step 5. Delete the appropriate row from the Oracle DB and commit it as shown in the image.
SQL> delete from domain_table where treenodeid=<TREENODEID>;
SQL> commit;

Note: You can get the treenodeid for the duplicate subnetwork from Step 4. commit is a mandatory command.
Related Information
It is suggested to be known bug: CSCup57506 .
This bug is fixed in 10.3 software onwards.