Logical backup of Oracle Database (1)

Source: Internet
Author: User

ORACLE databases have two backup methods. The first type is physical backup. This method enables complete database recovery, but the database must run in the centralized mode and the Business Database runs in the non-centralized mode ), this method requires a large number of external storage devices, such as tape libraries. The second type of backup mode is logical backup, which is used by the business database. This method does not require the database to run in the back-to-back mode, which is not only simple, in addition, external storage devices are not required. Database logical backup methods ORACLE database logical backup is divided into three modes: Table backup, user backup, and full backup.

Table mode

Back up the specified object table in a user mode ). Business databases usually adopt this backup method. To back up a local file, run the following command:

Exp icdmain/icd rows = y indexes = n compress = n buffer = 65536
Feedback= 100000 volsize = 0
File = exp_icdmain_csd_yyyymmdd.dmp
Log = exp_icdmain_csd_yyyymmdd.log
Tables = icdmain. commoninformation, icdmain. serviceinfo, icdmain. dealinfo

If you back up the data directly to a tape device, run the following command:
Exp icdmain/icd rows = y indexes = n compress = n buffer = 65536
Feedback= 100000 volsize = 0
File =/dev/rmt0
Log = exp_icdmain_csd_yyyymmdd.log
Tables = icdmain. commoninformation, icdmain. serviceinfo, icdmain. dealinfo

Note: If the disk space permits, back up the data to the local server and copy the data to the tape. For speed considerations, do not back up data directly to tape devices.

User Mode

Back up all objects in a user mode. Business databases usually adopt this backup method. To back up a local file, run the following command:

Exp icdmain/icd owner = icdmain rows = y indexes = n compress = n buffer = 65536
Feedback= 100000 volsize = 0
File = exp_icdmain_yyyymmdd.dmp
Log = exp_icdmain_yyyymmdd.log

If you back up the data directly to a tape device, run the following command:

Exp icdmain/icd owner = icdmain rows = y indexes = n compress = n buffer = 65536
Feedback= 100000 volsize = 0
File =/dev/rmt0
Log = exp_icdmain_yyyymmdd.log

Note: If the disk has space, we recommend that you back up the disk and then copy it to the tape. If the database data volume is small, backup can be performed in this way.

Full Mode

Back up the complete database. Business databases do not adopt this backup method. The backup command is:

Exp icdmain/icd rows = y indexes = n compress = n buffer = 65536
Feedback= 100000 volsize = 0 full = y
File = exp_fulldb_yyyymmdd.dmp (the tape device is/dev/rmt0)
Log = exp_fulldb_yyyymmdd.log

For database backup, Incremental backup is recommended, that is, only the data changed since the last backup is backed up. Incremental Backup command:

Exp icdmain/icd rows = y indexes = n compress = n buffer = 65536
Feedback = 100000 volsize = 0 full = y inctype = incremental
File = exp_fulldb_yyyymmdd.dmp (the tape device is/dev/rmt0)
Log = exp_fulldb_yyyymmdd.log

Note: Incremental Backup must meet the following requirements:
1. It is only valid for full database backup and requires the full = y parameter for the first time. The inctype = incremental parameter will be required later.
2. You must have an EXP_FULL_DATABASE system role.
3. Database Backup can be used if the traffic volume is small.
4. If the disk has space, we recommend that you back up it to the disk and back up it to the tape.

Before using EXP to back up a business database, run the CATEXP. SQL file under the SYS user. If the file has been run before, do not execute this script ).
The backup command cannot be executed on the client unless otherwise specified.

For the BACKUP command, refer to the BACKUP command in Table mode.


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.