By Mouhamadou Diaw

During a consulting on a customer, we faced the following issue when trying to delete a dbhome

Message:  DCS-10001:Internal error encountered: PRGO-2470 : Working copy “OraDB19000_home1” is involved in an incomplete move or upgrade operation

The result of the job is shown below

[2022-11-08 10:53:35 root@odaserverb]# odacli describe-job -i 671b5899-02ac-45ff-b5af-ee254ef0bc72

Job details
----------------------------------------------------------------
                     ID:  671b5899-02ac-45ff-b5af-ee254ef0bc72
            Description:  Database Home OraDB19000_home1 Deletion with id a1bfe23e-2569-407b-8b87-7af9f9f586bf
                 Status:  Failure
                Created:  October 26, 2022 6:45:49 AM CEST
                Message:  DCS-10001:Internal error encountered: PRGO-2470 : Working copy "OraDB19000_home1" is involved in an incomplete move or upgrade operation..

Task Name                                Start Time                          End Time                            Status
---------------------------------------- ----------------------------------- ----------------------------------- ----------
DbHome service deletion for a1bfe23e-2569-407b-8b87-7af9f9f586bf October 26, 2022 6:45:49 AM CEST    October 26, 2022 6:46:02 AM CEST    Failure
DbHome service deletion for a1bfe23e-2569-407b-8b87-7af9f9f586bf October 26, 2022 6:45:49 AM CEST    October 26, 2022 6:46:02 AM CEST    Failure
Validate dbhome a1bfe23e-2569-407b-8b87-7af9f9f586bf for deletion October 26, 2022 6:45:50 AM CEST    October 26, 2022 6:45:50 AM CEST    Success
Setting up ssh equivalance               October 26, 2022 6:45:52 AM CEST    October 26, 2022 6:45:55 AM CEST    Success
Setting up ssh equivalance               October 26, 2022 6:45:55 AM CEST    October 26, 2022 6:45:58 AM CEST    Success
Deleting DbHome by RHP                   October 26, 2022 6:45:58 AM CEST    October 26, 2022 6:46:02 AM CEST    Failure

After researches on the net, we found following Oracle document

ODA: Create-prepatchreport fails with PRGP-1005 – cannot specify databases (Doc ID 2900263.1)

This document is not about the same issue, but we can find inside that the table MOVE in the database MySQL should be empty in a normal state.

According this document if this table contains rows, it indicates that a move have failed in the past. Indeed we did an upgrade dbhome which failed.

So we decided to follow the steps described in this document and then retry the delete dbhome.

We just want to inform that we do these steps at our own risks and that it’s up to you to execute or not following commands  without Oracle support

As we are using an HA ODA, we do following tasks on both nodes

We first connect to the MySQL Metadata repository

[2022-11-08 10:54:07 root@odaserverb]# cd /opt/oracle/dcs/mysql/bin
[2022-11-08 11:31:58 root@odaserverb]# ./mysql -u root --socket=/opt/oracle/dcs/mysql/log/mysqldb.sock

We then locate on wich database is the table MOVE

mysql> select table_schema as database_name, table_name
    -> from information_schema.tables
    -> where table_type = 'BASE TABLE'
    ->     and lower(table_name) like '%move%'
    -> order by table_schema,
    ->     table_name;
+---------------+------------+
| database_name | TABLE_NAME |
+---------------+------------+
| GHSUSER23     | MOVE       |
+---------------+------------+
1 row in set (0.00 sec)

Let’s connect to the GHSUSER23 database and let’s query the table MOVE. And we can see the table is not empty.

mysql>use GHSUSER23;

mysql> select NAME,SRCWC,SRCHOME,DSTWC,DSTHOME from MOVE;
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------------+------------------------------------------------------+------------------+------------------------------------------------------+
| NAME                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         | SRCWC            | SRCHOME                                              | DSTWC            | DSTHOME                                              |
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------------+------------------------------------------------------+------------------+------------------------------------------------------+
| 0xACED0005737200116A6176612E7574696C2E48617368536574BA44859596B8B7340300007870770C000000103F400000000000017400084F4643434D50524578                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           | OraDB19000_home1 | /u01/app/odaorahome/oracle/product/19.0.0.0/dbhome_1 | OraDB19000_home2 | /u01/app/odaorahome/oracle/product/19.0.0.0/dbhome_2 |
| 0xACED0005737200116A6176612E7574696C2E48617368536574BA44859596B8B7340300007870770C000000023F400000000000017401354F4643434D5052453B4F7261444231393030305F686F6D65313B2F7530312F6170702F6F64616F7261686F6D652F6F7261636C652F70726F647563742F31392E302E302E302F6462686F6D655F313B4F7261444231393030305F686F6D65323B2F7530312F6170702F6F64616F7261686F6D652F6F7261636C652F70726F647563742F31392E302E302E302F6462686F6D655F323B6F7261636C653B31392E302E302E302E303B5241433B747275653B4E4F545F5350454349464945443B4E4F545F5350454349464945443B66616C73653B4E4F545F5350454349464945443B66616C73653B66616C73653B69726973646576707265613A44425F504F53545F55534552414354494F4E535F535543434553532B69726973646576707265623A53544152545F534552564943455F5355434345535378 | OraDB19000_home1 | /u01/app/odaorahome/oracle/product/19.0.0.0/dbhome_1 | OraDB19000_home2 | /u01/app/odaorahome/oracle/product/19.0.0.0/dbhome_2 |
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------------+------------------------------------------------------+------------------+------------------------------------------------------+
2 rows in set (0.00 sec)

We  decided to empty the table MOVE, but we did a copy before

mysql> create table MOVE_BCK as select * from MOVE;

mysql> select NAME,SRCWC,SRCHOME,DSTWC,DSTHOME from MOVE_BCK;
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------------+------------------------------------------------------+------------------+------------------------------------------------------+
| NAME                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         | SRCWC            | SRCHOME                                              | DSTWC            | DSTHOME                                              |
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------------+------------------------------------------------------+------------------+------------------------------------------------------+
| 0xACED0005737200116A6176612E7574696C2E48617368536574BA44859596B8B7340300007870770C000000103F400000000000017400084F4643434D50524578                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           | OraDB19000_home1 | /u01/app/odaorahome/oracle/product/19.0.0.0/dbhome_1 | OraDB19000_home2 | /u01/app/odaorahome/oracle/product/19.0.0.0/dbhome_2 |
| 0xACED0005737200116A6176612E7574696C2E48617368536574BA44859596B8B7340300007870770C000000023F400000000000017401354F4643434D5052453B4F7261444231393030305F686F6D65313B2F7530312F6170702F6F64616F7261686F6D652F6F7261636C652F70726F647563742F31392E302E302E302F6462686F6D655F313B4F7261444231393030305F686F6D65323B2F7530312F6170702F6F64616F7261686F6D652F6F7261636C652F70726F647563742F31392E302E302E302F6462686F6D655F323B6F7261636C653B31392E302E302E302E303B5241433B747275653B4E4F545F5350454349464945443B4E4F545F5350454349464945443B66616C73653B4E4F545F5350454349464945443B66616C73653B66616C73653B69726973646576707265613A44425F504F53545F55534552414354494F4E535F535543434553532B69726973646576707265623A53544152545F534552564943455F5355434345535378 | OraDB19000_home1 | /u01/app/odaorahome/oracle/product/19.0.0.0/dbhome_1 | OraDB19000_home2 | /u01/app/odaorahome/oracle/product/19.0.0.0/dbhome_2 |
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------------+------------------------------------------------------+------------------+------------------------------------------------------+
2 rows in set (0.00 sec)

And then delete the rows

mysql> delete from MOVE;
Query OK, 2 rows affected (0.00 sec)

mysql> commit;
Query OK, 0 rows affected (0.00 sec)

We then retried the delete dbhome

[2022-11-08 12:05:19 root@odaservera]# odacli list-dbhomes;

ID                                       Name                 DB Version                               Home Location                                 Status
---------------------------------------- -------------------- ---------------------------------------- --------------------------------------------- ----------
a1bfe23e-2569-407b-8b87-7af9f9f586bf     OraDB19000_home1     19.14.0.0.220118                         /u01/app/odaorahome/oracle/product/19.0.0.0/dbhome_1 FAILED
06d87fc9-7ebb-4944-aefa-a18f82100506     OraDB19000_home2     19.16.0.0.220719                         /u01/app/odaorahome/oracle/product/19.0.0.0/dbhome_2 CONFIGURED

And we run the delete-dbhome command on one node

[2022-11-08 12:05:25 root@odaservera]# odacli delete-dbhome -i a1bfe23e-2569-407b-8b87-7af9f9f586bfAnd the

A few minutes after the job finished successfully

[2022-11-08 12:07:33 root@odaservera]# odacli describe-job -i 79ec29f2-24c8-4bc1-a674-695e81127f0a

Job details
----------------------------------------------------------------
                     ID:  79ec29f2-24c8-4bc1-a674-695e81127f0a
            Description:  Database Home OraDB19000_home1 Deletion with id a1bfe23e-2569-407b-8b87-7af9f9f586bf
                 Status:  Success
                Created:  November 8, 2022 12:05:41 PM CET
                Message:

Task Name                                Start Time                          End Time                            Status
---------------------------------------- ----------------------------------- ----------------------------------- ----------
Validate dbhome a1bfe23e-2569-407b-8b87-7af9f9f586bf for deletion November 8, 2022 12:05:41 PM CET    November 8, 2022 12:05:41 PM CET    Success
Setting up ssh equivalance               November 8, 2022 12:05:43 PM CET    November 8, 2022 12:05:46 PM CET    Success
Setting up ssh equivalance               November 8, 2022 12:05:46 PM CET    November 8, 2022 12:05:49 PM CET    Success
Deleting DbHome by RHP                   November 8, 2022 12:05:49 PM CET    November 8, 2022 12:07:53 PM CET    Success

And we validate with the list-dbhomes

[2022-11-08 12:07:57 root@odaservera]# odacli list-dbhomes;

ID                                       Name                 DB Version                               Home Location                                 Status
---------------------------------------- -------------------- ---------------------------------------- --------------------------------------------- ----------
06d87fc9-7ebb-4944-aefa-a18f82100506     OraDB19000_home2     19.16.0.0.220719                         /u01/app/odaorahome/oracle/product/19.0.0.0/dbhome_2 CONFIGURED

Conclusion

Hope this blog help