流的下游复制更简单

add new table with simple step:

SQL> set numwidth 20

SQL> select dbms_flashback.get_system_change_number() from dual;

DBMS_FLASHBACK.GET_SYSTEM_CHANGE_NUMBER()

-----------------------------------------

8331188817820

$> expdp sgreports/sgreports tables=sgreports.test2 directory=expdir logfile=test2.log dumpfile=test2.dmp flashback_scn=8331188817820

                  

On the destination system:

1. As the system user, create the Oracle directory for the export dump file. Make sure the physical directory exists on the filesystem.

     create directory impdir as '/oracle/ora_backup';
  1. Copy the export dump file, test.dmp from the source system to /oracle/ora_backup

  2. scp test2.dmp [email protected]:/oracle/ora_backup

3. Import the application schema:

$> impdp system/sys directory=impdir dumpfile=test2.dmp logfile=test2.log

connect strmadmin/strmadmin@stream1
BEGIN     DBMS_STREAMS_ADM.ADD_TABLE_RULES(                 
   table_name     => 'sgreports.test2',                      
     streams_type   => 'capture',                           
           streams_name   => 'capture_stream1',             
                queue_name     => 'capture_stream1_queue',  
                     include_dml    => true,                
                       source_database=>'henry.sun.net',    
                         include_ddl    => true,            
                             inclusion_rule => true);       
                               END;                         
/

BEGIN DBMS_STREAMS_ADM.ADD_TABLE_RULES( table_name => 'sgreports.test2', streams_type => 'apply', streams_name => 'apply_stream11', queue_name => 'capture_stream1_queue', include_dml => true, include_ddl => true, source_database => 'henry.sun.net', inclusion_rule => true); END; /

你可能感兴趣的:(复制)