dg rac 到单机配置

举报
snowofsummer 发表于 2021/09/19 21:26:41 2021/09/19
【摘要】 1,主数据库参数设置(zmsft)--主备都设置alter system set log_archive_config='dg_config=(zmsft,zmsftdg)';--主设置alter system set log_archive_dest_3='service=zmsftdg valid_for=(online_logfiles,primary_role) db_unique_...

1,主数据库参数设置(zmsft)

--主备都设置
alter system set log_archive_config='dg_config=(zmsft,zmsftdg)';
--主设置
alter system set log_archive_dest_3='service=zmsftdg valid_for=(online_logfiles,primary_role) db_unique_name=zmsftdg';
--主设置
alter system set log_archive_dest_state_3 = 'enable';

2,备参数文件设置

*.audit_file_dest='/u01/app/oracle/admin/zmsft/adump'
*.audit_trail='NONE'
*.background_dump_dest='/u01/app/oracle/diag/rdbms/zmsftdg/zmsftdg/trace'#Deprecate parameter
*.compatible='11.2.0.4.0'
*.control_files='/zmsft/control01.ctl'
*.core_dump_dest='/u01/app/oracle/diag/rdbms/zmsftdg/zmsftdg/cdump'
*.db_block_size=8192
*.db_domain=''
*.db_file_name_convert='+NEWDATA/newzmsft/datafile','/zmsft','+NEWDATA/zmsft/datafile','/zmsft','+NEWDATA/zmsft/tempfile','/zmsft'
*.db_files=2000
*.db_name='zmsft'
*.db_unique_name='zmsftdg'
*.deferred_segment_creation=FALSE
*.diagnostic_dest='/u01/app/oracle'
*.fal_server='zmsft'
*.log_archive_config='dg_config=(zmsft,zmsftdg)'
*.log_archive_dest_1='location=/zmsftarch'
*.log_archive_format='%t_%s_%r.dbf'
*.log_buffer=53469184# log buffer update
*.log_file_name_convert='+NEWDATA/zmsft/onlinelog','/zmsft'
*.memory_max_target=30G
*.memory_target=30G
*.open_cursors=4000
*.optimizer_dynamic_sampling=2
*.optimizer_mode='ALL_ROWS'
*.pga_aggregate_target=0
*.plsql_warnings='DISABLE:ALL'# PL/SQL warnings at init.ora
*.processes=1200
*.query_rewrite_enabled='TRUE'
*.remote_login_passwordfile='EXCLUSIVE'
*.result_cache_max_size=78656K
*.sessions=1824
*.skip_unusable_indexes=TRUE
*.standby_file_management='auto'

3,相关命令

$ 启动日志应用进程
alter database recover managed standby database disconnect from session
/
$ 取消日志用用
recover managed standby database cancel;
$ 检查同步状态
set linesize 1000;
set pagesize 500
select sequence#,FIRST_TIME,NEXT_TIME,applied from v$archived_log
/

4,监听文件配置

#配置RAC的SCAN地址
zmsft =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 10.1.0.66)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = zmsft)
    )
  )

zmsftdg =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 10.1.0.70) (PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = zmsftdg)
    )
  )

静态监听配置

$ cat listener.ora
LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 10.1.0.70)(PORT = 1521))
    )
  )
SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (GLOBAL_DBNAME =zmsftdg)
      (ORACLE_HOME = /u01/app/oracle/product/11.2)
      (SID_NAME = zmsftdg)
    )
  )

【版权声明】本文为华为云社区用户原创内容,转载时必须标注文章的来源(华为云社区)、文章链接、文章作者等基本信息, 否则作者和本社区有权追究责任。如果您发现本社区中有涉嫌抄袭的内容,欢迎发送邮件进行举报,并提供相关证据,一经查实,本社区将立刻删除涉嫌侵权内容,举报邮箱: cloudbbs@huaweicloud.com
  • 点赞
  • 收藏
  • 关注作者

评论(0

0/1000
抱歉,系统识别当前为高风险访问,暂不支持该操作

全部回复

上滑加载中

设置昵称

在此一键设置昵称,即可参与社区互动!

*长度不超过10个汉字或20个英文字符,设置后3个月内不可修改。

*长度不超过10个汉字或20个英文字符,设置后3个月内不可修改。