Oracle backup recovery Overview

Source: Internet
Author: User

Oracle backup recovery overview introduces that backup recovery is an important technology of oracle. Of course, we 'd better not use this technology, just as we do not need to go to the hospital. When you open the database, oracle compares the control file with the data file header checkpoint: 1. check whether the checkpoint cnt in the data file header is consistent with the checkpoint cnt in the control file. If yes, perform the second check. check that the SCN at the beginning of the data file header is compared with the ending SCN in the control file. If they are consistent, no recovery is required, but if they are inconsistent, such as sudden power failure, the control file has not had time to record the ending SCN of the data file, so the second step cannot pass. Of course, all backups are actually for faster recovery. Therefore, when developing a backup policy, we must take into account many backup categories: type classification: Logical backup and physical backup database status: hot Backup and cold backup: consistent backup and non-consistent backup scale: Full backup (archive and non-archive), tablespace backup, data file backup, control file backup, archive log file backup recovery classification: instance recovery, media recovery methods: full recovery and Incomplete recovery common Backup Recovery Technologies: 1. user Management backup and recovery 2. RMAN backup and recovery 3. flashback 4. logical Import and Export: exp/imp expdp/empdp5.data guard. Of course, DG is used for Disaster Tolerance. In the end, we will introduce the simplest technology of backup today, calculate the head and flash back query: this feature is actually attributed to UNDO. Flash back query is actually the data that has been queried by the UNDO operation, so if the operated data is not in the UNDO, then you cannot flash back the query. For example, for an update operation, after the operation, the data to be operated before the update will be constructed in the UNDO, so you can use the flashback query immediately. Of course, if your update operation is incorrect, you can flash back, but if UNDO already overwrites the operation data, it cannot flash back. As we all know, the UNDO data is retained based on certain parameters and will be overwritten after this time. Supported types: 1. SCN-based flash query (as of scn) 2. for example, SQL> create table flash_table_scn as select * from dba_objects where rownum <= 1000; Table created. SQL> select count (*) from flash_table_scn; COUNT (*) limit 1000 SQL> SELECT DBMS_FLASHBACK.GET_SYSTEM_CHANGE_NUMBER FROM DUAL; GET_SYSTEM_CHANGE_NUMBER ----------------------------------- --------------- 122693324625 SQL> delete from flash_table_scn; 1000 rows deleted. SQL> commit; Commit complete. SQL> select count (*) from flash_table_scn as of scn 122693324625; COUNT (*) limit 1000as of timestamp or SQL converted to as of scn> select timestamp_to_scn (sysdate) from dual; TIMESTAMP_TO_SCN (SYSDATE) -------------------------------------------------- 1226 93325694 SQL> select to_char (scn_to_timestamp (122693325694), 'yyyy-mm-dd hh24: mi: ss') from dual; TO_CHAR (SCN_TO_TIMESTAMP (Limit 17:21:56 can be converted because SMON_SCN_TIME is the table, the corresponding data of time and SCN is recorded here, so if this table does not have a corresponding data, it cannot be converted.

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.