RAC环境下DataGuard到单机(3)

orapwd file=/$ORACLE_HOME/dbs/orapwJSTDB1 password=oracle force=y ignorecase=y
scp /$ORACLE_HOME/dbs/orapwJSTDB1 rac2:/$ORACLE_HOME/dbs/orapwJSTDB2
scp /$ORACLE_HOME/dbs/orapwJSTDB1 standby:/u01/app/oracle/dbs/orapwJSTDB


13.拷贝参数文件到备库,并修改相关内容;
@主库
scp /u01/rman/initJSTDB.ora standby:/u01/app/oracle/dbs/initJSTDB.ora
@备库
vi /u01/app/oracle/dbs/initJSTDB.ora
*.audit_file_dest='/u01/app/oracle/admin/JSTDG1/adump'
*.audit_trail='db'
*.compatible='11.2.0.0.0'

*.control_files='/u01/app/oracle/oradata/JSTDG1/control01.ctl','/u01/app/oracle/oradata/JSTDG1/control02.ctl','/u01/app/oracle/oradata/JSTDG1/control03.ctl'
*.db_block_size=8192
#*.db_create_file_dest='/u01/app/oracle/oradata/'
#*.db_create_online_log_dest_1='/u01/app/oracle/oradata/onlinelog/'
*.db_domain=''
*.db_file_name_convert='+DATA/JSTDB/','/u01/app/oracle/oradata/JSTDG1/'
*.db_name='JSTDB'
*.db_unique_name='JSTDG1'
*.db_recovery_file_dest=''
*.fal_client='JSTDG1'
*.fal_server='JSTDB'
*.log_archive_config='DG_CONFIG=(JSTDB,JSTDG1)'
*.log_archive_dest_1='LOCATION=/u01/arch/JSTDG1/ VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=JSTDG1'
*.log_archive_dest_2='SERVICE=JSTDB LGWR ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=JSTDB'
*.log_archive_format='arch_%r_%t_%s.arc'
*.log_archive_dest_state_1='ENABLE'
*.log_archive_dest_state_2='ENABLE'
*.log_archive_max_processes=8


*.log_file_name_convert='+DATA/JSTDB/onlinelog/','/u01/app/oracle/oradata/JSTDG1/onlinelog/','+FRA/JSTDB/onlinelog/','/u01/app/oracle/oradata/JSTDG1/onlinelog/','+FRA/JSTDB/ARCHIVELOG/','/u01/arch/JSTDG1/'
*.open_cursors=300
*.processes=150
*.remote_login_passwordfile='SHARED'
*.standby_file_management='AUTO'
*.undo_management='AUTO'
undo_tablespace='UNDOTBS1'


14.把备库启动到nomount状态;
export ORACLE_SID=JSTDB
sqlplus / as sysdba
startup nomount pfile='/u01/app/oracle/dbs/initJSTDB.ora';
create spfile from pfile='/u01/app/oracle/dbs/initJSTDB.ora'; 

15.恢复备库的控制文件;
rman target /
restore standby controlfile from '/u01/rman/ctl01.ctl'; 

16.收集RAC数据库的信息;

col file_name for a70
select file_name, file_id from dba_data_files; 

FILE_NAME  FILE_ID
---------------------------------------------------------------------- ----------
+DATA/jstdb/datafile/system.259.9079385031
+DATA/jstdb/datafile/sysaux.260.9079385092
+DATA/jstdb/datafile/undotbs1.261.9079385153
+DATA/jstdb/datafile/undotbs2.263.9079385254
+DATA/jstdb/datafile/users.264.9079385275
4 rows selected.

17.备份主库全库(仅供保险备份,不是拷贝到standby);
rman target /

backup format '/u01/rman/JSTDB/fulldb_%d_%U' database include current controlfile plus archivelog delete input; 

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/ed3c8279b70dc1ab8c97673ed663bc12.html