---
title: "rman-SPFILE丢失的恢复"
author: "softherk"
date: "2010-01-28T14:22:19Z"
tags: []
categories: ["数据库"]
slug: "rman-spfile"
draft: false
lastmod: "2010-01-28T14:50:58Z"
id: 582139
url: "https://igoole.iteye.com/blog/582139"
---

前提：已经进行了数据库完全备份。
模拟操作:
oracle> mv spfileora10g.ora spora10g.ora
oracle>
```java
rman target /;
```

rman> 
```java
shutdown immediate;
```

rman> 
```java
startup nomount;
```

startup failed: ORA-01078: failure in processing system parameters
LRM-00109: could not open parameter file '/home/oracle/product/10.20/dbs/initora10g.ora'
rman>
```java
set dbid 3988862108;
```

rman>
```java
restore spfile from autobackup;
```


执行该命令，如果没有找到的话，那可能是文件的路径发生错误.可以通过直接赋予它的文件
rman>restore spfile from '/u01/oracle/flash_recovery_area/ORA10G/autobackup/2008_12_09/o1_mf_s_673025706_4mw7xc79_.bkp

在dbs/目录下产生spfileora10g.ora文件。证明spfile 已经恢复好

rman> 
```java
shutdown immediate;
```

rman> 
```java
startup ;(
```
如果该命令不能够启动数据库，那么需要set dbid 3988862108)

注意：spfile是备份在控制文件里面的。
Windows下spfile默认路径在C:\oracle\product\10.2.0\db_1\dbs