SQL> alter database open resetlogs upgrade;
alter database open resetlogs upgrade
*
ERROR at line 1:
ORA-01092: ORACLE instance terminated. Disconnection forced
ORA-39701: database must be mounted EXCLUSIVE for UPGRADE or DOWNGRADE
Process ID: 17021
Session ID: 37 Serial number: 8
解决方法
SQL> startup mount;
ORACLE instance started.
Total System Global Area 849530880 bytes
Fixed Size 1339824 bytes
Variable Size 595594832 bytes
Database Buffers 247463936 bytes
Redo Buffers 5132288 bytes
Database mounted.
SQL> ALTER SYSTEM SET CLUSTER_DATABASE=FALSE scope=spfile ;
System altered.
SQL> alter database open resetlogs upgrade;
alter database open resetlogs upgrade
*
ERROR at line 1:
ORA-01139: RESETLOGS option only valid after an incomplete database recovery
RMAN> run{
2> allocate channel t1 type disk;
3> allocate channel t2 type disk;
4> allocate channel t3 type disk;
5> allocate channel t4 type disk;
6> recover database until sequence 8;
7> release channel t1;
8> release channel t2;
9> release channel t3;
10> release channel t4;
11> }
allocated channel: t1
channel t1: SID=31 device type=DISK
allocated channel: t2
channel t2: SID=34 device type=DISK
allocated channel: t3
channel t3: SID=35 device type=DISK
allocated channel: t4
channel t4: SID=36 device type=DISK
Starting recover at 24-MAR-2016 11:11:15
released channel: t1
released channel: t2
released channel: t3
released channel: t4
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 03/24/2016 11:11:17
RMAN-06094: datafile 1 must be restored
RMAN> switch database to copy;
datafile 1 switched to datafile copy "+ORADATA/hnzz/datafile/system01.dbf"
datafile 2 switched to datafile copy "+ORADATA/hnzz/datafile/undotbs01.dbf"
datafile 3 switched to datafile copy "+ORADATA/hnzz/datafile/sysaux01.dbf"
datafile 4 switched to datafile copy "+ORADATA/hnzz/datafile/users01.dbf"
datafile 5 switched to datafile copy "+ORADATA/hnzz/datafile/example01.dbf"
datafile 6 switched to datafile copy "+ORADATA/hnzz/datafile/tbs_f1.dbf"
RMAN> run{
2> allocate channel t1 type disk;
3> allocate channel t2 type disk;
4> allocate channel t3 type disk;
5> allocate channel t4 type disk;
6> recover database until sequence 8;
7> release channel t1;
8> release channel t2;
9> release channel t3;
10> release channel t4;
11> }
allocated channel: t1
channel t1: SID=31 device type=DISK
allocated channel: t2
channel t2: SID=34 device type=DISK
allocated channel: t3
channel t3: SID=35 device type=DISK
allocated channel: t4
channel t4: SID=36 device type=DISK
Starting recover at 24-MAR-2016 11:12:45
starting media recovery
channel t1: starting archived log restore to default destination
channel t1: restoring archived log
archived log thread=1 sequence=7
channel t1: reading from backup piece /oracle/app/rmanbackup/archive_level0__20160323_0fr181fl_1_1.dbf
channel t1: piece handle=/oracle/app/rmanbackup/archive_level0__20160323_0fr181fl_1_1.dbf tag=TAG20160323T224509
channel t1: restored backup piece 1
channel t1: restore complete, elapsed time: 00:00:15
archived log file name=+FRA/hnzz/archivelog/2016_03_24/thread_1_seq_7.263.907326777 thread=1 sequence=7
channel default: deleting archived log(s)
archived log file name=+FRA/hnzz/archivelog/2016_03_24/thread_1_seq_7.263.907326777 RECID=9 STAMP=907326782
media recovery complete, elapsed time: 00:00:02
Finished recover at 24-MAR-2016 11:13:10
released channel: t1
released channel: t2
released channel: t3
released channel: t4
SQL> alter database open resetlogs upgrade;
Database altered.
阅读(1322) | 评论(0) | 转发(0) |