I am trying to setup oracle streams by following the instructions in the link
below:
DB1 is on a solaris 2.8 machine running oracle 10.2.0.1.0
DB2 is on an AIX 5.2 machine running oracle 10.2.0.1.0
When I get to step number 10 in the documenation below I get the following
the error:
SQL> declare
2 source_scn number;
3 begin
4 source_scn := dbms_flashback.get_system_change_number();
5 dbms_apply_adm.set_table_instantiation_scn@DB2
6 ( source_object_name => 'pbh.taj',
7 source_database_name => 'DB1',
8 instantiation_scn => source_scn);
9 end;
10 /
declare
*
ERROR at line 1:
ORA-04052: error occurred when looking up remote object STRMADMIN.DBMS_APPLY_ADM@DB2.WORLD.COM
ORA-00604: error occurred at recursive SQL level 1
ORA-02085: database link DB2.WORLD.COM connects to AIXSNAP.WORLD.COM
Can somebody point me in the right direction and tell me what this error
means and how can I fix it. Note: where ever it says the user "scott" I
substitued the user "pbh", which is a valid user in both DB's and has
DBA privs
2. Create Stream administrator User
Source Database: DB1
SQL> conn sys@db1 as sysdba
Enter password:
Connected.
SQL> create user strmadmin identified by strmadmin;
6. Setup Schema for streams
Schema: SCOTT
Table: Taj
NOTE: Unlock scott schema because in 10g scott schema is locked by default
Source Database: DB1
SQL> conn sys@db1 as sysdba
Enter password:
Connected.
SQL> alter user scott account unlock identified by tiger;
User altered.
SQL> conn scott/tiger@db1
Connected.
SQL> create table TAJ ( no number primary key,name varchar2(20),ddate date);
Table created.
Target Database: DB2
SQL> conn sys@db2 as sysdba
Enter password:
Connected.
SQL> alter user scott account unlock identified by tiger;
User altered.
SQL> conn scott/tiger@db2
Connected.
SQL> create table TAJ ( no number primary key,name varchar2(20),ddate date);
Table created.
7. Setup Supplemental logging at the source database
Source Database: DB1
SQL> conn scott/tiger@db1
Connected.
SQL> alter table taj
2 add supplemental log data (primary key,unique) columns;
PL/SQL procedure successfully completed.
NOTE: Stream replication environment is ready, just needed to test it.
SQL> conn scott/tiger@db1
Connected.
SQL> --DDL operation
SQL> alter table taj add (flag char(1));
Table altered.
SQL> --DML operation
SQL> begin
2 insert into taj values (1,'first_entry',sysdate,1);
3 commit;
4 end;
5 /
PL/SQL procedure successfully completed.
SQL> conn scott/tiger@db2
Connected.
SQL> --TEST DDL operation
SQL> desc taj
Name Null? Type
----------------------------------------- -------- ----------------------------
NO NOT NULL NUMBER
NAME VARCHAR2(20)
DDATE DATE
FLAG CHAR(1)
SQL> --TEST DML operation
SQL> select * from taj;
NO NAME DDATE F
---------- -------------------- --------- -
1 first_entry 24-JAN-08 1
did you google that error and see the action required?
ORA-02085:
database link string connects to string
Cause: a database link connected to a database with a different name. The connection is rejected.
Action: create a database link with the same name as the database it connects to, or set global_names=false.
Bookmarks