Oracle® Destribution
CREATE/DROP LINK
CREATE PUBLIC DATABASE LINK lottery_local1_dbdev01 
CONNECT TO lottery_local1 IDENTIFIED BY lottery_local1 
USING 'dbdev01';

select * from saldo@lottery_local1_dbdev01

select * from ALL_DB_LINKS

DROP DATABASE LINK lottery_local1_dbdev01
global user
CREATE USER fred 
IDENTIFIED GLOBALLY AS 'CN=fred adams,O=Oracle,C=England';
Синхронизация SCN
DECLARE
  tbl_name  VARCHAR2(100);
BEGIN

 FOR rec IN (SELECT * FROM ALL_TABLES
                    WHERE OWNER = 'LOTTERY_LOCAL1' AND NVL(TABLESPACE_NAME,'S') != 'USERS')  
 LOOP
      tbl_name := 'LOTTERY_LOCAL1.' || rec.table_name;
      Dbms_Output.put_line( tbl_name );

      BEGIN

      DBMS_APPLY_ADM.SET_TABLE_INSTANTIATION_SCN@csldb (
        source_object_name   => tbl_name
      , source_database_name => 'drouter'
      , instantiation_scn    => DBMS_FLASHBACK.GET_SYSTEM_CHANGE_NUMBER
      );
      exception
          when others then
             Dbms_Output.put_line('Unknown error:(' || SQLCODE || ')' || SQLERRM);
      END;
 END LOOP;
END;
Просмотр PROPAGATION
SELECT p.propagation_name, p.SOURCE_QUEUE_OWNER ||'.'||
p.SOURCE_QUEUE_NAME ||'@'||
g.GLOBAL_NAME "Source Queue",
p.DESTINATION_QUEUE_OWNER ||'.'||
p.DESTINATION_QUEUE_NAME ||'@'||
p.DESTINATION_DBLINK "Destination Queue"
FROM DBA_PROPAGATION p, GLOBAL_NAME g;
-
Hosted by uCoz