| « | 七月 2008 | » | ||||
|---|---|---|---|---|---|---|
| 一 | 二 | 三 | 四 | 五 | 六 | 日 |
| 1 | 2 | 3 | 4 | 5 | 6 | |
| 7 | 8 | 9 | 10 | 11 | 12 | 13 |
| 14 | 15 | 16 | 17 | 18 | 19 | 20 |
| 21 | 22 | 23 | 24 | 25 | 26 | 27 |
| 28 | 29 | 30 | 31 | |||
oracle stream 系列文章- 2-测试案例,准备环境
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;