All about configurming User-Managed Database Recovery

Source: Internet
Author: User

All about login Ming User-Managed Database Recovery Issuing set autorecovery on before issuing the RECOVER command. if you recovery with set autorecovery off, which is the default, then you must enter filenames manually or accept the suggested filename by pressing Enter. startup mountset autorecovery onrecover databasealter database open; Note: After issuing the SQL * Plus RECOVER command, you can view all files that have been considered for recovery in the V $ RECOVERY_FILE_STATUS view. you can access status information for each file in the V $ RECOVERY_STATUS view. these views are not accessible after you terminate the recovery session. the filenames used when you use automatic recovery are derived from the concatenated values of LOG_ARCHIVE_FORMAT with LOG_ARCHIVE_DEST_n, where n is the highest value among all enabled, local destinations. for example, assume the following initialization parameter settings are in effect in the database instance: LOG_ARCHIVE_DEST_1 = "LOCATION =/arc_dest/loc1/" placement = "LOCATION =/arc_dest/loc2/" placement = DEFER encoding = ENABLE LOG_ARCHIVE_FORMAT = arch _ % t _ % s _ % r. arcIn this example, SQL * Plus automatically suggests the filename/arc_dest/loc2/arch _ % t _ % s _ % r. arc (where % t is the thread, % s is the sequence and % r is the resetlogs ID ). automatic Recovery with the AUTOMATIC Option of the RECOVER Command ========================== ======================================================== STARTUP MOUNTRECOVER AUTOMATIC databasealter database open; if you use an Oracle Real Application Clusters configuration, and if you are using Ming incomplete recovery or using a backup control file, then the database can only compute the name of the first archived redo log file from the first redo thread. you may have to manually apply the first log file from the other redo threads. after the first log file in a given thread has been supplied, the database can suggest the names of the subsequent logs in this thread. recovery When Archived Logs Are in a Nondefault Location ############################### ######################### Overriding the Archived Log Destination ========== ========================== set logsource "/tmp" Recover the offline tablespace. for example, to recover the offline tablespace users do the following: RECOVER automation TABLESPACE users Alternatively, you can avoid running set logsource and simply run: recover automatic tablespace users FROM "/tmp" Parallel Media Recovery ===============================by default, oracle uses parallel media recovery to improve performance of the roll forward phase of media recoveryTo override the default behavior of discovery parallel recovery, use the RECOVER with the NOPARALLEL option, or recover parallel 0. the RECOVERY_PARALLELISM initialization parameter controls instance or crash recovery only. media recovery is not affected by the value used for RECOVERY_PARALLELISM. ming Closed Database Recovery =================================================if you choose not to automate the application of archived redo logs, then you must accept or reject each prompted log. if you automate recovery, then the database applies the logs automatically. recovery continues until all required archived and online redo logs have been applied to the restored datafiles. the database notifies you when media recovery is complete: Media recovery complete. if no archived redo logs are required for complete media recovery, then the database applies all necessary online redo log files and terminates recovery. alter tablespace users offline temporary; recover automatic from '/tmp' TABLESPACE users, tools; recover automatic tablespace users, tools; alter tablespace users ONLINE; discovery Incomplete Database Recovery #################################### ### discovery Ming Cancel-Based Incomplete Recovery ============================== ============= recover database until cancel; the database applies the necessary redo log files to reconstruct the restored datafiles. the database supplies the name it expects to find from LOG_ARCHIVE_DEST_1 and requests you to stop or proceed with applying the log file. if the control file is a backup, then you must supply the names of the online redo logs if you want to apply the changes in these logs. alter database open resetlogs; discovery Time-Based or Change-Based Incomplete Recovery ============================ ======================================= recover database until change 10034; recover database until time '2017-12-31: 12: 47: 30 '; about User-Managed Media Recovery Problems ################################# ######## When media recovery encounters a problem, the alert log may indicate that recovery can continue if it is allowed to upload upt the data block causing the problem. the alert log contains information about the block: its block type, block address, the tablespace it belongs to, and so forth. for blocks containing user data, the alert log may also report the data object number. in this case, the database can proceed with recovery if it is allowed to mark the problem block as your upt. nevertheless, this response is not always advisable. for example, if the block is an important block in the SYSTEM tablespace, marking the block as your upt can eventually prevent you from opening the recovered database. another consideration is whether the recovery problem is isolated. if this problem is followed immediately by another other problems in the redo stream, then you may want to open the database with the RESETLOGS option. alter database open read only; select owner, OBJECT_NAME, SUBOBJECT_NAME, OBJECT_TYPEFROM DBA_OBJECTSWHERE DATA_OBJECT_ID = 8031; allowing Recovery to upload upt Blocks ========================================== recover database allow 5 upload uption discovery Trial real ===================================by default, if a trial recovery encounters a stuck recovery or similar problem, then it always marks the data block as your upt in memory when this action can allow recovery to proceed. the database writes errors generated during trial recovery to alert files. these errors are clearly marked as test run errors. recover database testrecover database using backup controlfile until cancel testrecover tablespace users testrecover database until cancel test By default, trial recovery always attempts to fail upt blocks in memory if this action allows trial recovery to proceed. trial recovery by default can reset upt an unlimited number of data blocks. you can specify the ALLOW n upload uption clause on the RECOVER... TEST statement to limit the number of data blocks trial recovery can upload upt in memory. A trial recovery command is usable in any scenario in which a normal recovery command is usable. nevertheless, you shoshould only need to run trial recovery when recovery runs into problems.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.