Oracle 11g dataguard主库备份恢复到测试环境单库报错

1,启动Oracle实例报错: SQL> startup nomount ORA-32004: obsolete or deprecated parameter(s) specified for RDBMS instance ORA-00439: feature not enabled: Managed Standby SQL> SQL> startup nomount; ORA-32004: obsolete or deprecated parameter(s) specified for RDBMS instance ORA-00439: feature not enabled: Managed Standby SQL> 2,后台alert日志trac日志报错如下: ORA-00439: feature not enabled: Managed Standby Thu Dec 03 11:39:24 2015 Starting ORACLE instance (normal) LICENSE_MAX_SESSION = 0 LICENSE_SESSIONS_WARNING = 0 Picked latch-free SCN scheme 3 Errors in file /oracle/app/oracle/diag/rdbms/pdunq/powerdes/trace/powerdes_ora_5717.trc: ORA-00439: feature not enabled: Managed Standby

分析:是启动参数报错的缘故,要修改完善下启动参数。

3,导出参数文件 SQL> create pfile='/oracle/pfile1203.ora' from spfile; File created. SQL>

参数文件内容如下:

powerdes.__db_cache_size=3087007744 powerdes.__java_pool_size=67108864 powerdes.__large_pool_size=67108864 powerdes.__oracle_base='/oracle/app/oracle'#ORACLE_BASE set from environment powerdes.__pga_aggregate_target=3959422976 powerdes.__sga_target=7449083904 powerdes.__shared_io_pool_size=0 powerdes.__shared_pool_size=4026531840 powerdes.__streams_pool_size=134217728 *.audit_file_dest='/oracle/app/oracle/admin/powerdes/adump' *.audit_sys_operations=TRUE *.audit_trail='NONE' *.compatible='11.2.0.0.0' *.control_files='/home/oradata/powerdes/control01.ctl','/oracle/app/oracle/flash_recovery_area/powerdes/control02.ctl' *.db_block_size=8192 *.db_domain='' *.db_file_name_convert='/home/oradata/powerdes','/home/oradata/pwerdes' *.db_name='powerdes' *.db_recovery_file_dest='/oracle/app/oracle/flash_recovery_area' *.db_recovery_file_dest_size=16106127360 *.db_unique_name='pdunq' *.diagnostic_dest='/oracle/app/oracle' *.dispatchers='(PROTOCOL=TCP) (SERVICE=powerdesXDB)' *.fal_client='PD' *.fal_server='PD_DG' *.global_names=FALSE *.job_queue_processes=1000 *.log_archive_config='DG_CONFIG=(pdunq,pddgunq)' *.log_archive_dest_1='LOCATION=/oracle/app/oracle/flash_recovery_area/archivelog VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=pdunq' *.log_archive_dest_2='SERVICE=PD_DG VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=pddgunq lgwr sync affirm' *.log_archive_dest_3='' *.log_archive_dest_state_1='ENABLE' *.log_archive_dest_state_2='defer' *.log_archive_dest_state_3='ENABLE' *.log_archive_format='%t_%s_%r.dbf' *.log_archive_max_processes=20 *.log_archive_start=FALSE *.log_file_name_convert='/home/oradata/powerdes','/home/oradata/powerdes' *.memory_target=11379146752 *.open_cursors=300 *.optimizer_index_caching=90 *.optimizer_index_cost_adj=25 *.optimizer_mode='FIRST_ROWS' *.processes=1000 *.remote_login_passwordfile='EXCLUSIVE' *.sessions=335 *.standby_file_management='AUTO' *.undo_tablespace='UNDOTBS1'

里面有很多关于dataguard的配置信息,需要去掉

4,修改参数文件

去掉archive_dest:

*.log_archive_config='DG_CONFIG=(pdunq,pddgunq)' *.log_archive_dest_2='SERVICE=PD_DG VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=pddgunq lgwr sync affirm' *.log_archive_dest_3='' *.log_archive_dest_state_2='defer' *.log_archive_dest_state_3='ENABLE' *.log_file_name_convert='/home/oradata/powerdes','/home/oradata/powerdes'

去掉fal

*.fal_client='PD' *.fal_server='PD_DG'

去掉standby

*.standby_file_management='AUTO'

保存为pfile1203_01.ora:

powerdes.__db_cache_size=3087007744 powerdes.__java_pool_size=67108864 powerdes.__large_pool_size=67108864 powerdes.__oracle_base='/oracle/app/oracle'#ORACLE_BASE set from environment powerdes.__pga_aggregate_target=3959422976 powerdes.__sga_target=7449083904 powerdes.__shared_io_pool_size=0 powerdes.__shared_pool_size=4026531840 powerdes.__streams_pool_size=134217728 *.audit_file_dest='/oracle/app/oracle/admin/powerdes/adump' *.audit_sys_operations=TRUE *.audit_trail='NONE' *.compatible='11.2.0.0.0' *.control_files='/home/oradata/powerdes/control01.ctl' *.db_block_size=8192 *.db_domain='' *.db_file_name_convert='/home/oradata/powerdes','/home/oradata/pwerdes' *.db_name='powerdes' *.db_recovery_file_dest='/oracle/app/oracle/flash_recovery_area' *.db_recovery_file_dest_size=16106127360 *.db_unique_name='pdunq' *.diagnostic_dest='/oracle/app/oracle' *.dispatchers='(PROTOCOL=TCP) (SERVICE=powerdesXDB)' *.global_names=FALSE *.job_queue_processes=1000 *.log_archive_dest_1='LOCATION=/oracle/app/oracle/flash_recovery_area/archivelog VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=pdunq' *.log_archive_dest_state_1='ENABLE' *.log_archive_format='%t_%s_%r.dbf' *.log_archive_max_processes=20 *.log_archive_start=FALSE *.log_file_name_convert='/home/oradata/powerdes','/home/oradata/powerdes' *.memory_target=11379146752 *.open_cursors=300 *.optimizer_index_caching=90 *.optimizer_index_cost_adj=25 *.optimizer_mode='FIRST_ROWS' *.processes=1000 *.remote_login_passwordfile='EXCLUSIVE' *.sessions=335 *.undo_tablespace='UNDOTBS1' 5,重新生成参数文件 SQL> create spfile from pfile='/oracle/pfile1203_01.ora'; File created. SQL> #建立默认的参数文件 SQL> create pfile from spfile; File created. SQL> 6,重新启动到nomount SQL> startup nomount; ORA-32004: obsolete or deprecated parameter(s) specified for RDBMS instance ORACLE instance started. Total System Global Area 1.1358E+10 bytes Fixed Size 2216744 bytes Variable Size 8254393560 bytes Database Buffers 3087007744 bytes Redo Buffers 13946880 bytes SQL> 7,开始恢复控制文件 RMAN> restore controlfile to '/home/oradata/powerdes/control01.ctl' from '/oracle/ctl_auto/c-3391761643-20151202-02'; Starting restore at 03-DEC-15 using target database control file instead of recovery catalog allocated channel: ORA_DISK_1 channel ORA_DISK_1: SID=771 device type=DISK channel ORA_DISK_1: restoring control file channel ORA_DISK_1: restore complete, elapsed time: 00:00:01 Finished restore at 03-DEC-15 RMAN> 8,加载到mount RMAN> alter database mount; database mounted released channel: ORA_DISK_1 RMAN> 9,使用Catalog命令注册RMAN备份集 RMAN> catalog start with '/oracle/2015-12-02/'; Starting implicit crosscheck backup at 03-DEC-15 allocated channel: ORA_DISK_1 channel ORA_DISK_1: SID=771 device type=DISK Crosschecked 6 objects Finished implicit crosscheck backup at 03-DEC-15 Starting implicit crosscheck copy at 03-DEC-15 using channel ORA_DISK_1 Crosschecked 2 objects Finished implicit crosscheck copy at 03-DEC-15 searching for all files in the recovery area cataloging files... no files cataloged searching for all files that match the pattern /oracle/2015-12-02/ List of Files Unknown to the Database ===================================== File Name: /oracle/2015-12-02/pfile01.ora File Name: /oracle/2015-12-02/rman_backup.log File Name: /oracle/2015-12-02/full_POWERDES_20151202_5052.bak File Name: /oracle/2015-12-02/cntrl_5053_1_897427575 File Name: /oracle/2015-12-02/cntrl_5055_1_897427607 Do you really want to catalog the above files (enter YES or NO)? YES cataloging files... cataloging done List of Cataloged Files ======================= File Name: /oracle/2015-12-02/full_POWERDES_20151202_5052.bak File Name: /oracle/2015-12-02/cntrl_5053_1_897427575 File Name: /oracle/2015-12-02/cntrl_5055_1_897427607 List of Files Which Where Not Cataloged ======================================= File Name: /oracle/2015-12-02/pfile01.ora RMAN-07517: Reason: The file header is corrupted File Name: /oracle/2015-12-02/rman_backup.log RMAN-07517: Reason: The file header is corrupted RMAN> 10,开始恢复整个库

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

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