您的位置:首页 > 数据库 > Oracle

通过Xen理解Oracle VM原理

2011-02-25 15:21 579 查看
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';


Copy the export dump file, test.dmp from the source system to /oracle/ora_backup

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;
/

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: