Oracle备份恢复之Trial Recovery
trial recovery基本上类似于正常的介质恢复,应用redo的过程仅仅发生在内存中,不会把数据的改变写到磁盘。说白了就是测试介质恢
一 什么是Trial Recovery
官方解释:A trial recovery applies redo in a way similar to normal media recovery, but it never writes its changes to disk and it always rolls back its changes. Trial recovery occurs only in memory.
trial recovery基本上类似于正常的介质恢复,应用redo的过程仅仅发生在内存中,不会把数据的改变写到磁盘。说白了就是测试介质恢复过程
二 Trial Recovery如何工作
1 默认,如果恢复由于数据块损坏而卡住或者遇到类似问题,,会标记相关块以求继续恢复,同时写错误信息到alert文件。
2 当遭遇如下问题时,Trial Recovery过程会结束
● 超出内存buffer限制
● 遭遇一个不可恢复性错误,即使通过标记坏块也不能解决,比如文件丢失
● 用户取消或者终止恢复会话
● 所有必须的redo已经被应用,即不需要恢复。
当 trial recovery 结束,一切恢复原样,只是错误消息会记录在alter 文件中。运行测试时,注意排除由于内存原因造成测试过程结束的影响。
三 Trial Recovery 的语句
recover ……..test
例如:
recover database test
recover database using backup controlfile until cancel test
recover tablespace users test
recover database until cancel test
注意: 默认trial recovery会在内存中标记(无限制)的坏块,使恢复过程能够继续进行。我们可以指定 allow n corruption 语句 在 recover…..test 后面,以限制可以标记的坏块数。
四 测试过程
正常情况:
RMAN> recover database test;
Starting recover at 05-DEC-12
using channel ORA_DISK_1
starting media recovery
archive log thread 1 sequence 1 is already on disk as file /Oracle/archive/1_1_801229657.dbf
archive log thread 1 sequence 2 is already on disk as file /oracle/archive/1_2_801229657.dbf
archive log thread 1 sequence 3 is already on disk as file /oracle/archive/1_3_801229657.dbf
archive log thread 1 sequence 4 is already on disk as file /oracle/archive/1_4_801229657.dbf
archive log thread 1 sequence 5 is already on disk as file /oracle/archive/1_5_801229657.dbf
archive log thread 1 sequence 6 is already on disk as file /oracle/archive/1_6_801229657.dbf
archive log thread 1 sequence 7 is already on disk as file /oracle/archive/1_7_801229657.dbf
archive log thread 1 sequence 8 is already on disk as file /oracle/archive/1_8_801229657.dbf
archive log thread 1 sequence 9 is already on disk as file /oracle/archive/1_9_801229657.dbf
archive log thread 1 sequence 10 is already on disk as file /oracle/archive/1_10_801229657.dbf
archive log thread 1 sequence 11 is already on disk as file /oracle/archive/1_11_801229657.dbf
archive log thread 1 sequence 12 is already on disk as file /oracle/archive/1_12_801229657.dbf
archive log thread 1 sequence 13 is already on disk as file /oracle/archive/1_13_801229657.dbf
archive log thread 1 sequence 14 is already on disk as file /oracle/archive/1_14_801229657.dbf
archive log filename=/oracle/archive/1_1_801229657.dbf thread=1 sequence=1
archive log filename=/oracle/archive/1_2_801229657.dbf thread=1 sequence=2
archive log filename=/oracle/archive/1_3_801229657.dbf thread=1 sequence=3
archive log filename=/oracle/archive/1_4_801229657.dbf thread=1 sequence=4
archive log filename=/oracle/archive/1_5_801229657.dbf thread=1 sequence=5
archive log filename=/oracle/archive/1_6_801229657.dbf thread=1 sequence=6
archive log filename=/oracle/archive/1_7_801229657.dbf thread=1 sequence=7
archive log filename=/oracle/archive/1_8_801229657.dbf thread=1 sequence=8
archive log filename=/oracle/archive/1_9_801229657.dbf thread=1 sequence=9
RMAN-11006: WARNING: test recovery results:
ORA-10574: Test recovery did not corrupt any data block
ORA-10573: Test recovery tested redo from change 2779426987 to 2779427975
ORA-10572: Test recovery canceled due to errors
ORA-10581: Can not modify redo log header during test recovery
media recovery complete, elapsed time: 00:00:00
Finished recover at 05-DEC-12

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

The retention period of Oracle database logs depends on the log type and configuration, including: Redo logs: determined by the maximum size configured with the "LOG_ARCHIVE_DEST" parameter. Archived redo logs: Determined by the maximum size configured by the "DB_RECOVERY_FILE_DEST_SIZE" parameter. Online redo logs: not archived, lost when the database is restarted, and the retention period is consistent with the instance running time. Audit log: Configured by the "AUDIT_TRAIL" parameter, retained for 30 days by default.

The function in Oracle to calculate the number of days between two dates is DATEDIFF(). The specific usage is as follows: Specify the time interval unit: interval (such as day, month, year) Specify two date values: date1 and date2DATEDIFF(interval, date1, date2) Return the difference in days

The Oracle database startup sequence is: 1. Check the preconditions; 2. Start the listener; 3. Start the database instance; 4. Wait for the database to open; 5. Connect to the database; 6. Verify the database status; 7. Enable the service (if necessary ); 8. Test the connection.

The INTERVAL data type in Oracle is used to represent time intervals. The syntax is INTERVAL <precision> <unit>. You can use addition, subtraction, multiplication and division operations to operate INTERVAL, which is suitable for scenarios such as storing time data and calculating date differences.

The amount of memory required by Oracle depends on database size, activity level, and required performance level: for storing data buffers, index buffers, executing SQL statements, and managing the data dictionary cache. The exact amount is affected by database size, activity level, and required performance level. Best practices include setting the appropriate SGA size, sizing SGA components, using AMM, and monitoring memory usage.

To find the number of occurrences of a character in Oracle, perform the following steps: Get the total length of a string; Get the length of the substring in which a character occurs; Count the number of occurrences of a character by subtracting the substring length from the total length.

Oracle database server hardware configuration requirements: Processor: multi-core, with a main frequency of at least 2.5 GHz. For large databases, 32 cores or more are recommended. Memory: At least 8GB for small databases, 16-64GB for medium sizes, up to 512GB or more for large databases or heavy workloads. Storage: SSD or NVMe disks, RAID arrays for redundancy and performance. Network: High-speed network (10GbE or higher), dedicated network card, low-latency network. Others: Stable power supply, redundant components, compatible operating system and software, heat dissipation and cooling system.

The method of replacing strings in Oracle is to use the REPLACE function. The syntax of this function is: REPLACE(string, search_string, replace_string). Usage steps: 1. Identify the substring to be replaced; 2. Determine the new string to replace the substring; 3. Use the REPLACE function to replace. Advanced usage includes: multiple replacements, case sensitivity, special character replacement, etc.
