WEB开发网
开发学院数据库Oracle Oracle数据库10gR2中stream多源复制方法 阅读

Oracle数据库10gR2中stream多源复制方法

 2008-09-02 12:45:45 来源:WEB开发网   
核心提示: a 源库与目标库初始化参数的设置 alter system set aq_tm_processes=4 scope=spfile;alter system set job_queue_processes=5 scope=spfile;alter system set global_name

a 源库与目标库初始化参数的设置

  alter system set aq_tm_processes=4 scope=spfile;
  alter system set job_queue_processes=5 scope=spfile;
  alter system set global_names=true scope=spfile;
  alter system set streams_pool_size=51m scope=spfile;

说明streams_pool_size在生产环境中最好>200m

b 源库与目标库tnsnames.ora配置

确保正确,可用tnsping通

c 源库与目标库复制管理员的创建

  create user strmadmin identified by strmadminpw
  default tablespace &tbs_name quota unlimited on &tbs_name;
  grant connect, resource, dba to strmadmin;

d 源库与目标库创建互连的数据链

  connect strmadmin/strmadminpw@test96;
  create database link test99.net connect to strmadmin
  identified by strmadminpw using ’test99’;
  connect strmadmin/strmadminpw@test99;
  create database link test96.net connect to strmadmin
  identified by strmadminpw using ’test96’;

说明:必须确保双方的数据库链是可以连通.

用pre_instantiation_setup/post_instantiation_setup过程时

db link必须用db_name.domain的格式

e 源库与目标库必须处于归档模式

  shutdown immediate;
  startup mount;
  alter database archivelog;
  alter database open;

f 源库与目标库必须创建directory

create directory dir_test96 as ’/home/oracle/worksh’;

create directory dir_test99 as ’/home/oracle/worksh’;

2.在源库执行MAINTAIN_GLOBAL过程

  SQL>connect strmadmin/strmadminpw@test96;
  begin
  dbms_streams_adm.maintain_global(
  source_directory_object => ’dir_test96’,
  destination_directory_object => ’dir_test99’,
  source_database => ’test96.net’,
  destination_database => ’test99.net’,
  perform_actions => true,
  include_ddl => true,
  instantiation => DBMS_STREAMS_ADM.INSTANTIATION_FULL_NETWORK);
  end;

说明:在执行maintain_global时,源库与目标库必须创建directory,然后在源库执行, 目标库几乎什么都不用做,stream环境已经配置完毕。

上一页  1 2 3 4 5 6 

Tags:Oracle 数据库 gR

编辑录入:爽爽 [复制链接] [打 印]
赞助商链接