Problem dropping a MASTER REPGROUP for change in global_name
943521Jun 13 2012 — edited Aug 16 2012Hi All,
I have a problem in the last steps of peer to peer replication.
Some time ago I tried to do replication on mi databases, being its global_name = 'data.data'. It was unsuccessful, and ended up dropping its database links. That time I created a repgroup called 'repgr' and added my tables on it.
Time passed and after some readings I tried again with a new global_name on the database = 'data'. For this I created the repgroup 'siterep' and added indexes, procedures, functions... Everything executed ok until I reached the tables.
It informed me that they were already created.
Checking on the view all_repobject i saw that they were created with the old group when the database had its old global_name. with the group 'repgr'.
I tried to drop the master repobject on the table:
BEGIN
DBMS_REPCAT.DROP_MASTER_REPOBJECT (type => 'TABLE', oname => '<tablename>', sname => '<schema>',drop_objects => FALSE);
END;
/
With it I get:
ERROR at line 1:
ORA-23312: not the masterdef according to DATA
ORA-06512: at "SYS.DBMS_SYS_ERROR", line 86
ORA-06512: at "SYS.DBMS_REPCAT_UTL4", line 2938
ORA-06512: at "SYS.DBMS_REPCAT_UTL4", line 2727
ORA-06512: at "SYS.DBMS_REPCAT", line 643
ORA-06512: at line 2
I tried to relocate the master def according with the oracle docs about the error:
begin
dbms_repcat.relocate_masterdef(
gname => 'rep_gr',
old_masterdef => 'data.data',
new_masterdef => 'data',
notify_masters => false,
include_old_masterdef => false);
end;
/
but I get the error :
ERROR at line 1:
ORA-23313: object group "PUBLIC"."rep_gr" is not mastered at DATA
ORA-06512: at "SYS.DBMS_SYS_ERROR", line 105
ORA-06512: at "SYS.DBMS_REPCAT_UTL", line 2911
ORA-06512: at "SYS.DBMS_REPCAT_UTL4", line 892
ORA-06512: at "SYS.DBMS_REPCAT_UTL4", line 2863
ORA-06512: at "SYS.DBMS_REPCAT_MAS", line 3314
ORA-06512: at "SYS.DBMS_REPCAT", line 818
ORA-06512: at line 2
But when I check this error, it tells me that I have to add_master_database, so I did:
BEGIN
DBMS_REPCAT.ADD_MASTER_DATABASE (
gname => 'rep_gr',
master => 'data.data',
use_existing_objects => TRUE,
copy_rows => FALSE,
propagation_mode => 'ASYNCHRONOUS');
END;
/
and I get:
ERROR at line 1:
ORA-23312: not the masterdef according to DATA
ORA-06512: at "SYS.DBMS_SYS_ERROR", line 86
ORA-06512: at "SYS.DBMS_REPCAT_MAS", line 891
ORA-06512: at "SYS.DBMS_REPCAT_MAS", line 2146
ORA-06512: at "SYS.DBMS_REPCAT", line 146
ORA-06512: at line 2
returning to the first error...
How can I change the repgroup of the tables from 'rep_gr' to 'siterep'?
I tried removing the master databases for the group 'rep_gr', but same error...
I believe that the error is that it does not let me erase a group that was not created in the same database. But since I changed the global_name, that 'data.data' database does not exist anymore.
How can I resolve this problem?
Thanks,
Hector