rman恢复spfile最快捷方式

联系:手机/微信(+86 17813235971) QQ(107644445)

标题:rman恢复spfile最快捷方式

作者:惜分飞©版权所有[未经本人同意,不得以任何形式转载,否则有进一步追究法律责任的权利.]

一、sqlplus nomount数据库并恢复spfile

SQL> startup
ORA-01078: failure in processing system parameters
LRM-00109: 无法打开参数文件 'E:\ORACLE\11_2_0\DATABASE\INITXFF.ORA'
RMAN> restore spfile to 'e:\oracle\11_2_0\database\spfilexff.ora'
2> from 'F:\rmanbackup\20111113_0KMRIT19_1_1';
启动 restore 于 14-11月-11
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00601: fatal error in recovery manager
RMAN-03004: 执行命令期间出现严重错误
RMAN-10041: 无法在失败后重新创建轮询通道上下文。
RMAN-10024: 设置 rpc 轮询时出错
RMAN-10005: 打开游标时出错
RMAN-10002: ORACLE 错误 : ORA-03114: not connected to ORACLE
RMAN-03002: restore 命令 (在 11/14/2011 22:23:24 上) 失败
ORA-03113: 通信通道的文件结尾
进程 ID: 2884
会话 ID: 97 序列号: 1

1、无spfilexff.ora/initxff.ora/init.ora文件,sqlplus不能启动数据库至nomount状态
2、在数据库没有nomount状态下,不能恢复spfile

二、rman nomount数据库并恢复spfile

RMAN> startup
已连接到目标数据库 (未启动)
启动失败: ORA-01078: failure in processing system parameters
LRM-00109: 无法打开参数文件 'E:\ORACLE\11_2_0\DATABASE\INITXFF.ORA'
在没有参数文件的情况下启动 Oracle 实例以检索 spfile
Oracle 实例已启动
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: startup 命令 (在 11/14/2011 22:00:32 上) 失败
ORA-00205: 标识控制文件时出错, 有关详细信息, 请查看预警日志
RMAN> restore spfile to 'e:\oracle\11_2_0\database\spfilexff.ora'
2> from 'F:\rmanbackup\20111113_0KMRIT19_1_1';
启动 restore 于 14-11月-11
分配的通道: ORA_DISK_1
通道 ORA_DISK_1: SID=10 设备类型=DISK
通道 ORA_DISK_1: 正在从 AUTOBACKUP F:\rmanbackup\20111113_0KMRIT19_1_1 还原 spfile
通道 ORA_DISK_1: 从 AUTOBACKUP 还原 SPFILE 已完成
完成 restore 于 14-11月-11

1、rman会使用一个隐含(默认的参数文件启动数据库至nomount状态)
2、在nomount状态下,rman可以恢复spfile

三、rman启动数据库日志

Mon Nov 14 22:00:26 2011
Starting ORACLE instance (restrict)
LICENSE_MAX_SESSION = 0
LICENSE_SESSIONS_WARNING = 0
Picked latch-free SCN scheme 2
Using LOG_ARCHIVE_DEST_1 parameter default value as e:\oracle\11_2_0\RDBMS
Autotune of undo retention is turned on.
IMODE=BR
ILAT =18
LICENSE_MAX_USERS = 0
SYS auditing is disabled
Starting up:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, Oracle Label Security, OLAP, Data Mining,
Oracle Database Vault and Real Application Testing options.
Using parameter settings in client-side pfile C:\S5O4.1 on machine XIFENFEI-PC
System parameters with non-default values:
  sga_target               = 152M
  compatible               = "11.2.0.1.0"
  _dummy_instance          = TRUE
  remote_login_passwordfile= "EXCLUSIVE"
  db_name                  = "XFF"
Mon Nov 14 22:00:27 2011
PMON started with pid=2, OS id=2932
Mon Nov 14 22:00:28 2011
VKTM started with pid=3, OS id=4364 at elevated priority
VKTM running at (10)millisec precision with DBRM quantum (100)ms
Mon Nov 14 22:00:29 2011
GEN0 started with pid=4, OS id=4524
Mon Nov 14 22:00:30 2011
DIAG started with pid=5, OS id=5472
Mon Nov 14 22:00:30 2011
DBRM started with pid=6, OS id=5296
Mon Nov 14 22:00:30 2011
PSP0 started with pid=7, OS id=6120
Mon Nov 14 22:00:30 2011
DIA0 started with pid=8, OS id=4528
Mon Nov 14 22:00:30 2011
MMAN started with pid=9, OS id=6052
Mon Nov 14 22:00:30 2011
DBW0 started with pid=10, OS id=5348
Mon Nov 14 22:00:30 2011
LGWR started with pid=11, OS id=4904
Mon Nov 14 22:00:30 2011
CKPT started with pid=12, OS id=5388
Mon Nov 14 22:00:30 2011
SMON started with pid=13, OS id=4492
Mon Nov 14 22:00:30 2011
RECO started with pid=14, OS id=576
Mon Nov 14 22:00:30 2011
MMON started with pid=15, OS id=6072
Mon Nov 14 22:00:30 2011
MMNL started with pid=16, OS id=5720
ORACLE_BASE from environment = e:\oracle
Mon Nov 14 22:00:31 2011
alter database mount
ORA-00210: cannot open the specified control file
ORA-00202: control file: 'E:\ORACLE\11_2_0\DATABASE\CTL1XFF.ORA'
ORA-27041: unable to open file
OSD-04002: 无法打开文件
O/S-Error: (OS 2) 系统找不到指定的文件。
ORA-205 signalled during: alter database mount...
Mon Nov 14 22:00:33 2011
Checker run found 1 new persistent data failures

1、查看系统没有发现 C:\S5O4.1文件
2、restrict方式nomount数据库

One thought on “rman恢复spfile最快捷方式

  1. 恢复成功spfile之后,重启实例(使用恢复成功的spfile)继续自己需要的后续操作

发表评论

邮箱地址不会被公开。 必填项已用*标注

8 − 7 =