- 最后登录
- 2014-7-2
- 在线时间
- 6 小时
- 威望
- 3
- 金钱
- 42
- 注册时间
- 2012-6-24
- 阅读权限
- 10
- 帖子
- 17
- 精华
- 0
- 积分
- 3
- UID
- 527
|
1#
发表于 2012-7-17 17:29:58
|
查看: 6161 |
回复: 4
1:数据库全备,包括控制文件后,新建了一个表空间。2:控制文件丢失,用旧的控制文件来启动,操作如下:
SQL> select * from v$version;
BANNER
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bi
PL/SQL Release 10.2.0.1.0 - Production
CORE 10.2.0.1.0 Production
TNS for Linux: Version 10.2.0.1.0 - Production
NLSRTL Version 10.2.0.1.0 - Production
SQL> startup mount;
ORACLE instance started.
Total System Global Area 524288000 bytes
Fixed Size 2022048 bytes
Variable Size 176162144 bytes
Database Buffers 343932928 bytes
Redo Buffers 2170880 bytes
Database mounted.
SQL> alter database open;
alter database open
*
ERROR at line 1:
ORA-01589: must use RESETLOGS or NORESETLOGS option for database open
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
[oracle@dg1 backup]$ rman target /
Recovery Manager: Release 10.2.0.1.0 - Production on Tue May 1 10:30:09 2012
Copyright (c) 1982, 2005, Oracle. All rights reserved.
connected to target database: ORCL (DBID=1308579523, not open)
RMAN> recover database;
Starting recover at 01-MAY-12
Starting implicit crosscheck backup at 01-MAY-12
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=158 devtype=DISK
Crosschecked 6 objects
Finished implicit crosscheck backup at 01-MAY-12
Starting implicit crosscheck copy at 01-MAY-12
using channel ORA_DISK_1
Crosschecked 1 objects
Finished implicit crosscheck copy at 01-MAY-12
searching for all files in the recovery area
cataloging files...
cataloging done
List of Cataloged Files
=======================
File Name: +arc/PRI/AUTOBACKUP/2012_05_01/s_782114046.316.782114047
File Name: +arc/PRI/AUTOBACKUP/2012_05_01/s_782114190.287.782114191
File Name: +arc/PRI/AUTOBACKUP/2012_05_01/s_782114308.285.782114309
File Name: +arc/PRI/AUTOBACKUP/2012_05_01/s_782114472.284.782114475
File Name: +arc/PRI/AUTOBACKUP/2012_05_01/s_782114523.283.782114525
using channel ORA_DISK_1
starting media recovery
archive log thread 1 sequence 6 is already on disk as file +ARC/pri/onlinelog/group_2.258.781163411
archive log thread 1 sequence 7 is already on disk as file +ARC/pri/onlinelog/group_3.259.781163421
archive log filename=+ARC/pri/onlinelog/group_2.258.781163411 thread=1 sequence=6
archive log filename=+ARC/pri/onlinelog/group_3.259.781163421 thread=1 sequence=7
creating datafile fno=7 name=+DATA/orcl/datafile/test.dbf
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 05/01/2012 10:30:26
ORA-01119: error in creating database file '+DATA/orcl/datafile/test.dbf'
ORA-17502: ksfdcre:4 Failed to create file +DATA/orcl/datafile/test.dbf
ORA-15005: name "orcl/datafile/test.dbf" is already used by an existing alias
[oracle@dg1 dbs]$ asmcmd
ASMCMD> rm test.dbf
RMAN> restore database;
Starting restore at 01-MAY-12
using channel ORA_DISK_1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 05/01/2012 10:35:47
RMAN-06085: must use SET NEWNAME command to restore datafile /u01/oracle/product/10.2.0/dbs/UNNAMED00007
RMAN> restore datafile 7;
Starting restore at 01-MAY-12
using channel ORA_DISK_1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 05/01/2012 10:57:22
RMAN-06085: must use SET NEWNAME command to restore datafile /u01/oracle/product/10.2.0/dbs/UNNAMED00007
SQL> alter database create datafile '/u01/oracle/product/10.2.0/dbs/UNNAMED00007';
alter database create datafile '/u01/oracle/product/10.2.0/dbs/UNNAMED00007'
*
ERROR at line 1:
ORA-01111: name for data file /u01/oracle/product/10.2.0/dbs/UNNAMED00007 is
unknown - rename to correct file |
|