Link to home
Start Free TrialLog in
Avatar of milan_novkovic
milan_novkovicFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Oracle Replication: Invalid username/password on RESUME_MASTER_ACTIVITY

Hi everyone,
I'm trying to set up multi-master replication on Oracle 10.2.0.1.0 by using steps listed on http://www.akadia.com/services/ora_replication_guide.html . Database names are QS10DB0 and QS10DB1 and they are on different servers in same LAN. Replication group is called REPG which I created on QS10DB0 and added another master database which is QS10DB1. Looking into DBA_REPSITES everything looks ok by me.

SQL> select gname,DBLINK from dba_repsites;

GNAME
------------------------------
DBLINK
----------------------------------------------------

REPG
QS10DB0

REPG
QS10DB1

I've came to the point where DBA_REPCATLOG has cleared and I try to execute RESUME_MASTER_ACTIVITY on QS10DB0.

When I do this I get:

SQL> BEGIN
  2     DBMS_REPCAT.RESUME_MASTER_ACTIVITY (
  3       gname => 'REPG');
  4  END;
  5  /
BEGIN
*
ERROR at line 1:
ORA-04052: error occurred when looking up remote object SYS.SYS@QS10DB1
ORA-00604: error occurred at recursive SQL level 2
ORA-01017: invalid username/password; logon denied
ORA-02063: preceding line from QS10DB1
ORA-06512: at "SYS.DBMS_REPCAT_UTL4", line 119
ORA-06512: at "SYS.DBMS_REPCAT_UTL4", line 554
ORA-06512: at "SYS.DBMS_REPCAT_MAS", line 3533
ORA-06512: at "SYS.DBMS_REPCAT", line 826
ORA-06512: at line 2

I guess QS10DB0 can't connect to QS10DB1 because of  user account problems but I don't know how to fix it. Both databases were created as clones from a cold copy so they should be same.

Any help would be appreciated.
SOLUTION
Avatar of schwertner
schwertner
Flag of Antarctica image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of milan_novkovic

ASKER

I think tnsnames.ora is ok since I can connect to one database from other server and vice versa using sqlplus and TOAD.

It looks like this (I changed server names):


QS10DB1 =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = server1)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = QS10DB1)
    )
  )

QS10DB0 =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = server0)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = QS10DB0)
    )
  )
@MohanKNair

I've created database links using steps from tutorial I listed in my initial post. I did the following:

connect sys/pass@QS10DB0;
CREATE PUBLIC DATABASE LINK QS10DB1 USING '(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(COMMUNITY=TCP)(PROTOCOL=TCP)(Host=server1)(Port=1521)))(CONNECT_DATA=(SID=QS10DB1)))';
CONNECT repadmin/repadmin@QS10DB0;
CREATE DATABASE LINK QS10DB1 CONNECT TO repadmin IDENTIFIED BY repadmin USING 'QS10DB1';

CONNECT sys/pass@QS10DB1 as sysdba;
CREATE PUBLIC DATABASE LINK QS10DB0 USING '(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(COMMUNITY=TCP)(PROTOCOL=TCP)(Host=server1)(Port=1521)))(CONNECT_DATA=(SID=QS10DB0)))';
CONNECT repadmin/repadmin@QS10DB1;
CREATE DATABASE LINK QS10DB0 CONNECT TO repadmin IDENTIFIED BY repadmin USING 'QS10DB0';
I tries creating public database links, it seems I haven't created it correctly previosly. So now I'm getting follow error when trying to execute RESUME_MASTER_ACTIVITY:

SQL> BEGIN
  2     DBMS_REPCAT.RESUME_MASTER_ACTIVITY (
  3       gname => 'REPG');
  4  END;
  5  /
BEGIN
*
ERROR at line 1:
ORA-23358: invalid remote user
ORA-06512: at "SYS.DBMS_SYS_ERROR", line 79
ORA-06512: at "SYS.DBMS_REPCAT_RPC", line 12
ORA-06512: at "SYS.DBMS_REPCAT_RPC", line 1783
ORA-06512: at "SYS.DBMS_REPCAT_UTL4", line 119
ORA-06512: at "SYS.DBMS_REPCAT_UTL4", line 554
ORA-06512: at "SYS.DBMS_REPCAT_MAS", line 3533
ORA-06512: at "SYS.DBMS_REPCAT", line 826
ORA-06512: at line 2

Ok, it working now! I've recreated dblinks, recreated replication support and RESUME_MASTER_ACTIVITY executed without errors. Data is being replicated between two databases now.

I'll split points between schwertner and MohanKNair but give MohanKNair more because he's answer helped me more to solve my problem.

Thanks