How to create physical standby database with 11g RMAN DUPLICATE FROM ACTIVE DATABASE [ID 747250.1]

本文指导如何使用11g RMAN DUPLICATE FROM ACTIVE DATABASE创建物理备用数据库,包括安装Oracle到备用系统、更新tnsnames.ora文件及执行特定脚本。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

How to create physical standby database with 11g RMAN DUPLICATE FROM ACTIVE DATABASE [ID 747250.1]


Modified15-FEB-2011TypeHOWTOStatusPUBLISHED

In this Document
Goal
Solution


Applies to:

Oracle Server - Enterprise Edition - Version: 11.1.0.6 to 11.1.0.7 - Release: 11.1 to 11.1
Information in this document applies to any platform.
***Checked for relevance on 15-Feb-2011***

Goal

This note outlines the required steps to create a physical standby database using 11g RMAN DUPLICATE FROM ACTIVE DATABASE. The script is taken from Data Guard labs based on the 11g OBEs available from OTN.

Solution

Install Oracle on standby system.

Update tnsname.ora on primary & standby systems. In this example, Chicago is Primary and Boston is Standby.

tnsnames.ora (on both systems)

BOSTON =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = lcarpent.us.oracle.com)(PORT = 1521))
)
(CONNECT_DATA = (SERVICE_NAME = Boston.us.oracle.com))
)

CHICAGO =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = stadu67.us.oracle.com)(PORT = 1521))
)
(CONNECT_DATA = (SERVICE_NAME = Chicago.us.oracle.com))
)


Also, insert a static entry for Boston in the listener.ora file of the standby system.

SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = Boston.us.oracle.com)
(ORACLE_HOME = /scratch/OracleHomes/OraHome111)
(SID_NAME = Boston)
)
)

LISTENER =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = lcarpent.us.oracle.com)(PORT = 1521))
)


Then execute the following script on standby, assuming ASM is setup with +DATA and +FLASH disk groups:

source ./makeBoston

# Create temporary password file, must have same password as primary
orapwd file=/scratch/OracleHomes/OraHome111/dbs/orapwBoston password=oracle

# Create temporary parameter file
cat > /scratch/OracleHomes/OraHome111/dbs/tempini.ora <
db_name=temp
EOF

# Start up the auxiliary instance nomount
sqlplus '/ as sysdba' <
SET ECHO ON
STARTUP PFILE='/scratch/OracleHomes/OraHome111/dbs/tempini.ora' NOMOUNT;
EOF

rman <
set echo on
connect target sys/oracle@chicago; # Primary
connect auxiliary sys/oracle@boston; # Standby: tnsname used by primary

run {
allocate channel prmy1 type disk;
allocate channel prmy2 type disk;
allocate channel prmy3 type disk;
allocate channel prmy4 type disk;
allocate channel prmy5 type disk;
allocate auxiliary channel stby1 type disk;

duplicate target database for standby from active database
spfile
parameter_value_convert 'Chicago','Boston'
set 'db_unique_name'='Boston'
set standby_file_management='AUTO'
set db_create_file_dest='+DATA'
set db_recovery_file_dest='+FLASH'
set DB_RECOVERY_FILE_DEST_SIZE='8G'
set dg_broker_start='TRUE'
set control_files='+DATA/boston/controlfile/control01.ctl'
nofilenamecheck
;
}

EOF
exit 0


------------------------------------------------------------------------------

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值