设为首页 加入收藏

TOP

Oracle灾难恢复以及11g新特性恢复指导(二)
2015-07-24 10:58:49 来源: 作者: 【 】 浏览:8
Tags:Oracle 灾难 恢复 以及 11g 特性 指导
ERY_DEST_FILE VARCHAR2(3)
BLOCK_SIZE NUMBER
FILE_SIZE_BLKS NUMBER


2)删除所有控制文件:
SYS@PROD>select name from v$controlfile;

NAME
--------------------------------------------------------------------------------
/u01/app/oracle/oradata/PROD/controlfile/o1_mf_b2255k12_.ctl
/u01/app/oracle/fast_recovery_area/PROD/controlfile/o1_mf_b2255kjo_.ctl

SYS@PROD>!rm /u01/app/oracle/oradata/PROD/controlfile/o1_mf_b2255k12_.ctl
SYS@PROD>!rm /u01/app/oracle/fast_recovery_area/PROD/controlfile/o1_mf_b2255kjo_.ctl


3)删除参数文件:
SYS@PROD>show parameter spfile;

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
spfile string /u01/app/oracle/product/11.2.0
/dbhome_1/dbs/spfilePROD.ora
SYS@PROD>!rm /u01/app/oracle/product/11.2.0/dbhome_1/dbs/spfilePROD.ora


4)删除归档文件:
desc v$archived_log --归档文件
SYS@PROD>select name from v$archived_log;

NAME
--------------------------------------------------------------------------------
/u01/app/oracle/fast_recovery_area/PROD/archivelog/2014_10_16/o1_mf_1_7_b3y4y1s8_.arc

/u01/app/oracle/fast_recovery_area/PROD/archivelog/2014_10_16/o1_mf_1_8_b3y56mno

...

8 rows selected.

SYS@PROD>!rm /u01/app/oracle/fast_recovery_area/PROD/archivelog/2014_10_16/*;

alter system checkpoint;
--触发错误

5)退出重新进入:
SYS@PROD>stutdown immediate
SP2-0734: unknown command beginning "stutdown i..." - rest of line ignored.
SYS@PROD>shutdown immediate
ORA-01116: error in opening database file 2
ORA-01110: data file 2: '/u01/app/oracle/oradata/PROD/datafile/o1_mf_sysaux_b393xovt_.dbf'
ORA-27041: unable to open file
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
SYS@PROD>shutdown abort
ORACLE instance shut down.
SYS@PROD>startup
ORA-01078: failure in processing system parameters
LRM-00109: could not open parameter file '/u01/app/oracle/product/11.2.0/dbhome_1/dbs/initPROD.ora'
--报错

4.利用catalog恢复target数据库

1)在catalog库查看target数据库DBID

sqlplus rc_admin/oracle

RC_ADMIN@ORCL>select * from rc_database;

DB_KEY DBINC_KEY DBID NAME RESETLOGS_CHANGE# RESETLOGS
---------- ---------- ---------- -------- ----------------- ---------
241 242 1385095721 ORCL 925702 03-SEP-14
1 61 270879665 PROD 1107625 08-OCT-14


2)连接catalog数据库
[oracle@jibo ~]$ rman target / catalog rc_admin/oracle@ORCL

Recovery Manager: Release 11.2.0.4.0 - Production on Thu Oct 16 14:08:59 2014

Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.

connected to target database (not started)
connected to recovery catalog database
--可以连接,但数据库没有启动

3)设置dbid,并启动数据库到nomount状态
RMAN> set dbid=270879665;

executing command: SET DBID
database name is "PROD" and DBID is 270879665


RMAN> startup nomount;

startup failed: ORA-01078: failure in processing system parameters
LRM-00109: could not open parameter file '/u01/app/oracle/product/11.2.0/dbhome_1/dbs/initPROD.ora'

starting Oracle instance without parameter file for retrieva l of spfile


Oracle instance started

Total System Global Area 1068937216 bytes

Fixed Size 2260088 bytes
Variable Size 281019272 bytes
Database Buffers 780140544 bytes
Redo Buffers 5517312 bytes

4)还原参数文件和数据文件
RMAN>restore spfile;

RMAN>restore controlfile;
或者:
RMAN>restore spfile from autobackup;
RMAN>restore controlfile from autobackup;
或者:
RMAN>restore spfile from '/u01/app/or

首页 上一页 1 2 3 4 5 6 7 下一页 尾页 2/7/7
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇当有超过64个逻辑cpu时,Windows.. 下一篇Error in invoking target 'c..

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容:

·Java 并发工具类:提 (2025-12-25 20:25:44)
·Java面试技巧:如何 (2025-12-25 20:25:41)
·Java并发编程中的线 (2025-12-25 20:25:38)
·C 语言 - cppreferen (2025-12-25 19:50:27)
·《C 语言入门教程》 (2025-12-25 19:50:23)