rushlight 发表于 2011-12-12 14:42
再执行recover database 那就是complete recovery了,alert database open read only肯定行,直接读写打开 ...
rman target /
Recovery Manager: Release 10.2.0.3.0 - Production on Mon Dec 12 14:59:54 2011
Copyright (c) 1982, 2005, Oracle. All rights reserved.
connected to target database (not started)
RMAN> startup nomount;
Oracle instance started
Total System Global Area 1610612736 bytes
Fixed Size 2073088 bytes
Variable Size 369102336 bytes
Database Buffers 1224736768 bytes
Redo Buffers 14700544 bytes
RMAN> restore controlfile from '/u01/app/oracle/*****_1_1';
Starting restore at 12-DEC-11
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: restoring control file
channel ORA_DISK_1: restore complete, elapsed time: 00:00:02
output filename=/u01/app/oracle/oradata//control01.ctl
output filename=/u01/app/oracle/oradata//control02.ctl
output filename=/u01/app/oracle/oradata//control03.ctl
Finished restore at 12-DEC-11
RMAN> alter database mount;
database mounted
released channel: ORA_DISK_1
RMAN> run {
2> set until scn 6801190;
3> restore database;
4> recover database;
5> }
executing command: SET until clause
Starting restore at 12-DEC-11
Starting implicit crosscheck backup at 12-DEC-11
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=156 devtype=DISK
Crosschecked 1 objects
Finished implicit crosscheck backup at 12-DEC-11
Starting implicit crosscheck copy at 12-DEC-11
using channel ORA_DISK_1
Finished implicit crosscheck copy at 12-DEC-11
searching for all files in the recovery area
cataloging files...
no files cataloged
using channel ORA_DISK_1
channel ORA_DISK_1: starting datafile backupset restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
restoring datafile 00001 to /u01/app/oracle/orada.dbf
restoring datafile 00003 to /u01/app/oracle/oradat.dbf
restoring datafile 00004 to /u01/app/oracle/oradata/backup/users01.dbf
restoring datafile 00006 to /u01/app/oracle/oradata/backup/undotbs02.dbf
restoring datafile 00007 to /u01/app/oracle/orada.dbf
restoring datafile 00011 to /u01/app/oracle/or.dbf
channel ORA_DISK_1: reading from backup piece /u01/app/oracle/backup
channel ORA_DISK_1: restored backup piece 1
piece handle=/u01/app/oracle/backup/full07mu1fqq_1_1 tag=TAG20111212T143609
channel ORA_DISK_1: restore complete, elapsed time: 00:00:46
Finished restore at 12-DEC-11
Starting recover at 12-DEC-11
using channel ORA_DISK_1
starting media recovery
archive log thread 1 sequence 1 is already on disk as file /u01/app/oracle/oradata/backup/redo05.log
archive log filename=/u01/app/oracle/oradata/backup/redo05.log thread=1 sequence=1
media recovery complete, elapsed time: 00:00:01
Finished recover at 12-DEC-11
RMAN> sql 'alter database open read only';
sql statement: alter database open read only
RMAN> exit
Recovery Manager complete.
[oracle@db_backup backup]$ sqlplus '/ as sysdba'
SQL*Plus: Release 10.2.0.3.0 - Production on Mon Dec 12 15:02:21 2011
Copyright (c) 1982, 2006, Oracle. All Rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
SQL> select open_mode from v$database;
OPEN_MODE
------------------------------
READ ONLY
SQL> select checkpoint_change# from v$datafile;
CHECKPOINT_CHANGE#
------------------
6801190
6801190
6801190
6801190
6801190
6801190
6 rows selected.
SQL> select checkpoint_change# from v$datafile_header;
CHECKPOINT_CHANGE#
------------------
6801190
6801190
6801190
6801190
6801190
6801190
6 rows selected.
你的操作有些问题~就是你controlfile不是从备份恢复过来的吧?如果是心的controlfile是不行的