When Will cold backup occur in Oracle databases?

Source: Internet
Author: User

Oracle databases have three different standard backups. That is, EXPORT and IMPORT (EXPORT/IMPORT), cold backup, and hot backup. The so-called export backup is a logical backup. This method includes reading a series of database logs and writing them into files. The reading of these logs is not related to the location.

Cold backup and hot backup are physical backups (also known as low-level backups) that involve the files that make up the database, but do not consider the logical content.

The following describes the three backup methods and their features:

(1) EXPORT/IMPORT (EXPORT/IMPORT)

EXPORT/IMPORT is used to remove data from/into the Oracle database.

1. EXPORT backs up the data in the database into a binary system FILE, which is called the "export dump file" and writes the generated database to the FILE again.

It has three modes:

A. User Mode: export data of all user objects and objects;

B. Table mode: export all or specified tables of the user;

C. entire database: export all objects in the database.

There are three types of backup:

A. complete export: backs up the entire Oracle database;

B. COMULATIVE ERPORT: Back up the data changed in the previous accumulation backup;

C. incremental (increamental export): The data changed after the last backup.

The EXPORT command can be performed interactively. For the specific meanings of each parameter, see the appendix.

When exporting a backup, we need to consider one issue, that is, the export consistency. During the export process, each read is read from a table, therefore, although the export operation starts on its own when it is a feature, the reading time of different tables is different. Therefore, when the export operation starts to read a table, the data in the table is the exported data.

In this way, when most tables are connected by internal and external keywords, changes to these associated tables during the export process will lead to inconsistent export, we can schedule the export process without table operations. In addition, the restrictep consistent option in Oracle ensures data consistency during export.

2. IMPORT:

The import process is the inverse process of the export. This command First reads the exported dump binary file and runs the file to restore the user and data of the object.

The method for executing the IMPORT command is related to the EXPORT scheme.

1. If the EXPORT implements the FULL mode scheme, all data objects, including tablespaces and data files, will be created during IMPORT, however, given the physical layout of the database, it is useful to create tablespaces and users in advance.

2. If the EXPORT uses the INCREMENTAL/CUMULATIVE mode, you must set the tablespace, user, and data file in advance.

(2) Cold backup

Cold backup occurs when the database is shut down normally. When the database is shut down normally, a complete Oracle database is provided.

Every file used by the database is backed up. These files include:

All data files

All control files

All online redo log files

INIT. ORA file (optional)

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

The general steps for cold backup are as follows:

1: Shut down the instance to be backed up normally );

2: Back up the entire Oracle database to a directory

3: Start the database

1:

 
 
  1. SQLDBA>connect internal  
  2. SQLDBA>shutdown normal 

2:

 
 
  1. SQLDBA>! cp <file> <backup directory> 

Or

 
 
  1. SQLDBA>!tar cvf /dev/rmt/0 /wwwdg/Oracle 

3:

 
 
  1. SQLDBA>startup 

The above content is a description of the cold backup of Oracle Database with three standard backups. I hope it will help you in this regard.

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.