Causes and Solutions on ORA-1113 Error Found in Backup & Recovery_183367.1
Common Causes and Solutions on ORA-1113 Error Found in Backup & Recovery (Doc ID 183367.1)
Applies to:
Information in this document applies to any platform.
Purpose
This note is intended to list the common reasons & solutions for the ORA-1113 error
Troubleshooting Steps
An ORA-1113 occurs when a datafile needs recovery.
Definition of ORA-01113:
Cause: An attempt was made to online or open a database with a file that
is in need of media recovery.
Action: First apply media recovery to the file.
The ORA-01113 error is usually followed with an ORA-01110 error which indicates
the name of the datafile that needs media recovery.
ORA-01110: data file 28: '/h04/usupport/app/oracle/oradata/index02.dbf'
This error message indicates that a datafile that is not up-to-date with
respect to the controlfile and other datafiles.
Oracle's architecture is tightly coupled in the sense that all database
files i.e., datafiles, redolog files, and controlfiles -- must be in sync
when the database is opened or at the end of a checkpoint.
This implies that the checkpoint SCN (System Commit Number) of all datafiles
must be the same. If that is not the case for a particular datafile, an
ORA-1113 error will be generated.
For example, when you put a tablespace in hot backup mode, the checkpoint
SCN of all its datafiles is frozen at the current value until you issue the
corresponding end backup. If the database crashes during a hot backup and
you try to restart it without doing recovery, you will likely get ORA-1113
for at least one of the datafiles in the tablespace that was being backed up,
since its SCN will probably be lower than that of the controlfile and the
datafiles in other tablespaces.
Likewise, offlining a datafile causes its checkpoint SCN to freeze.
If you simply attempt to online the file without recovering it first, its
SCN will likely be much older than that of the online datafiles, and thus an
ORA-1113 will result.
Before Starting these actions do the following:
Query the V$LOG and V$LOGFILE.
1. If the database is down, you need to mount it first.
SQL> STARTUP MOUNT;
2. Then connect internal Server Manager and issue the query:
SQL> connect / as sysdba
SQL> SELECT V1.GROUP#, MEMBER, SEQUENCE#, FIRST_CHANGE#
FROM V$LOG V1, V$LOGFILE V2
WHERE V1.GROUP# = V2.GROUP# ;
This will list all your online redolog files and their respective sequence and
first change numbers.
The steps to take next depend on the scenario in which the ORA-1113 was issued.
This is discussed in the following sections.
POSSIBLE CAUSES AND SOLUTIONS SUMMARY:
I. AT STARTUP AFTER CRASH WITH TABLESPACE(S) IN HOT BACKUP
II. AT STARTUP AFTER RESTORING A DATAFILE OR TABLESPACE FROM A BACKUP
III. TRYING TO ONLINE A DATAFILE OR TABLESPACE
IV. WHEN RECOVERING ' USING BACKUP CONTROLFILE' OPTION TO DO INCOMPLETE RECOVERY
I. AT STARTUP AFTER CRASH WITH TABLESPACE(S) IN HOT BACKUP
**********************************************************
1. Mount the database.
SQL> STARTUP MOUNT;
2. Find out which datafiles were in hot backup mode when the database crashed or
was shutdown abort or the machine was rebooted by running the query:
SQL> SELECT V1.FILE#, NAME
FROM V$BACKUP V1, V$DATAFILE V2
WHERE V1.STATUS = 'ACTIVE' AND V1.FILE# = V2.FILE# ;
3. For each of the files returned by the above query, issue the command:
SQL> ALTER DATABASE DATAFILE '' END BACKUP;
4. Open the database.
SQL> ALTER DATABASE OPEN;
II. AT STARTUP AFTER RESTORING A DATAFILE OR TABLESPACE FROM A BACKUP
*********************************************************************
A. WITH THE DATABASE IN ARCHIVELOG MODE
1. Mount the database.
SQL> STARTUP MOUNT;
2. Recover the datafile:
SQL> RECOVER DATAFILE '' ;
If recovering more than one datafile in a tablespace issue a
SQL> RECOVER TABLESPACE
If recovering more than one tablespace issue a
SQL> RECOVER DATABASE;
3. Confirm each of the archived logs that you are prompted for until you
receive the message "Media recovery complete".
If you are prompted for an archived log that does not exist, Oracle probably
needs one or more of the online logs to proceed with the recovery. Compare
the sequence number referenced in the ORA-280 message with the sequence
numbers of your online logs. Then enter the full path name of one of the
members of the redo group whose sequence number matches the one you are
being asked for.
4. Open the database.
SQL> ALTER DATABASE OPEN;
B. WITH THE DATABASE IN NOARCHIVELOG MODE
In this case, you will only succeed in recovering the datafile or tablespace
if the redo to be applied to it is within the range of your online logs.
Issue the query:
SQL> SELECT FILE#, CHANGE# FROM V$RECOVER_FILE;
Compare the change number you obtain with the FIRST_CHANGE# of your online logs.
If the CHANGE# is GREATER than the minimum FIRST_CHANGE# of your logs,
the datafile can be recovered. In this case, the procedure to be followed
is analogous to that of scenario II.A above, except that you must always
enter the appropriate online log when prompted, until recovery is finished.
If the CHANGE# is LESS than the minimum FIRST_CHANGE# of your logs, the file
cannot be recovered.Your options at this point include:
- If the datafile is in a temporary or index tablespace, you may drop
it with an ALTER DATABASE DATAFILE '' OFFLINE DROP
statement and then open the database. Once the database is up, you
must drop the tablespace to which the datafile belongs and recreate it.
- If the datafile is in the SYSTEM or in a rollback tablespace, restore
an up-to-date copy of the datafile (if available) or your most recent
full backup.In case you do not have either of this, then it might not
be possible to recover the database fully. For more details or to
assist you in your decision, please contact Oracle Customer Support.
For all other cases in this scenario, you must weigh the cost of going to a
backup versus the cost of recreating the tablespace involved, as described in
the two previous cases.For more details or to assist you in your decision,
please contact Oracle Customer Support.
III. TRYING TO ONLINE A DATAFILE OR TABLESPACE
**********************************************
1. Recover the datafile:
SQL> RECOVER DATAFILE '' ;
If recovering a tablespace, do
SQL> RECOVER TABLESPACE
If recovering a database, do
SQL> RECOVER DATABASE;
-- Note: With recover database, offline datafiles will not be recovered.
2. Confirm each of the archived logs that you are prompted for until you
receive the message "Media recovery complete".
If you are prompted for an archived log that does not exist, Oracle probably
needs one or more of the online logs to proceed with the recovery. Compare
the sequence number referenced in the ORA-280 message with the sequence
numbers of your online logs. Then enter the full path name of one of the
members of the redo group whose sequence number matches the one you are
being asked for.
3. Open the database.
SQL> ALTER DATABASE OPEN;
IV. WHEN RECOVERING 'USING BACKUP CONTROLFILE' OPTION TO DO INCOMPLETE RECOVERY
*******************************************************************************
If the database is recovered with the
"RECOVER DATABASE USING BACKUP CONTROLFILE;" option without specifying the
"UNTIL CANCEL" option, then upon "ALTER DATABASE OPEN RESETLOGS;" you will
encounter the ORA-1113 error.
Steps to workaround this issue:
1. Recover database again using:
SQL> RECOVER DATABASE USING BACKUP CONTROLFILE UNTIL CANCEL;
2. Cancel recovery by issuing the "CANCEL" command.
3. Open the database using:
SQL> ALTER DATABASE OPEN RESETLOGS;
#
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/17252115/viewspace-1069120/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- ERROR: No abbreviations files found in ...nonbreaking_prefixesError
- [PM2][ERROR] Process XXX not foundError
- ERROR: freetype2 not found using pkg-configError
- Error executing Jupyter command 'notebok': [Errno 'jupyter-notebok' not found] 2Error
- PHP 5.4 編譯 configure: error: libXpm.(a|so) not found.PHP編譯Error
- MySQL 5.6複製報錯Error_code: 1032; handler error HA_ERR_KEY_NOT_FOUND;MySqlError
- mysql-python安裝時Environment Error: mysql_config not foundMySqlPythonError
- SQLBackupAndFTP12.0 failed to backup database with full backup typeSQLFTPAIDatabase
- Solutions for Session Consistency Problem in Web ClusterSessionWeb
- ubuntu進行make時報錯error: Neither flex nor lex was found.UbuntuErrorFlex
- Failed: error reading separator after document # 1: bad JSON array format - found no opening brackAIErrorJSONORM
- MySQL [ERROR] Slave I/O: Found a Gtid_log_event or Previous_gtids_log_eventMySqlError
- 記一次android app啟動錯誤 Error running :Default Activity not foundAndroidAPPError
- md_backup
- [Vue warn]: Error in render: "TypeError: Cannot read property 'matched' of undefined" found in <App> at src/App.vueVueErrorUndefinedAPP
- 編譯ffmpeg遇到ERROR: x265 not found using pkg-config解決方法編譯Error
- Flutter在iOS裝置執行報錯fatal error: 'Flutter/Flutter.h' file not foundFlutteriOSError
- Using V$BACKUP_ASYNC_IO / V$BACKUP_SYNC_IO to Monitor RMAN PerformanceORM
- UVA 11020 Efficient Solutions+multiset的應用
- Erlang Solutions:2022年金融科技報告
- CentOS載入yum源時報錯 [Errno 14] HTTP Error 404 - Not Found Trying other mirror.CentOSHTTPError
- Win10系統edge打不開網頁提示“error 404--not found”如何解決Win10網頁Error
- composer安裝完成輸入命令報錯:Fatal error: Class ‘Phar‘ not found in C:\\ProgramData\\ComposerSetup\\bin\\compoError
- Viavi Solutions:5G部署狀況報告
- DBMS_BACKUP_RESTORE.DBMS_BACKUP_RESTORE用於特殊情況下的恢復REST
- BACKUP PENDING狀態的解除
- milvus-backup安裝部署
- recover database using backup controlfile理解Database
- Veritas Backup Exec™ 21.3 Multilingual (Windows)Windows
- -bash: id: command not found -bash: tty: command not found
- kubeadm not found
- AWS Certified DevOps Engineer Professional vs AWS Certified Solutions Architect Professionaldev
- Android Studio專案匯入之後出錯:Error:(1, 0) Plugin with id 'com.android.application' not found.AndroidErrorPluginAPP
- [20190228]Backup Restore Throttle sleep.txtREST
- PostgreSQL xlog格式之no backup full pageSQL
- PostgreSQL xlog格式之backup full pageSQL
- clickhouse-backup(RPM方式安裝)
- Mac Backup Guru for Mac(備份工具)Mac
- Crunchy PostgreSQL database backup via pgo commandSQLDatabaseGo