Oracle Database File recovery and backup ideas

Source: Internet
Author: User
Any database may have certain security risks during its long-term use. For the database administrator, instead of simply setting up

Any database may have certain security risks during its long-term use. For the database administrator, instead of simply setting up

Any database may have certain security risks during its long-term use. For database administrators, a complete set of database backup and recovery mechanisms should not only be intended for the secure operation of computer operating systems. When the database fails, you want to re-establish a complete database, which is called database recovery. The restoration subsystem is an important part of the database management system. The recovery process changes with the structure affected by the fault type. How can I back up an Oracle database? How can we restore Deleted Data? This is the main content of this article.

Oracle databases use several structures to protect data: database backup, logs, rollback segments, and control files. Each instance of an Oracle database has an associated online log. An online log consists of multiple online log files. Fill in the online redo log file with the redo entry. The data recorded in the log entry is used to reconstruct all modifications made to the database.

I. How to restore and back up databases

Importing and exporting Oracle Data imp/exp is equivalent to restoring and backing up oracle data. The exp command can export data from the remote database server to the local dmp file, and the imp command can import the dmp file from the local to the distant database server. This function can be used to build two identical databases, one for testing and the other for formal use.

Oracle supports three types of output: Table mode (T mode), data export and user mode (U mode) of the specified table ), export all objects and data of the specified user), Full database (Full mode), and all objects in the databases database.

The data Import process is the inverse process of data Export (Export). The data files are imported into the database and the database data is exported to the data file respectively.

Incremental export is a common data backup method. It can only be implemented for the entire database and must be exported as a SYSTEM. During this export, the system does not require any answers. The default export file name is export. dmp. If you do not want your output file to be named export. dmp, you must specify the file name to use in the command line. Incremental export includes three types: "full" incremental export, "incremental" incremental export, and "cumulative" incremental export. The database administrator can schedule a backup schedule and export data in three different ways.

Ii. Backup

There are two types of backup: Cold backup and hot backup. Cold backup occurs when the database is shut down normally. When the database is shut down normally, it will provide us with a complete database. This article describes how to copy key files to another location during cold backup. The fastest and safest way to back up Oracle information during cold backup. Advantages of cold backup:

1. It is a very fast backup method (just copy files)

2. Easy to archive (simple copy)

3. It is easy to restore to a certain point in time (you only need to copy the file back)

4. It can be combined with the archiving method to restore the database in the "best state.

5. Low maintenance and high security.

However, cold backup also has the following shortcomings:

1. When used separately, only recovery at a certain time point can be provided.

2. During the whole backup process, the database must be backed up instead of other work. That is to say, in the cold backup process, the database must be closed.

3. If the disk space is limited, it can only be copied to tape and other external storage devices, and the speed will be very slow.

4. data cannot be restored by table or by user.

If possible (mainly for efficiency), back up the information to the disk, start the database (allowing the user to work), and copy the backup information to the tape, the database can also work ). Files that must be copied in cold backup include:

1. All data files

2. All control files

3. All online redo log files

4. Init. ora file (optional)

It is worth noting that cold backup must be performed when the database is closed. When the database is turned on, the execution of database file system backup is invalid.

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.