WEB开发网
开发学院数据库Oracle Oracle Stream配置详细步骤 阅读

Oracle Stream配置详细步骤

 2008-11-10 13:00:05 来源:WEB开发网   
核心提示: 以下是引用片段:Sqlplus ‘/ as sysdba’alter system set aq_tm_processes=2 scope=both;alter system set global_names=true scope=both;alter system

以下是引用片段:

  Sqlplus ‘/ as sysdba’
  alter system set aq_tm_processes=2 scope=both;
  alter system set global_names=true scope=both;
  alter system set job_queue_processes=10 scope=both;
  alter system set parallel_max_servers=20 scope=both;
  alter system set undo_retention=3600 scope=both;
  alter system set nls_date_format='YYYY-MM-DD HH24:MI:SS' scope=spfile;
  alter system set streams_pool_size=25M scope=spfile;
  alter system set utl_file_dir='*' scope=spfile;
  alter system set open_links=4 scope=spfile;

执行完毕后重启数据库。

3.2 将数据库置为归档模式

设置log_archive_dest_1到相应的位置;设定log_archive_start为TRUE,即启用自动归档功能;设定log_archive_format指定归档日志的命令格式。

举例:

以下是引用片段:

  sqlplus ‘/ as sysdba’
  alter system set log_archive_dest_1=’location=/yang/arch’ scope=spfile;
  alter system set log_archive_start=TRUE scope=spfile;
  alter system set log_archive_format=’ arch%t_%s_%r.arc’ scope=spfile;
  shutdown immediate;
  startup mount;
  alter database archivelog;
  alter database open;

数据库置为归档模式后,可以按如下方式检验一下:

以下是引用片段:

  SQL> archive log list
  Database log mode Archive Mode
  Automatic archival Enabled
  Archive destination /yang/arch
  Oldest online log sequence 534
  Next log sequence to archive 536
  Current log sequence 536

3.3 创建stream 管理用户

3.3.1 创建主环境stream管理用户

以下是引用片段:

  #以sysdba身份登录
  connect / as sysdba
  #创建主环境的Stream专用表空间
  create tablespace tbs_stream datafile '/yang/oradata/prod/tbs_stream01.dbf'
  size 100m autoextend on maxsize unlimited segment space management auto;
  #将logminer的数据字典从system表空间转移到新建的表空间,防止撑满system表空间
  execute dbms_logmnr_d.set_tablespace('tbs_stream');
  #创建Stream管理用户
  create user strmadmin identified by strmadmin
  default tablespace tbs_stream temporary tablespace temp;
  #授权Stream管理用户
  grant connect,resource,dba,aq_administrator_role to strmadmin;
  begin
  dbms_streams_auth.grant_admin_privilege(
  grantee => 'strmadmin',
  grant_privileges => true);
  end;

/

上一页  1 2 

Tags:Oracle Stream 配置

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