缺少初始化文件,数据库是无法启动的。如果通过RMAN备份了初始化参数,那么可以通过RMAN对初始化参数进行恢复。

这篇文章简单介绍CATALOG方式下初始化参数的恢复问题。

初始化参数的丢失和损坏,并不会造成太严重的问题,即使是最坏的情况,导致无法进行恢复,也是可以通过手工编辑一个新的PFILE文件,来启动实例的。

而且,在数据库的alert文件中包含了每次数据库启动使用的所有非默认值初始化参数,因此重新编写一个初始化参数并不困难。

不过,既然对SPFILE进行了备份,那么完全可以采用恢复的方式来还原SPFILE。

对于CATALOG方式,SPFILE的恢复相对简单很多。不过Oracle文档上对于SPFILE的恢复的描述有些小问题:SET DBID这个步骤是不能省略的,否则会报错。

$ rman target / catalog "rman/rman@testcen"

Recovery Manager: Release 9.2.0.4.0 - Production

Copyright (c) 1995, 2002, Oracle Corporation. All rights reserved.

connected to target database (not started)

connected to recovery catalog database

RMAN> startup force nomount;

startup failed: ORA-01078: failure in processing system parameters

LRM-00109: could not open parameter file '/opt/ora9/product/9.2/dbs/inittestdata.ora'

trying to start the Oracle instance without parameter files ...

Oracle instance started

Total System Global Area 97588504 bytes

Fixed Size 451864 bytes

Variable Size 46137344 bytes

Database Buffers 50331648 bytes

Redo Buffers 667648 bytes

RMAN> restore spfile;

Starting restore at 27-6月-07

RMAN-00571: ===========================================================

RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============

RMAN-00571: ===========================================================

RMAN-03002: failure of restore command at 06/27/2007 10:36:46

RMAN-12010: automatic channel allocation initialization failed

RMAN-06004: ORACLE error from recovery catalog database: RMAN-20001: target database not found in recovery catalog

正确的方式如下:

$ rman target / catalog "rman/rman@testcen"

Recovery Manager: Release 9.2.0.4.0 - Production

Copyright (c) 1995, 2002, Oracle Corporation. All rights reserved.

connected to target database: DUMMY (not mounted)

connected to recovery catalog database

RMAN> set dbid 2270762593;

executing command: SET DBID

RMAN> startup force nomount

startup failed: ORA-01078: failure in processing system parameters

LRM-00109: could not open parameter file '/opt/ora9/product/9.2/dbs/inittestdata.ora'

trying to start the Oracle instance without parameter files ...

Oracle instance started

Total System Global Area 97588504 bytes

Fixed Size 451864 bytes

Variable Size 46137344 bytes

Database Buffers 50331648 bytes

Redo Buffers 667648 bytes

RMAN> restore spfile;

Starting restore at 27-6月-07

allocated channel: ORA_DISK_1

channel ORA_DISK_1: sid=9 devtype=DISK

allocated channel: ORA_DISK_2

channel ORA_DISK_2: sid=10 devtype=DISK

allocated channel: ORA_DISK_3

channel ORA_DISK_3: sid=11 devtype=DISK

channel ORA_DISK_1: starting datafile backupset restore

channel ORA_DISK_1: restoring SPFILE

output filename=/opt/ora9/product/9.2/dbs/spfiletestdata.ora

channel ORA_DISK_1: restored backup piece 1

piece handle=/data1/backup/testdata/c-2270762593-20070626-01 tag=null params=NULL

channel ORA_DISK_1: restore complete

Finished restore at 27-6月-07

RMAN> startup force

Oracle instance started

database mounted

database opened

Total System Global Area 1175525576 bytes

Fixed Size 452808 bytes

Variable Size 335544320 bytes

Database Buffers 838860800 bytes

Redo Buffers 667648 bytes

starting full resync of recovery catalog

full resync complete

SET DBID这个步骤是必须的。对于CATALOG模式,如果不知道数据库的ID,可以通过CATALOG用户登陆到CATALOG数据库中进行查询:

$ sqlplus rman/rman@testcen

SQL*Plus: Release 9.2.0.4.0 - Production on星期三6月27 15:36:30 2007

Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.

Connected to:

Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production

With the Partitioning, OLAP and Oracle Data Mining options

JServer Release 9.2.0.4.0 - Production

Session altered.

SQL> select dbid from rc_database where name = 'TESTDATA';

DBID

----------

2270762593

恢复之后,重启数据库实例,使得SPFILE生效。

oracle rman备份spfile,RMAN备份恢复之SPFILE的恢复(一)相关推荐

  1. oracle备份还原到本地_Oracle 11g R2 RAC数据库备份通过RMAN恢复到单实例数据库实现...

    Oracle 11g R2 RAC数据库备份通过RMAN恢复到单实例数据库实现 下面是我的一次从Oracle 11g R2 RAC到单实例间通过RMAN恢复备份集的过程,记录在此. 有些人以此方法作为 ...

  2. window oracle 只有bak文件怎么恢复_Oracle 11g R2 RAC数据库备份通过RMAN恢复到单实例数据库实现...

    Oracle 11g R2 RAC数据库备份通过RMAN恢复到单实例数据库实现 下面是我的一次从Oracle 11g R2 RAC到单实例间通过RMAN恢复备份集的过程,记录在此. 有些人以此方法作为 ...

  3. oracle 9i故障恢复,Oracle9i rman备份恢复总结

    Recovery Manager(RMAN)是一种用于备份(backup).还原(restore)和恢复(recover)数据库的Oracle 工.RMAN只能用于ORACLE8或更高的版本中.它能够 ...

  4. 基于Linux下 Oracle 备份策略(RMAN)---转自沙弥的世界

    --********************************** -- 基于Linux下 Oracle 备份策略(RMAN) --******************************* ...

  5. Oracle Database 12c RMAN全量+增量备份+归档日志恢复详解

    Oracle可以非常方便的把数据库恢复到具体某个时间的状态,而且还支持全备和多级增备,备份无需停止应用服务.比起DB2需要手动逐级恢复增量备份和归档日志,RMAN是非常简单好用的数据库商业解决方案. ...

  6. Oracle数据库 之 删除RMAN备份

    #su – oracle 切换至存放备份的目录,删除不需要的备份文件. $export ORACLE_SID=orcl $rman RMAN>connect target / RMAN>c ...

  7. oracle备份片校验,oracle rman 备份日志单独备份和交叉校验

    手动备份归档日志 1.database01 [[email protected] scripts ]$ pwd /usr/tivoli/scripts [[email protected] scrip ...

  8. oracle mseq,一次RMAN备份报错的诊断过程(一)

    今天检查数据库中的备份输出脚本时,发现RMAN备份出现了错误. 这一篇主要描述问题的现象. 错误信息如下: bash-3.00$ more /data/backup/backup_tradedb_09 ...

  9. oracle 创建备份目录,Oracle rman创建和自动化备份

    数据库版本:Oracle 10.2.0.5  x86_64 操作系统版本:Oracle Linux 5.7  x86_64 注:#表示为root用户下输入该命令, $表示为oracle用户下输入该命令 ...

最新文章

  1. 【jQuery Demo】图片瀑布流实现
  2. 一训练就显存爆炸?Facebook 推出 8 比特优化器,两行代码拯救你的显存
  3. 声学漫谈之七:扬声器等效电路与参数
  4. 开源贡献 计算_学生如何开始为开源软件做贡献
  5. java go md5_Go语言中三种不同md5计算方式的性能比较
  6. 那个抗血栓机器人_美国DJO抗血栓压力袜
  7. flex builder的安装
  8. 【路由器无线桥接的步骤实现】水星路由器MW150R作为副路由器无线桥接TP-Link主路由器
  9. python控制风扇_Python 语音控制普通风扇实现教程
  10. php phpunit_framework_testcase,开始使用PHPUnit
  11. 概率统计Python计算:F分布分位点计算
  12. ue4 后期处理景深_Unreal Engine4 后期处理特效 VOL1
  13. python写入excel文件追加写入_Python读写/追加excel文件Demo
  14. 虹膜识别—DeepIrisNet2
  15. python只会基础能做什么?---你可以做一个文字游戏!
  16. MQ消息队列的使用场景
  17. 分享一个铁死亡数据库
  18. 如何个性化U盘或硬盘图标
  19. 【面经】找实习两个月(面试题以及答案)
  20. 判断 iPad 的浏览器

热门文章

  1. realloc 用方法
  2. 日期选择控件-laydate
  3. 让引擎不再是你的唯一,对百度再见
  4. Spring Cache 配置及一些问题的解决
  5. ASP.NET页面的结构
  6. mysql和oracle转换_转MySql 与Oracle区别
  7. a12处理器和骁龙855_【性能】骁龙855最新跑分曝光 多核竟超苹果A12?
  8. 2016专接本c语言真题_云南特岗教师考试真题(中学信息技术)9套(无答案)
  9. Python 的垃圾回收回收机制(源码)
  10. CPNDet:Corner Proposal Network for Anchor-free, Two-stage Object Detection