Oracle data backup and recovery Configuration

Source: Internet
Author: User
DBA's goal is to reduce MTTR (the average recovery time is the downtime after the database fails. The solution is practice, practice, and practice! Continuous simulation experiments) and Data

DBA's goal is to reduce MTTR (the average recovery time is the downtime after the database fails. The solution is practice, practice, and practice! Continuous simulation experiments) and Data

The most important task for a database administrator is to ensure that the database does not lose data. The redo and revoke mechanisms ensure that the database will never have a commit error no matter what operations the DBA has performed. However, if DBA does not take any preventive measures, the Oracle database may still lose data. Therefore, we must configure the Oracle database to avoid data loss under any circumstances, at the same time, the configuration environment is fully available.

DBA's goal is to reduce MTTR (the average recovery time is the downtime after the database fails. The solution is practice, practice, and practice! Continuous simulation experiments) and Data loss (solution: Data Guard) Increase MTBF (average failure time is the frequency of database failures. solution: RAC and Streams ).

There are various causes of Database Failure:

A SQL statement may fail for multiple reasons. For example, invalid data is a common cause of statement failure, this is usually caused by violation of the format or integrity constraints. The DBA must work with the user to handle the problem so that the data is correct and valid, in addition, these operations must be performed automatically with the programmer. The second reason is that the logic error in the application, for example, deadlocks and attempts to insert a note before the parent record. space management is a common problem and should not occur, the capacity of the space should be promptly discovered or predicted.

User process failure, abnormal exit of user non-logout, terminal restart, and program that causes address violation may cause user process failure, but the result is the same. The PMON background process regularly polls all server processes to determine the session status. If a server process report loses contact with its user process, the PMON process will solve this problem.

If the network fails, DBAs should use Oracle Net to prevent network failures. Pay attention to the following three aspects: listeners, network interface cards, and routes.

A user error occurs. Oracle is concerned with transactions. The "D" that represents "persistent Durability" in the ACID test specifies that once a transaction is committed, all other users must be able to see the changes immediately, and these changes are absolutely irreversible. However, for DML (Data Manipulation Language Data operation Language-used to retrieve or modify Data) errors, errors found before submission still have the opportunity to roll back, however, for DDL statements (Data Definition Language-used to define the Data structure, such as creating, modifying, or deleting database objects), you cannot roll back the wrong statements. Solution:

Flash back query, such

-- Delete all data in table emp

Delete from emp;

-- Submit a transaction

Commit;

-- The query result is 0.

Select count (*) from emp;

-- Insert data in the emp table five minutes ago

Inset into emp select * from emp as of timestamp (syadata-5/24/60 );

-- Submit a transaction

Commit;

-- The query result is not zero.

Select count (*) from emp;

Flash back deletion, such

-- Delete table emp

Drop table emp;

-- The table does not exist.

Desc emp;

-- Flashback Deletion

Flashback table emp to before drop;

-- Query. The table exists.

Desc emp;

Log MinerC is an advanced tool for extracting information from online and archived redo logs. Log Miner is similar to the flashback query, but Log Miner is not limited by time. It extracts and revokes data from the redo Log, and the flashback query is the Undo data that exists in the currently undo segment.

The media fails and the disk is damaged. Use control files, online redo logs, and data files for database recovery.

An instance failure is a crash instance that does not need to be closed ).

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.