ITPub博客

首页 > Linux操作系统 > Linux操作系统 > oracle stream 系列文章- 2-测试案例,准备环境

oracle stream 系列文章- 2-测试案例,准备环境

原创 Linux操作系统 作者:wzy25 时间:2019-06-10 14:51:07 0 删除 编辑
oracle stream 系列文章- 2-测试案例,准备环境

准备stream 初始环境


用dbca建立两个数据库(10.2.0.1) ,分别为 db01和db02,同时打开归档模式

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博客 ” ,链接:http://blog.itpub.net/3618/viewspace-485581/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2001-12-14

  • 博文量
    1011
  • 访问量
    762728