在rman異機還原的時候,忘記設定dbid導致,且機器資料庫小版本不一致
在rman異機還原的時候,忘記設定dbid導致 --且源庫是11.2.0.1,將源庫的備份還原至目標庫11.2.0.4
RMAN> set dbid 930813055 --未設定
先restore database;
RMAN> recover database;
Starting recover at 01-JUL-2015 09:30:26
using channel ORA_DISK_1
using channel ORA_DISK_2
using channel ORA_DISK_3
using channel ORA_DISK_4
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 07/01/2015 09:30:26
ORA-19698: /home/oracle/app/oradata/test/redo01.log is from different database: id=943007602, db_name=test
RMAN> sql "alter database rename file ''/home/oracle/app/oradata/test/redo03.log'' to ''/home/oracle/oracle/oradata/pstest/redo03.log''";
sql statement: alter database rename file ''/home/oracle/app/oradata/test/redo03.log'' to ''/home/oracle/oracle/oradata/pstest/redo03.log''
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of sql command on default channel at 07/01/2015 09:31:40
RMAN-11003: failure during parse/execution of SQL statement: alter database rename file '/home/oracle/app/oradata/test/redo03.log' to '/home/oracle/oracle/oradata/pstest/redo03.log'
ORA-01511: error in renaming log/data files
ORA-01516: nonexistent log file, data file, or temporary file "/home/oracle/app/oradata/test/redo03.log"
RMAN> sql "alter database drop logfile group 1";
sql statement: alter database drop logfile group 1
RMAN> sql "alter database drop logfile group 2";
sql statement: alter database drop logfile group 2
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of sql command on default channel at 07/01/2015 09:35:09
RMAN-11003: failure during parse/execution of SQL statement: alter database drop logfile group 2
ORA-01567: dropping log 2 would leave less than 2 log files for instance pstest (thread 1)
ORA-00312: online log 2 thread 1: '/home/oracle/oracle/oradata/pstest/redo02.log'
RMAN> sql "alter database add logfile group 1 '/home/oracle/oracle/oradata/pstest/redo01.log' size 300m";
sql statement: alter database add logfile group 1 '/home/oracle/oracle/oradata/pstest/redo01.log' size 300m
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of sql command on default channel at 07/01/2015 09:38:05
RMAN-10015: error compiling PL/SQL program
RMAN> sql "alter database add logfile group 1 ''/home/oracle/oracle/oradata/pstest/redo01.log'' size 300m";
sql statement: alter database add logfile group 1 ''/home/oracle/oracle/oradata/pstest/redo01.log'' size 300m
RMAN> sql "alter database drop logfile group 2";
sql statement: alter database drop logfile group 2
RMAN> sql "alter database add logfile group 1 ''/home/oracle/oracle/oradata/pstest/redo02.log'' size 300m";
sql statement: alter database add logfile group 1 ''/home/oracle/oracle/oradata/pstest/redo02.log'' size 300m
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of sql command on default channel at 07/01/2015 09:38:59
RMAN-11003: failure during parse/execution of SQL statement: alter database add logfile group 1 '/home/oracle/oracle/oradata/pstest/redo02.log' size 300m
ORA-01184: logfile group 1 already exists
RMAN> sql "alter database add logfile group 2 ''/home/oracle/oracle/oradata/pstest/redo02.log'' size 300m";
sql statement: alter database add logfile group 2 ''/home/oracle/oracle/oradata/pstest/redo02.log'' size 300m
RMAN> sql "alter database drop logfile group 3";
sql statement: alter database drop logfile group 3
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of sql command on default channel at 07/01/2015 09:39:15
RMAN-11003: failure during parse/execution of SQL statement: alter database drop logfile group 3
ORA-01623: log 3 is current log for instance pstest (thread 1) - cannot drop
ORA-00312: online log 3 thread 1: '/home/oracle/oracle/oradata/pstest/redo03.log'
--standbylogfile
RMAN> sql "alter database drop logfile group 4";
sql statement: alter database drop logfile group 4
RMAN> sql "alter database drop logfile group 5";
sql statement: alter database drop logfile group 5
RMAN> sql "alter database drop logfile group 6";
sql statement: alter database drop logfile group 6
RMAN> sql "alter database drop logfile group 7";
sql statement: alter database drop logfile group 7
RMAN> sql "alter system switch logfile"
2> ;
sql statement: alter system switch logfile
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of sql command on default channel at 07/01/2015 09:41:15
RMAN-11003: failure during parse/execution of SQL statement: alter system switch logfile
ORA-01109: database not open
RMAN> recover database;
Starting recover at 01-JUL-2015 09:43:34
using channel ORA_DISK_1
using channel ORA_DISK_2
using channel ORA_DISK_3
using channel ORA_DISK_4
starting media recovery
channel ORA_DISK_1: starting archived log restore to default destination
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=5043
channel ORA_DISK_1: reading from backup piece /home/oracle/rman_bak/20150630-pstest/archivelog/log_skqaps9n_1_1
channel ORA_DISK_1: piece handle=/home/oracle/rman_bak/20150630-pstest/archivelog/log_skqaps9n_1_1 tag=TAG20150630T135255
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:07
archived log file name=/home/oracle/oracle/arch/pstest1_5043_858705120.dbf thread=1 sequence=5043
unable to find archived log
archived log thread=1 sequence=5044
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 07/01/2015 09:43:44
RMAN-06054: media recovery requesting unknown archived log for thread 1 with sequence 5044 and starting SCN of 11431827976888
RMAN> alter database open resetlogs;
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of alter db command at 07/01/2015 09:45:07
ORA-01092: ORACLE instance terminated. Disconnection forced
ORA-00704: bootstrap process failure
ORA-39700: database must be opened with UPGRADE option
Process ID: 39575
Session ID: 101 Serial number: 9
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
ORA-03114: not connected to ORACLE
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of alter db command at 07/01/2015 09:45:07
ORA-01092: ORACLE instance terminated. Disconnection forced
ORA-00704: bootstrap process failure
ORA-39700: database must be opened with UPGRADE option
Process ID: 39575
Session ID: 101 Serial number: 9
[oracle@ryxr1 dbs]$
[oracle@ryxr1 dbs]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Wed Jul 1 09:50:13 2015
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup mount;
ORACLE instance started.
Total System Global Area 9954570240 bytes
Fixed Size 2261768 bytes
Variable Size 5435821304 bytes
Database Buffers 4496293888 bytes
Redo Buffers 20193280 bytes
Database mounted.
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
SQL> recover database;
ORA-00283: recovery session canceled due to errors
ORA-16433: The database must be opened in read/write mode.
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options
[oracle@ryxr1 dbs]$ rman target /
Recovery Manager: Release 11.2.0.4.0 - Production on Wed Jul 1 09:51:09 2015
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
connected to target database: test (DBID=942741790, not open)
RMAN> recover database;
Starting recover at 01-JUL-2015 09:51:15
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=167 device type=DISK
allocated channel: ORA_DISK_2
channel ORA_DISK_2: SID=200 device type=DISK
allocated channel: ORA_DISK_3
channel ORA_DISK_3: SID=233 device type=DISK
allocated channel: ORA_DISK_4
channel ORA_DISK_4: SID=266 device type=DISK
starting media recovery
media recovery failed
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 07/01/2015 09:51:19
ORA-00283: recovery session canceled due to errors
RMAN-11003: failure during parse/execution of SQL statement: alter database recover if needed
start
ORA-00283: recovery session canceled due to errors
ORA-16433: The database must be opened in read/write mode.
RMAN> alter database open resetlogs upgrade;
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01009: syntax error: found "upgrade": expecting one of: ";"
RMAN-01007: at line 1 column 31 file: standard input
RMAN> alter database open resetlogs;
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of alter db command at 07/01/2015 09:51:49
ORA-01139: RESETLOGS option only valid after an incomplete database recovery
RMAN> alter database open;
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of alter db command at 07/01/2015 09:52:03
ORA-01092: ORACLE instance terminated. Disconnection forced
ORA-00704: bootstrap process failure
ORA-39700: database must be opened with UPGRADE option
Process ID: 4179
Session ID: 101 Serial number: 11
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
ORA-03114: not connected to ORACLE
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of alter db command at 07/01/2015 09:52:03
ORA-01092: ORACLE instance terminated. Disconnection forced
ORA-00704: bootstrap process failure
ORA-39700: database must be opened with UPGRADE option
Process ID: 4179
Session ID: 101 Serial number: 11
[oracle@ryxr1 dbs]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Wed Jul 1 09:52:55 2015
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup mount;
ORACLE instance started.
Total System Global Area 9954570240 bytes
Fixed Size 2261768 bytes
Variable Size 5435821304 bytes
Database Buffers 4496293888 bytes
Redo Buffers 20193280 bytes
Database mounted.
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
SQL> alter database open upgrade;
Database altered.
SQL>
SQL> select group#,status from v$log;
GROUP# STATUS
---------- ----------------
1 CURRENT
2 INACTIVE
3 INACTIVE
SQL> select member from v$logfile;
MEMBER
--------------------------------------------------------------------------------
/home/oracle/oracle/oradata/pstest/redo03.log
/home/oracle/oracle/oradata/pstest/redo02.log
/home/oracle/oracle/oradata/pstest/redo01.log
--重建臨時表空間
SQL> alter tablespace temp add tempfile '/home/oracle/oracle/oradata/pstest/temp01.dbf' size 500M reuse;
Tablespace altered.
SQL> select * from dba_temp_files;
select * from dba_temp_files
*
ERROR at line 1:
ORA-01187: cannot read from file because it failed verification tests
ORA-01110: data file 201: '/home/oracle/app/oradata/test/temp01.dbf'
SQL> alter tablespace temp drop tempfile '/home/oracle/app/oradata/test/temp01.dbf';
Tablespace altered.
--執行以下指令碼,使用sys as sysdba登入
@/home/oracle/oracle/product/11.2.0/dbhome_1/rdbms/admin/catupgrd.sql
刷刷刷刷的跑很久
……
Oracle Application Express
. VALID 3.2.1.00.10
Final Actions
. 00:00:00
Total Upgrade Time: 00:19:06
PL/SQL procedure successfully completed.
SQL>
SQL> SET SERVEROUTPUT OFF
SQL> SET VERIFY ON
SQL> commit;
Commit complete.
SQL>
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL>
SQL>
SQL> DOC
DOC>#######################################################################
DOC>#######################################################################
DOC>
DOC> The above sql script is the final step of the upgrade. Please
DOC> review any errors in the spool log file. If there are any errors in
DOC> the spool file, consult the Oracle Database Upgrade Guide for
DOC> troubleshooting recommendations.
DOC>
DOC> Next restart for normal operation, and then run utlrp.sql to
DOC> recompile any invalid application objects.
DOC>
DOC> If the source database had an older time zone version prior to
DOC> upgrade, then please run the DBMS_DST package. DBMS_DST will upgrade
DOC> TIMESTAMP WITH TIME ZONE data to use the latest time zone file shipped
DOC> with Oracle.
DOC>
DOC>#######################################################################
DOC>#######################################################################
DOC>#
SQL>
SQL> Rem Set errorlogging off
SQL> SET ERRORLOGGING OFF;
SQL>
SQL> REM END OF CATUPGRD.SQL
SQL>
SQL> REM bug 12337546 - Exit current sqlplus session at end of catupgrd.sql.
SQL> REM This forces user to start a new sqlplus session in order
SQL> REM to connect to the upgraded db.
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options
再次重啟資料庫即可正式訪問。
RMAN> set dbid 930813055 --未設定
先restore database;
RMAN> recover database;
Starting recover at 01-JUL-2015 09:30:26
using channel ORA_DISK_1
using channel ORA_DISK_2
using channel ORA_DISK_3
using channel ORA_DISK_4
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 07/01/2015 09:30:26
ORA-19698: /home/oracle/app/oradata/test/redo01.log is from different database: id=943007602, db_name=test
RMAN> sql "alter database rename file ''/home/oracle/app/oradata/test/redo03.log'' to ''/home/oracle/oracle/oradata/pstest/redo03.log''";
sql statement: alter database rename file ''/home/oracle/app/oradata/test/redo03.log'' to ''/home/oracle/oracle/oradata/pstest/redo03.log''
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of sql command on default channel at 07/01/2015 09:31:40
RMAN-11003: failure during parse/execution of SQL statement: alter database rename file '/home/oracle/app/oradata/test/redo03.log' to '/home/oracle/oracle/oradata/pstest/redo03.log'
ORA-01511: error in renaming log/data files
ORA-01516: nonexistent log file, data file, or temporary file "/home/oracle/app/oradata/test/redo03.log"
RMAN> sql "alter database drop logfile group 1";
sql statement: alter database drop logfile group 1
RMAN> sql "alter database drop logfile group 2";
sql statement: alter database drop logfile group 2
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of sql command on default channel at 07/01/2015 09:35:09
RMAN-11003: failure during parse/execution of SQL statement: alter database drop logfile group 2
ORA-01567: dropping log 2 would leave less than 2 log files for instance pstest (thread 1)
ORA-00312: online log 2 thread 1: '/home/oracle/oracle/oradata/pstest/redo02.log'
RMAN> sql "alter database add logfile group 1 '/home/oracle/oracle/oradata/pstest/redo01.log' size 300m";
sql statement: alter database add logfile group 1 '/home/oracle/oracle/oradata/pstest/redo01.log' size 300m
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of sql command on default channel at 07/01/2015 09:38:05
RMAN-10015: error compiling PL/SQL program
RMAN> sql "alter database add logfile group 1 ''/home/oracle/oracle/oradata/pstest/redo01.log'' size 300m";
sql statement: alter database add logfile group 1 ''/home/oracle/oracle/oradata/pstest/redo01.log'' size 300m
RMAN> sql "alter database drop logfile group 2";
sql statement: alter database drop logfile group 2
RMAN> sql "alter database add logfile group 1 ''/home/oracle/oracle/oradata/pstest/redo02.log'' size 300m";
sql statement: alter database add logfile group 1 ''/home/oracle/oracle/oradata/pstest/redo02.log'' size 300m
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of sql command on default channel at 07/01/2015 09:38:59
RMAN-11003: failure during parse/execution of SQL statement: alter database add logfile group 1 '/home/oracle/oracle/oradata/pstest/redo02.log' size 300m
ORA-01184: logfile group 1 already exists
RMAN> sql "alter database add logfile group 2 ''/home/oracle/oracle/oradata/pstest/redo02.log'' size 300m";
sql statement: alter database add logfile group 2 ''/home/oracle/oracle/oradata/pstest/redo02.log'' size 300m
RMAN> sql "alter database drop logfile group 3";
sql statement: alter database drop logfile group 3
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of sql command on default channel at 07/01/2015 09:39:15
RMAN-11003: failure during parse/execution of SQL statement: alter database drop logfile group 3
ORA-01623: log 3 is current log for instance pstest (thread 1) - cannot drop
ORA-00312: online log 3 thread 1: '/home/oracle/oracle/oradata/pstest/redo03.log'
--standbylogfile
RMAN> sql "alter database drop logfile group 4";
sql statement: alter database drop logfile group 4
RMAN> sql "alter database drop logfile group 5";
sql statement: alter database drop logfile group 5
RMAN> sql "alter database drop logfile group 6";
sql statement: alter database drop logfile group 6
RMAN> sql "alter database drop logfile group 7";
sql statement: alter database drop logfile group 7
RMAN> sql "alter system switch logfile"
2> ;
sql statement: alter system switch logfile
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of sql command on default channel at 07/01/2015 09:41:15
RMAN-11003: failure during parse/execution of SQL statement: alter system switch logfile
ORA-01109: database not open
RMAN> recover database;
Starting recover at 01-JUL-2015 09:43:34
using channel ORA_DISK_1
using channel ORA_DISK_2
using channel ORA_DISK_3
using channel ORA_DISK_4
starting media recovery
channel ORA_DISK_1: starting archived log restore to default destination
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=5043
channel ORA_DISK_1: reading from backup piece /home/oracle/rman_bak/20150630-pstest/archivelog/log_skqaps9n_1_1
channel ORA_DISK_1: piece handle=/home/oracle/rman_bak/20150630-pstest/archivelog/log_skqaps9n_1_1 tag=TAG20150630T135255
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:07
archived log file name=/home/oracle/oracle/arch/pstest1_5043_858705120.dbf thread=1 sequence=5043
unable to find archived log
archived log thread=1 sequence=5044
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 07/01/2015 09:43:44
RMAN-06054: media recovery requesting unknown archived log for thread 1 with sequence 5044 and starting SCN of 11431827976888
RMAN> alter database open resetlogs;
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of alter db command at 07/01/2015 09:45:07
ORA-01092: ORACLE instance terminated. Disconnection forced
ORA-00704: bootstrap process failure
ORA-39700: database must be opened with UPGRADE option
Process ID: 39575
Session ID: 101 Serial number: 9
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
ORA-03114: not connected to ORACLE
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of alter db command at 07/01/2015 09:45:07
ORA-01092: ORACLE instance terminated. Disconnection forced
ORA-00704: bootstrap process failure
ORA-39700: database must be opened with UPGRADE option
Process ID: 39575
Session ID: 101 Serial number: 9
[oracle@ryxr1 dbs]$
[oracle@ryxr1 dbs]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Wed Jul 1 09:50:13 2015
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup mount;
ORACLE instance started.
Total System Global Area 9954570240 bytes
Fixed Size 2261768 bytes
Variable Size 5435821304 bytes
Database Buffers 4496293888 bytes
Redo Buffers 20193280 bytes
Database mounted.
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
SQL> recover database;
ORA-00283: recovery session canceled due to errors
ORA-16433: The database must be opened in read/write mode.
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options
[oracle@ryxr1 dbs]$ rman target /
Recovery Manager: Release 11.2.0.4.0 - Production on Wed Jul 1 09:51:09 2015
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
connected to target database: test (DBID=942741790, not open)
RMAN> recover database;
Starting recover at 01-JUL-2015 09:51:15
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=167 device type=DISK
allocated channel: ORA_DISK_2
channel ORA_DISK_2: SID=200 device type=DISK
allocated channel: ORA_DISK_3
channel ORA_DISK_3: SID=233 device type=DISK
allocated channel: ORA_DISK_4
channel ORA_DISK_4: SID=266 device type=DISK
starting media recovery
media recovery failed
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 07/01/2015 09:51:19
ORA-00283: recovery session canceled due to errors
RMAN-11003: failure during parse/execution of SQL statement: alter database recover if needed
start
ORA-00283: recovery session canceled due to errors
ORA-16433: The database must be opened in read/write mode.
RMAN> alter database open resetlogs upgrade;
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01009: syntax error: found "upgrade": expecting one of: ";"
RMAN-01007: at line 1 column 31 file: standard input
RMAN> alter database open resetlogs;
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of alter db command at 07/01/2015 09:51:49
ORA-01139: RESETLOGS option only valid after an incomplete database recovery
RMAN> alter database open;
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of alter db command at 07/01/2015 09:52:03
ORA-01092: ORACLE instance terminated. Disconnection forced
ORA-00704: bootstrap process failure
ORA-39700: database must be opened with UPGRADE option
Process ID: 4179
Session ID: 101 Serial number: 11
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
ORA-03114: not connected to ORACLE
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of alter db command at 07/01/2015 09:52:03
ORA-01092: ORACLE instance terminated. Disconnection forced
ORA-00704: bootstrap process failure
ORA-39700: database must be opened with UPGRADE option
Process ID: 4179
Session ID: 101 Serial number: 11
[oracle@ryxr1 dbs]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Wed Jul 1 09:52:55 2015
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup mount;
ORACLE instance started.
Total System Global Area 9954570240 bytes
Fixed Size 2261768 bytes
Variable Size 5435821304 bytes
Database Buffers 4496293888 bytes
Redo Buffers 20193280 bytes
Database mounted.
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
SQL> alter database open upgrade;
Database altered.
SQL>
SQL> select group#,status from v$log;
GROUP# STATUS
---------- ----------------
1 CURRENT
2 INACTIVE
3 INACTIVE
SQL> select member from v$logfile;
MEMBER
--------------------------------------------------------------------------------
/home/oracle/oracle/oradata/pstest/redo03.log
/home/oracle/oracle/oradata/pstest/redo02.log
/home/oracle/oracle/oradata/pstest/redo01.log
--重建臨時表空間
SQL> alter tablespace temp add tempfile '/home/oracle/oracle/oradata/pstest/temp01.dbf' size 500M reuse;
Tablespace altered.
SQL> select * from dba_temp_files;
select * from dba_temp_files
*
ERROR at line 1:
ORA-01187: cannot read from file because it failed verification tests
ORA-01110: data file 201: '/home/oracle/app/oradata/test/temp01.dbf'
SQL> alter tablespace temp drop tempfile '/home/oracle/app/oradata/test/temp01.dbf';
Tablespace altered.
--執行以下指令碼,使用sys as sysdba登入
@/home/oracle/oracle/product/11.2.0/dbhome_1/rdbms/admin/catupgrd.sql
刷刷刷刷的跑很久
……
Oracle Application Express
. VALID 3.2.1.00.10
Final Actions
. 00:00:00
Total Upgrade Time: 00:19:06
PL/SQL procedure successfully completed.
SQL>
SQL> SET SERVEROUTPUT OFF
SQL> SET VERIFY ON
SQL> commit;
Commit complete.
SQL>
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL>
SQL>
SQL> DOC
DOC>#######################################################################
DOC>#######################################################################
DOC>
DOC> The above sql script is the final step of the upgrade. Please
DOC> review any errors in the spool log file. If there are any errors in
DOC> the spool file, consult the Oracle Database Upgrade Guide for
DOC> troubleshooting recommendations.
DOC>
DOC> Next restart for normal operation, and then run utlrp.sql to
DOC> recompile any invalid application objects.
DOC>
DOC> If the source database had an older time zone version prior to
DOC> upgrade, then please run the DBMS_DST package. DBMS_DST will upgrade
DOC> TIMESTAMP WITH TIME ZONE data to use the latest time zone file shipped
DOC> with Oracle.
DOC>
DOC>#######################################################################
DOC>#######################################################################
DOC>#
SQL>
SQL> Rem Set errorlogging off
SQL> SET ERRORLOGGING OFF;
SQL>
SQL> REM END OF CATUPGRD.SQL
SQL>
SQL> REM bug 12337546 - Exit current sqlplus session at end of catupgrd.sql.
SQL> REM This forces user to start a new sqlplus session in order
SQL> REM to connect to the upgraded db.
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options
再次重啟資料庫即可正式訪問。
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/28258625/viewspace-1725265/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 使用RMAN對資料庫進行異機還原資料庫
- Oracle 資料庫不一致導致異常的恢復Oracle資料庫
- RMAN 異機複製資料庫資料庫
- rman 異機恢復指令碼(路徑不一致)指令碼
- oracle rman 異機還原測試--set newnameOracle
- 使用RMAN遷移資料庫到異機資料庫
- 由hugepage設定導致的資料庫事故資料庫
- RMAN資料庫還原測試資料庫
- file-max設定過小導致oracle資料庫hang住Oracle資料庫
- 時區不一致導致spring應用異常Spring
- 伺服器資料恢復—供電電壓不穩導致伺服器異常關機且資料丟失的資料恢復案例伺服器資料恢復
- 使用RMAN還原資料庫到某個時間點資料庫
- 【虛擬機器資料恢復】異常斷電導致虛擬機器無法啟動的資料恢復案例虛擬機資料恢復
- OS和資料庫版本不同對RMAN備份還原的影響資料庫
- 使用RMAN在還原控制檔案後開啟資料庫資料庫
- 從32位資料庫還原到64bit資料庫open的時候報錯資料庫
- archivelog滿了導致資料庫怠機的solutionHive資料庫
- 【伺服器虛擬化資料恢復】ESXI虛擬機器誤操作還原快照導致資料丟失的資料恢復案例伺服器資料恢復虛擬機
- 使用RMAN還原和恢復資料庫資料庫
- 【RMAN】利用備份片還原資料庫資料庫
- RAC資料庫的RMAN備份異機恢復到單節點資料庫資料庫
- ZooKeeper 避坑指南: ZooKeeper 3.6.4 版本 BUG 導致的資料不一致問題
- rman 資料庫從一臺機器遷移到另外的一臺機器資料庫
- crontab設定導致的伺服器程式異常問題伺服器
- 當機導致slave異常分析
- sqlserver 透過壓縮bak檔案實現從伺服器還原資料庫《資料差異數個小時》SQLServer伺服器資料庫
- 請問RMAN備份異機還原,備份之後的歸檔日誌在RMAN中怎麼處理?
- 解決memory_target設定過小導致不能啟動資料庫的問題資料庫
- 【RMAN】利用備份片還原資料庫(上)資料庫
- 【RMAN】利用備份片還原資料庫(中)資料庫
- 【RMAN】利用備份片還原資料庫(下)資料庫
- dbca建庫的時候忘記asmsnmp密碼,臨時修改ASM密碼
- RMAN 同機複製資料庫資料庫
- ORACLE一體機pcie 快取卡損壞導致資料庫dang機Oracle快取資料庫
- 控制檔案版本不一致下恢復資料庫資料庫
- MySQL Bug導致異常當機的分析流程MySql
- postgresql 使用pg_rman恢復還原資料庫SQL資料庫
- 【RMAN】利用備份片還原資料庫(中)-附加資料庫