RMAN--同duplicate指令在同一主机上建standby db

有一同事在做standby DB的测试,但遇到一些问题,这里帖上简单的步骤做记录,记得很久之前做过。不过没有找到当时的笔记,有时间再做一次测试。

1.@primary
create a standby control file:
rman
connect target /
backup current controlfile for standby format='c:testbackupstby_cfile.%U';

switch logfile and record the log sequence or scn
sqlplus /nolog
conn / as sysdba
alter system switch logfile;
alter system switch logfile;
select sequence# from v$archived_log;

2.@standby
create directory stucture for standby database:
$DATA_HOME
$ARCH_HOME
$DUMP_HOME

3.@primary
Create the pfile for standby database on the primary database

sqlplus /nolog
conn / as sysdba
create pfile ='backup_dir/pfile/init.ora' from spfile;
exit
cp /backup_dir/pfile/init.ora /stdy/pfile/init.ora

4.@standby
modify the standby init.ora
control_files=
background_dump_dest=
user_dump_dest=
log_archive_dest_1=
standby_archive_dest=
lock_name_space=stby
remote_login_passwordfile=exclusive
db_file_name_convert=('primary','stby')
log_file_name_convert=('primary','stby')

5.@standby
create password file
orapwd file= passowrd= entries=

6.@standby
nomount standby database
sqlplus /nolog
conn / as sysdba
startup nomount pfile=/stdy/pfile/init.ora

7.@standby
configure listener.ora and tnsnames.ora and start listener

8.@primary
perform duplicate
rman
connect target /
connect auxiliary sys/password@stby
run{
set until sequence=888 thread=1;
duplicate target database for standby derecover;
}

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/29987/viewspace-51986/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/29987/viewspace-51986/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值