开发学院数据库Oracle Oracle9i DataGuard的安装与维护 阅读

Oracle9i DataGuard的安装与维护

 2008-06-12 12:42:48 来源:WEB开发网   
核心提示:一、安装 环境: Primary 数据库:sun01 Standby 数据库:sun02 Oracle_Sid:bnet 1. 拷贝$ORACLE_BASE 到新机器上 2. 让Primary数据库处于归档模式,对Primary数据库做一个Rman热备份startup mountalter database archi

一、安装

环境:

Primary 数据库:sun01

Standby 数据库:sun02

Oracle_Sid:bnet

1. 拷贝$ORACLE_BASE 到新机器上

2. 让Primary数据库处于归档模式,对Primary数据库做一个Rman热备份  startup mount
  alter database archivelog;
  archive log list;
  rman target sys/oracle
  backup database format "/....";

3.创建Data Guard数据库控制文件alter database create standby controlfile as '/....ctl';

4.设置监听  Primary:
  bnetguard =
  ( (DESCRIPTION =
  (ADDRESS_LIST =
  (ADDRESS = (PROTOCOL = TCP)(HOST = sun02)(PORT = 1522))
  )
  (CONNECT_DATA =
  (SERVER = DEDICATED)
  (SERVICE_NAME = bnet)
  )
  )
  Standby:
  listener.ora
  LISTENER =
  (DESCRIPTION_LIST =
  (DESCRIPTION =
  (ADDRESS_LIST =
  (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
  )
  (ADDRESS_LIST =
  (ADDRESS = (PROTOCOL = TCP)(HOST = sun01)(PORT = 1522))
  )
  )
  )
  tnsname.ora
  bnet =
  ( (DESCRIPTION =
  (ADDRESS_LIST =
  (ADDRESS = (PROTOCOL = TCP)(HOST = sun02)(PORT = 1522))
  )
  (CONNECT_DATA =
  (SERVER = DEDICATED)
  (SERVICE_NAME = bnet)
  )
  )

5. 设置主机参数

alter database force logging;

主库强制归档

主机参数:  fal_client=bnetguard
  fal_server=bnet
  standby_file_management=auto
  remote_login_passwordfile=exclusive

备机参数:  db_file_name_convert
  log_file_name_convert
  standby_file_management='AUTO'
  standby_archive_dest=/export/home/oracle/oradata/bnet/arch

6.创建standby 数据库  orapwd
  sqlplus "sys/oracle as sysdba"
  startup nomount pfile='''
  alter database mount standby database;
  exit
  rman target sys/oracle nocatalog
  restore database

7.设置自动归档alter system set log_archive_dest_2='server=bnetguard reopen=200'

8.启动Data Guard自动恢复状态  sqlplus "sys/oracle as sysdba"<
  recover managed standby database;
  exit
  EOF

9.测试alter system archive log current;

二、维护:

使Standby 数据库处与 read-only状态reover cancel/recover managed standby database cancel;

取消恢复模式alter database open read only;

启动数据库到只读状态recover standby database;

使数据库切换到恢复模式recover managed standby database time out 15;

如果超过15分钟没有传日志  Restarting dead background process QMN0
  "Restarting dead background process QMN" message can continually
  appear in the alert log during startup in RAC environment.
  Workaround:
  Set aq_tm_processes=0 in the init.ora.
  It can be set to desired value through
  "alter system set aq_tm_processes=n" once the database is open completely.
  alter database activate standby database;

Tags:Oraclei DataGuard

编辑录入:爽爽 [复制链接] [打 印]
[]
  • 好
  • 好的评价 如果觉得好,就请您
      0%(0)
  • 差
  • 差的评价 如果觉得差,就请您
      0%(0)
更多精彩
    赞助商链接

    热点阅读
      焦点图片
        最新推荐
          精彩阅读