当前位置:  数据库>oracle

Oracle 11g dataguard主库备份恢复到测试环境单库报错:ORA-19502: write error on file

    来源: 互联网  发布时间:2017-06-21

    本文导语: 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: ...

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,开始恢复整个库

因为前面恢复了整个spfile已经controlfile,所以接下来恢复所有库的话,就不用带参数,直接恢复restore database就可以 ; rman的restore恢复遇到这个诡异的问题了

RMAN> restore database;

Starting restore at 03-DEC-15
using channel ORA_DISK_1

skipping datafile 7; already restored to file /home/oradata/powerdes/pl01.dbf
channel ORA_DISK_1: starting datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_DISK_1: restoring datafile 00001 to /home/oradata/powerdes/system01.dbf
channel ORA_DISK_1: restoring datafile 00002 to /home/oradata/powerdes/sysaux01.dbf
channel ORA_DISK_1: restoring datafile 00003 to /home/oradata/powerdes/undotbs01.dbf
channel ORA_DISK_1: restoring datafile 00004 to /home/oradata/powerdes/users01.dbf
channel ORA_DISK_1: restoring datafile 00005 to /home/oradata/powerdes/powerdesk01.dbf
channel ORA_DISK_1: restoring datafile 00006 to /home/oradata/powerdes/plas01.dbf
channel ORA_DISK_1: restoring datafile 00008 to /home/oradata/powerdes/help01.dbf
channel ORA_DISK_1: restoring datafile 00009 to /home/oradata/powerdes/adobelc01.dbf
channel ORA_DISK_1: restoring datafile 00010 to /home/oradata/powerdes/sms01.dbf
channel ORA_DISK_1: restoring datafile 00011 to /home/oradata/powerdes/plcrm01.dbf
channel ORA_DISK_1: restoring datafile 00012 to /home/oradata/powerdes/powerdesk02.dbf
channel ORA_DISK_1: restoring datafile 00013 to /home/oradata/powerdes/datagm01.dbf
channel ORA_DISK_1: reading from backup piece /oracle/2015-12-02/full_POWERDES_20151202_5052.bak
channel ORA_DISK_1: ORA-19870: error while restoring backup piece /oracle/2015-12-02/full_POWERDES_20151202_5052.bak
ORA-19502: write error on file "/home/oradata/powerdes/plcrm01.dbf", block number 37952 (block size=8192)
ORA-27072: File I/O error
Linux-x86_64 Error: 25: Inappropriate ioctl for device
Additional information: 4
Additional information: 37952
Additional information: 425984

failover to previous backup

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 12/03/2015 15:21:51
RMAN-06026: some targets not found - aborting restore
RMAN-06023: no backup or copy of datafile 4 found to restore
RMAN-06023: no backup or copy of datafile 3 found to restore
RMAN-06023: no backup or copy of datafile 2 found to restore
RMAN-06023: no backup or copy of datafile 1 found to restore

RMAN> 

猜猜问题是由于磁盘不足,因为/home目录只有10g多,所以做个映射到/oracle目录,这个/oracle目录有200多个G的大小。

mkdir -p /home/oradata
ln -s /oracle/app/oracle/oradata/powerdes /home/oradata/powerdes

然后继续执行restore恢复,restore成功,如下所示:

RMAN> restore database;

Starting restore at 03-DEC-15
using channel ORA_DISK_1

channel ORA_DISK_1: starting datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_DISK_1: restoring datafile 00001 to /home/oradata/powerdes/system01.dbf
channel ORA_DISK_1: restoring datafile 00002 to /home/oradata/powerdes/sysaux01.dbf
channel ORA_DISK_1: restoring datafile 00003 to /home/oradata/powerdes/undotbs01.dbf
channel ORA_DISK_1: restoring datafile 00004 to /home/oradata/powerdes/users01.dbf
channel ORA_DISK_1: restoring datafile 00005 to /home/oradata/powerdes/powerdesk01.dbf
channel ORA_DISK_1: restoring datafile 00006 to /home/oradata/powerdes/plas01.dbf
channel ORA_DISK_1: restoring datafile 00007 to /home/oradata/powerdes/pl01.dbf
channel ORA_DISK_1: restoring datafile 00008 to /home/oradata/powerdes/help01.dbf
channel ORA_DISK_1: restoring datafile 00009 to /home/oradata/powerdes/adobelc01.dbf
channel ORA_DISK_1: restoring datafile 00010 to /home/oradata/powerdes/sms01.dbf
channel ORA_DISK_1: restoring datafile 00011 to /home/oradata/powerdes/plcrm01.dbf
channel ORA_DISK_1: restoring datafile 00012 to /home/oradata/powerdes/powerdesk02.dbf
channel ORA_DISK_1: restoring datafile 00013 to /home/oradata/powerdes/datagm01.dbf
channel ORA_DISK_1: reading from backup piece /oracle/2015-12-02/full_POWERDES_20151202_5052.bak
channel ORA_DISK_1: piece handle=/oracle/2015-12-02/full_POWERDES_20151202_5052.bak tag=TAG20151202T211859
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:25:45
Finished restore at 03-DEC-15

RMAN> 
11,recover数据库
RMAN> recover database;

Starting recover at 03-DEC-15
using channel ORA_DISK_1

starting media recovery

RMAN-08187: WARNING: media recovery until SCN 11702491357 complete
Finished recover at 03-DEC-15

RMAN> 
12,打开数据库
alter database open resetlogs;  
RMAN> alter database open resetlogs;  

database opened

RMAN> 
13,登录验证
[oracle@oracle_yueworld admin]$ rlwrap sqlplus / as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on Thu Dec 3 21:03:53 2015

Copyright (c) 1982, 2009, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Release 11.2.0.1.0 - 64bit Production

SQL> select status from v$instance;

STATUS
------------
OPEN

SQL> 


    
 
 

您可能感兴趣的文章:

  • 如何将Aix上的oracle 物理备份 然后再在linux 系统上还原oracle
  • Oracle数据库设置任务计划备份一周的备份记录
  • Oracle数据库备份和恢复工具 RMan
  • oracle10g 数据备份与导入
  • aix下自动备份oracle 的输出日志问题,急!!
  • hp unix下备份oracle表的问题
  • linux小白提问linux备份oracle数据库的问题
  • oracle不能自动备份
  • Oracle数据库逻辑备份的SH文件
  • Linux环境中Oracle数据导入与导出备份操作
  • oracle数据库备份急???????????
  • oracle定时备份压缩的实现步骤
  • Unix系统下如何将oracle数据库备份
  • 详解如何应用改变跟踪技术加速Oracle递增备份
  • Oracle中备份表的简单sql命令语句
  • 实战Oracle数据库备份与恢复
  • Linux下实现自动备份Oracle数据库
  • oracle备份恢复的具体方法
  • 利用windows任务计划实现oracle的定期备份
  • Oracle11g备份和恢复功能的提高
  • ORACLE DATAGUARD中手工处理日志v$archive_GAP的方法
  • Oracle Dataguard备库失败与主库响应测试
  • Linux下Oracle10_Dataguard配置与应用
  • Oracle 11g Dataguard参数详解
  •  
    本站(WWW.)旨在分享和传播互联网科技相关的资讯和技术,将尽最大努力为读者提供更好的信息聚合和浏览方式。
    本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。












  • 相关文章推荐
  • Oracle数据库恢复后心得
  • 关于系统重装后Oracle数据库完全恢复的解决办法
  • oracle drop table(表)数据恢复方法
  • oracle中误删除表后恢复语句(FLASHBACK)
  • oracle冷备份恢复和oracle异机恢复使用方法
  • 在Oracle 10gR2中设定指定的恢复点实现轻松闪回
  • Oracle重做日志文件损坏或丢失后的恢复
  • oracle下实现恢复一个丢失的数据文件的代码
  • 详解通过Backup Exec来实施Oracle灾难恢复
  • Oracle的恢复管理器及DBMS_JOB包分析
  • Oracle数据库文件恢复以及备份思路
  • Oracle数据库备份恢复最佳实践
  • oracle如何恢复被覆盖的存储过程
  • rman恢复方案和oracle异机恢复
  • oracle数据库创建备份与恢复脚本整理
  • ORACLE 数据库RMAN备份恢复
  • 一次误操作引起的Oracle数据库大恢复
  • Oracle数据库的备份与恢复完全攻略
  • Oracle数据库的备份与恢复
  • Oracle数据库的备份及恢复策略研究
  • Oracle 12c发布简单介绍及官方下载地址
  • 在linux下安装oracle,如何设置让oracle自动启动!也就是让oracle那个服务自动启动,不是手动的
  • oracle 11g最新版官方下载地址
  • 请问su oracle 和su - oracle有什么不同?
  • Oracle 数据库(oracle Database)Select 多表关联查询方式
  • 虚拟机装Oracle R12与Oracle10g
  • Oracle数据库(Oracle Database)体系结构及基本组成介绍
  • Oracle 数据库开发工具 Oracle SQL Developer
  • 如何设置让Oracle SQL Developer显示的时间包含时分秒
  • Oracle EBS R12 支持 Oracle Database 11g
  • Oracle 10g和Oracle 11g网格技术介绍


  • 站内导航:


    特别声明:169IT网站部分信息来自互联网,如果侵犯您的权利,请及时告知,本站将立即删除!

    ©2012-2021,,E-mail:www_#163.com(请将#改为@)

    浙ICP备11055608号-3