`
wsql
  • 浏览: 11807546 次
  • 性别: Icon_minigender_1
  • 来自: 深圳
文章分类
社区版块
存档分类
最新评论

流的下游复制更简单

 
阅读更多

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 oracle@nazar.prc.sun.com:/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; /

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics