When running cleanup.sql or ora_cleansp, you see the following errors in the cleanup.sql part:
SQL> @cleansup
SP2-0310: unable to open file "cleansup.sql"
SQL> !pwd
SQL> @cleanup
SQL>
SQL> /*
DOC> * @(#) $Header: /project/splex/RCS/tools_Oracle/cleanup.sql,v 1.11 2005/11/29 02:11:07 kwong Exp $
DOC> * @(#) $Source: /project/splex/RCS/tools_Oracle/cleanup.sql,v $
DOC> */
SQL>
SQL> /*
DOC> * CR 17494. Add shareplex_loglist table
DOC> */
SQL>
SQL> /* cleanup tables used by shareplex */
SQL>
SQL> truncate table shareplex_config;
truncate table shareplex_config
*
ERROR at line 1:
ORA-04020: deadlock detected while trying to lock object
SYS.CDC_ALTER_CTABLE_BEFORE
SQL> truncate table shareplex_objmap;
truncate table shareplex_objmap
*
ERROR at line 1:
ORA-04020: deadlock detected while trying to lock object
SYS.CDC_ALTER_CTABLE_BEFORE
SQL> truncate table shareplex_rowidmap;
truncate table shareplex_rowidmap
*
ERROR at line 1:
ORA-04020: deadlock detected while trying to lock object
SYS.CDC_ALTER_CTABLE_BEFORE
SQL> update shareplex_actid set actid=0, seqno=0, offset=0, instance_name = '', host_name = '', ab_flag = 0, que_seq_no_1 = 0, que_seq_no_2 = 0, sp_thread_msg_seq = 0, sp_thread_msg_seq_wrap = 0, command = '', activation_flag = 0, log_start_offset=0;
1 row updated.
SQL> truncate table shareplex_trans;
truncate table shareplex_trans
*
ERROR at line 1:
ORA-04020: deadlock detected while trying to lock object
SYS.CDC_ALTER_CTABLE_BEFORE
SQL> truncate table shareplex_command;
truncate table shareplex_command
Possible Oracle bug.
Possible Oracle bug. Metalink points to a bug # 3017048 which has been fixed in 10.1.0.2. See document ID 360509.1 for further details.
As a workaround, run the database in restricted mode and then run cleanup.sql.