欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  数据库

Oracle数据库教程:ORA-01103错误解析

程序员文章站 2024-02-10 10:03:34
...

这是一测试库,我将参数文件,控制文件,数据文件全部删除之后,做数据恢复,但是我把控制文件和参数文件都恢复回来了,可数据库

1、环境介绍:

这是一测试库,我将参数文件,控制文件,数据文件全部删除之后,做数据恢复,但是

我把控制文件和参数文件都恢复回来了,可数据库却怎么也打不开,报ORA-01103: database name 'WWL' in control file is not 'DUMMY'错误

我的数据库名称是:WWL

2、执行过程:

恢复参数文件:

RMAN> setDBID=5520179

executing command: SET DBID

RMAN> restorespfile from autobackup;

Starting restore at 23-MAY-12

using target database control file insteadof recovery catalog

allocated channel: ORA_DISK_1

channel ORA_DISK_1: sid=39 devtype=DISK

channel ORA_DISK_1: looking for autobackupon day: 20120523

channel ORA_DISK_1: autobackup found:c-5520179-20120523-04

channel ORA_DISK_1: SPFILE restore fromautobackup complete

Finished restore at 23-MAY-12

RMAN>

3、恢复控制文件

RMAN> restorecontrolfile from autobackup;

Starting restore at 23-MAY-12

using channel ORA_DISK_1

channel ORA_DISK_1: looking for autobackupon day: 20120523

channel ORA_DISK_1: autobackup found:c-5520179-20120523-04

channel ORA_DISK_1: control file restorefrom autobackup complete

output filename=/DBSoft/product/10.2.0/db_1/dbs/cntrlWWL.dbf

Finished restore at 23-MAY-12

RMAN>

4、报错信息:

RMAN> sql 'alterdatabase mount';

sql statement: alter database mount

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

RMAN-00569: =============== ERROR MESSAGESTACK FOLLOWS ===============

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

RMAN-03009: failure of sql command ondefault channel at 05/23/2012 18:51:31

RMAN-11003: failure during parse/executionof SQL statement: alter database mount

ORA-01103: database name 'WWL' in controlfile is not 'DUMMY'

RMAN> alterdatabase mount;

using target database control file insteadof recovery catalog

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

RMAN-00569: =============== ERROR MESSAGESTACK FOLLOWS ===============

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

RMAN-03002: failure of alter db command at05/23/2012 18:39:47

ORA-01103: database name 'WWL' in controlfile is not 'DUMMY'

SQL> alterdatabase mount;

alter database mount

ERROR at line 1:

ORA-01103: database name 'WWL' in controlfile is not 'DUMMY'