ITPub博客

首页 > Linux操作系统 > Linux操作系统 > RMAN--同duplicate指令在同一主机上建standby db

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

原创 Linux操作系统 作者:vongates 时间:2019-06-20 12:45:07 0 删除 编辑
有一同事在做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/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2018-09-11

  • 博文量
    449
  • 访问量
    293558