1.创建单独的stream用表空间
db01
create tablespace stream datafile 'C:ORACLEPRODUCT10.2.0ORADATAdb01stream01.dbf' size 50m;
db02
create tablespace stream datafile 'C:ORACLEPRODUCT10.2.0ORADATAdb02stream01.dbf' size 50m;
2.创建stream管理用户
db01 and db02
create user streamadmin identified by ftp123 default tablespace stream;
3.授权
db01 and db02
grant dba to streamadmin;
execute DBMS_STREAMS_AUTH.GRANT_ADMIN_PRIVILEGE(grantee => 'streamadmin',grant_privileges => true);
4.初始化参数
db01 and db02
alter database force logging;
alter system set JOB_QUEUE_PROCESSES=50 scope=both;
alter system set PARALLEL_MAX_SERVERS=64 scope=both;
alter system set processes=1000 scope=spfile;
alter system set GLOBAL_NAMES=true;
alter system set aq_tm_processes=1;
alter system set STREAMS_POOL_SIZE=200m;
5.创建database link 在streamadmin用户下,或者创建public db link
on db01
create database link db02 connect to streamadmin identified by ftp123 using 'db02';
on db02
create database link db01 connect to streamadmin identified by ftp123 using 'db01';
6.create test schema
on db01
create user test identified by test ;
grant connect,resource to test;
create table test.t1(id number(2),name varchar2(20) default 'NO');
create table test.t2(id number(2),name varchar2(20) default 'YES');
on db02
create user test identified by test ;
grant connect,resource,imp_full_database to test;
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/3618/viewspace-485581/ ,如需转载,请注明出处,否则将追究法律责任。