Actual measurement and comparison of RMAN and EXP/IMP Transfer Data

Source: Internet
Author: User
Because the project often needs to export the customer's on-site data to the company's development environment, as the customer's on-site data volume increases, the original export and import method takes longer and longer time, test the RMAN efficiency and verify whether the restore RMAN backup method can be used instead of the previous EXPIMP method. I used to think about how to transmit tablespaces.

Because the project often needs to export the customer's on-site data to the company's development environment, as the customer's on-site data volume increases, the original export and import method takes longer and longer time, test the RMAN efficiency and verify whether the restoration of RMAN backup can be used instead of the previous EXP/IMP method. I used to think about how to transmit tablespaces.

Because the project often needs to export the customer's on-site data to the company's development environment, as the customer's on-site data volume increases, the original export and import method takes longer and longer time, test the RMAN efficiency and verify whether the restoration of RMAN backup can be used instead of the previous EXP/IMP method. I originally thought about using the tablespace transfer method, but since we usually create a large data file for the tablespace used by the business at the time of creation, in this way, it takes a long time to copy the data file of the tablespace, so we decided to test RMAN.

Purpose:

Implement data transfer for JHJKREC users. Test on 10.101.48.71.

Test environment:

P42.8G single CPU, 1 GB memory, 80 GB single hard disk, Windows 2000 Server, Oracle817 and JHJK user-related data files total size: 21.4 GB, of which JHJKREC user object total size is: 2.1 GB

1. RMAN performs full backup. It takes 20 minutes to generate the file size 5.47GEXP for JHJKREC user data export. At 2 minutes 20 seconds, the file size is 546 MB.

2. RMAN is used for data recovery. It takes 23 minutes (including restore data files and recover database) for IMP to import JHJKREC user data. It takes 55 minutes.

3. In non-archive mode, RMAN backup needs to shut down the database and then start the database to the mount state. EXP does not need to shut down the database in non-archive mode, but the data table itself is inconsistent.

Conclusion:

The backup time of RMAN is significantly longer than EXP, And the backup time is much larger than EXP, but the recovery time is less than the time required by IMP. To recover from RMAN, you also need to back up the control file. In non-archive mode, you also need to check the maximum SCN that can be restored, and then ecover database until change scn in SQLPLUS, then alter database open resetlogs. The entire operation is more complex than EXP/IMP, which may be difficult for Field Service personnel. Therefore, we recommend using RMAN to export and import data for data transfer.

The following are the commands used to test RMAN and export and import, which are basically not optimized.

RMAN backup script:
@ Connect. rcv
# Backup up database at full level
#
Shutdown immediate;
Startup mount;
Run {
Allocate channel d1 type disk;
Set limit channel d1 kbytes 2097150;
Backup full database
Format 'e: \ rman_bak \ dbfull _ % d _ % s _ % p _ % t'
Tag = 'dbfull ';
Release channel d1;
}
Alter database open;
Exit;
RMAN recovery script:
@ Connect. rcv
Shutdown immediate;
Startup mount;
Run {
SQL "alter session set nls_date_language = AMERICAN ";
SQL "alter session set nls_date_format = ''yyyy-mm-dd hh24: mi: s ''";
Set until time '2017-9-7 15:30:00 ';
Allocate channel category type disk;
Restore database;
Release channel identifier;
}
Exit;
EXP script:
Userid = jhjkrec/jhjkrec
File = e: \ rman_bak \ jhjkrec. dmp
Owner = jhjkrec
Direct = n
Compress = n
Feedback= 1000
IMP script:
Userid = jhjkrec/jhjkrec
File = e: \ rman_bak \ jhjkrec. dmp
Ignore = y
Fromuser = jhjkrec
Touser = jhjkrec
Feedback= 1000

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.