ORACLE Physical Standby 级联备库搭建

搭建oracle 级联DG

现在db与dg1是一套DG ,在此基础上搭建级联备库:

数据库版本 11.2.0.4 db_name=prod db为主库,dg1为备库,dg2为级联备库;
DB_UNIQUE_NAME DATABASE_ROLE
db primary 10.100.12.10
dg1 standby1 10.100.12.11
dg2 standby2 10.100.12.12

三个库的LOG_FILE_NAME_CONVERT,DB_FILE_NAME_CONVERT路径一致
############################ 主库db参数文件设置 #########################################

主库db的参数文件如下:
db_name=prod
instance_name=db
db_unique_name=db
*.FAL_CLIENT=‘db‘
*.FAL_SERVER=‘dg1‘
*.LOG_ARCHIVE_CONFIG=‘DG_CONFIG=(db,dg1,dg2)‘;
*.LOG_ARCHIVE_DEST_1=‘LOCATION=/arch VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=db‘
*.LOG_ARCHIVE_DEST_2=‘SERVICE=dg1 SYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=dg1‘
*.LOG_ARCHIVE_DEST_STATE_1=‘ENABLE‘
*.LOG_ARCHIVE_DEST_STATE_2=‘ENABLE‘
*.STANDBY_FILE_MANAGEMENT=‘AUTO‘
*.DB_FILE_NAME_CONVERT=‘db‘,‘dg1‘
*.LOG_FILE_NAME_CONVERT=‘db‘,‘dg1‘

############################### 备库dg1 ####################################################
备库dg1的参数文件如下
db_name=prod
instance_name=dg1
db_unique_name=dg1
*.FAL_CLIENT=‘dg1‘
*.FAL_SERVER=‘db‘
*.LOG_ARCHIVE_CONFIG=‘DG_CONFIG=(db,dg1,dg2)‘;
*.LOG_ARCHIVE_DEST_1=‘LOCATION=/arch VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=dg1‘
*.LOG_ARCHIVE_DEST_2=‘SERVICE=dg2 SYNC VALID_FOR=(STANDBY_LOGFILES,STANDBY_ROLE) DB_UNIQUE_NAME=dg2‘
*.LOG_ARCHIVE_DEST_STATE_1=‘ENABLE‘
*.LOG_ARCHIVE_DEST_STATE_2=‘ENABLE‘
*.STANDBY_FILE_MANAGEMENT=‘AUTO‘
*.DB_FILE_NAME_CONVERT=‘db‘,‘dg1‘
*.LOG_FILE_NAME_CONVERT=‘db‘,‘dg1‘

################################ 备库dg2 参数 ################################################
在主库上做备份,传至备库dg2,源数据库为主库
复制主库db的参数文件至dg2,并做修改,restore standby controlfile并启动备库dg2至mount状态

主库dg2上运行:
rman target sys/[email protected] auxiliary sys/[email protected]
duplicate target database for standby nofilenamecheck from active database;

备库dg2的参数文件如下
db_name=prod
instance_name=dg2
db_unique_name=dg2
*.FAL_CLIENT=‘dg2‘
*.FAL_SERVER=‘dg1‘
*.LOG_ARCHIVE_CONFIG=‘DG_CONFIG=(db,dg1,dg2)‘;
*.LOG_ARCHIVE_DEST_1=‘LOCATION=/arch VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=dg1‘
*.LOG_ARCHIVE_DEST_STATE_1=‘ENABLE‘

*.DB_FILE_NAME_CONVERT=‘dg1‘,‘dg2‘
*.LOG_FILE_NAME_CONVERT=‘dg1‘,‘dg2‘

Cascaded Redo Transport Destinations
A cascaded redo transport destination (also known as a terminal destination) receives primary database redo indirectly from a standby database rather than directly from a primary database.
A physical standby database that cascades primary database redo to one or more terminal destinations at the same time it is applying changes to its local database files is known as a cascading standby database.
With cascading, the overhead associated with performing redo transport is offloaded from a primary database to a cascading standby database.
A cascading standby database can cascade primary database redo to up to 30 terminal destinations.

db到dg1是归档日志与在线日志同步,dg1到dg2只能通过归档日志同步,所以必须在dg切换日志,dg2才会接受到日志并同步数据

原文地址:https://www.cnblogs.com/elontian/p/9424865.html

时间: 2024-11-05 16:12:03

ORACLE Physical Standby 级联备库搭建的相关文章

oracle11g dataguard物理备库搭建

Dataguard 环境: 操作系统:Redhat6.4 Primary数据库: IP 地址:192.168.1.122 数据库SID:ora11g DB_UNIQUE_NAME:ora11g_primary Standby数据库: IP 地址:192.168.1.123 数据库SID:ora11g DB_UNIQUE_NAME:ora11g_standby (注:oracle数据库版本是11.2.0.1.0) 1.Primary端的配置 (1).检查数据库是否支持 Data Guard(企业版

oracle 利用flashback将备库激活为read wirte(10g 及上)

oracle 利用flashback将备库激活为read wirte(10g 及上) 环境: OS: CENTOS 6.5 X64 DB: ORACLE 10.2.0.5 主库操作: SQL> alter system switch logfile; System altered. SQL> 备库操作 取消归档应用 SQL> alter database recover managed standby database cancel; Database altered. SQL>

linux下oracle11G DG搭建(三):围绕备库搭建操作

环境 名称 主库 备库 主机名 bjsrv shsrv 软件版本 RedHat Enterprise5.5.Oracle 11g 11.2.0.1 RedHat Enterprise5.5.Oracle 11g 11.2.0.1 三.围绕备库操作: 1.备库-修改初始化参数文件 $cd$ORACLE_HOME/dbs $df -h $vi initshdb.ora 修改简要说明: *.audit_file_dest='/u01/app/oracle/admin/sh/adump' //审计文件存

【原创】oracle ORA-01157 ORA-01110 DataGuard 备库 临时表空间报错

简要: 当查询数据库数据时,提示临时表空间异常,报错ORA-01157 ORA-01110,经过对数据文件处理后,已经解决此故障. 环境:Oracle 11g RAC For Linux 6,该库为DataGuard备库 1. 查询数据时报错,如下: ERROR:ORA-01157: cannot identify/lock data file 226 - see DBWR trace fileORA-01110: data file 226: '+DG_DATA02/racdb/blsp_te

linux下oracle11G DG搭建(三):环绕备库搭建操作

环境 名称 主库 备库 主机名 bjsrv shsrv 软件版本号 RedHat Enterprise5.5.Oracle 11g 11.2.0.1 RedHat Enterprise5.5.Oracle 11g 11.2.0.1 三.环绕备库操作: 1.备库-改动初始化參数文件 $cd$ORACLE_HOME/dbs $df -h $vi initshdb.ora 改动简要说明: *.audit_file_dest='/u01/app/oracle/admin/sh/adump' //审计文件

DG搭建逻辑备库

逻辑备库是在物理备库的基础上搭建的,所以需要先搭建好物理备库. 备库执行如下操作: [[email protected] ~]$ sqlplus / as sysdba SQL*Plus: Release 11.2.0.3.0 Production onFri Nov 7 15:03:30 2014 Copyright (c) 1982, 2011, Oracle.  All rights reserved. Connected to: Oracle Database 11g Enterpris

搭建逻辑备库

1. 搭建物理备库 2. 在物理备库上停止重做应用,如果备库是RAC,则必须停止所有执行以下语句以外的实例 SQL> alter database recover managed standby database cancel; Database altered. 3. 为角色转换准备主库 这一步仅在执行切换时有用 修改初始化参数: alter system set LOG_ARCHIVE_DEST_1='LOCATION=/oradata/arch/ VALID_FOR=(ONLINE_LOG

Oracle DG之--构建Physical Standby

Oracle DG之--构建Physical Standby 系统环境: 操作系统: RedHat EL4 Oracle:    Oracle 10.2.0.1.0                                   从以上图中所示:主库为bj(db_unique_name),备库为sh. 案例分析:  本案例采用RMAN Duplicate方式建立standby database. 一.配置主备库初始化参数 主库的初始化参数:initbj.ora [[email protect

做dg备库执行duplicate target database for standby nofilenamecheck报RMAN-06023

RMAN duplicate for standby失败解决过程在用rman duplicate to standby 生成备库的时候总是不成功,多次尝试均是下面的错误:RMAN> duplicate target database for standby nofilenamecheck;Starting Duplicate Db at 16-JAN-2013 12:22:45using target database control file instead of recovery catal