oracle spfile 恢复,数据库恢复实例三:恢复spfile

数据库恢复实例三:恢复spfile

数据库错误如下:

SQL> startup nomount;

ORA-01078: failure in processing system parameters

LRM-00109: could not open parameter file '/u01/app/oracle/product/10.2.0/db_1/dbs/inithdi26.ora'

1.分析

这个错误由初失参数文件丢失或引起的,恢复方法:通过备份,手工重建

本例通过RMAN来恢复spfile

2.启动数据库到nomount状态

在$ORACLE_BASE/admin/$ORACLE_SID/pfile/目录下有一参数

$ORACLE_BASE/admin/hdi26/pfile/

ls

init.ora.118200895840

SQL> startup nomount pfile=/u01/app/oracle/admin/hdi26/pfile/init.ora.118200895840

ORACLE instance started.

Total System Global Area 2147483648 bytes

Fixed Size1220432 bytes

Variable Size486539440 bytes

Database Buffers1644167168 bytes

Redo Buffers15556608 bytes

3.恢复spfile

[oracle@HDI01 pfile]$ rman target /

Recovery Manager: Release 10.2.0.1.0 - Production on Wed Dec 10 15:17:02 2008

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

connected to target database: hdi26 (not mounted)

RMAN> restore spfile from '/u09/orabackup/rman/controlfile/c-1504204985-20081210-01';

Starting restore at 10-DEC-08

using target database control file instead of recovery catalog

allocated channel: ORA_DISK_1

channel ORA_DISK_1: sid=156 devtype=DISK

channel ORA_DISK_1: autobackup found: /u09/orabackup/rman/controlfile/c-1504204985-20081210-01

channel ORA_DISK_1: SPFILE restore from autobackup complete

Finished restore at 10-DEC-08

4.重起数据库使用恢复的spfile启动数据库

SQL> shutdown immediate;

ORA-01507: database not mounted

ORACLE instance shut down.

SQL> startup;

ORACLE instance started.

Total System Global Area 2147483648 bytes

Fixed Size1220432 bytes

Variable Size285212848 bytes

Database Buffers1845493760 bytes

Redo Buffers15556608 bytes

Database mounted.

Database opened.

5.创建pfile

create pfile from spfile;

注:手工重建:

1.从alter log重建,alter log中会记录数据库在启动时的所有非默认参数

2.直接使用$ORACLE_BASE/admin/hdi26/pfile/的初始参数

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值