RMAN uses backup to transmit customized table space operations

Source: Internet
Author: User
You can specify the storage directory of dump files and exported log files by specifying the datapumpdirectory clause. The datapumpdirectory clause uses the database directory object name,

You can specify the storage directory of dump files and exported log files by specifying the datapump directory clause. The datapumpdirectory clause uses the database directory object name,

Specify the Data Pump file directory when the tablespace is being transferred
You can modify the dump file name exported by Data Pump of the tablespace set to be transferred, and the sample script name and log file name. By default, these files
It is stored in the tablespace directory and the default name is as follows:
The dump file exported by. Data Pump is named dmpfile. dmp.
. Export the log file explog. log
. Example script impscrpt. SQL

You can specify the storage directory of dump files and exported log files by specifying the datapump directory clause. The datapumpdirectory clause uses the database directory object name rather than the directory path of the file system directory.

The following example uses the transport tablespace command that specifies the datapump directory, dump file, export log, and import script file name to execute table space transmission.

-------------------------------------- Recommended reading --------------------------------------

RMAN: Configure an archive log deletion policy

Basic Oracle tutorial-copying a database through RMAN

Reference for RMAN backup policy formulation

RMAN backup learning notes

Oracle Database Backup encryption RMAN Encryption

-------------------------------------- Split line --------------------------------------

1. Check whether the platform of the source database and target database is the operating system platform supported by the table space transfer.
Confirm the source database operating system platform:
SQL> select d. platform_name, endian_format from v $ transportable_platform tp, v $ database d
2 where tp. platform_name = d. platform_name;

PLATFORM_NAME ENDIAN_FORMAT
Certificate -------------------------------------------------------------------------------------------------------------------
Linux IA (32-bit) Little

Confirm the target database operating system platform:
SQL> select d. platform_name, endian_format from v $ transportable_platform tp, v $ database d
2 where tp. platform_name = d. platform_name;

PLATFORM_NAME ENDIAN_FORMAT
Certificate -------------------------------------------------------------------------------------------------------------------
Linux IA (32-bit) Little


Here, the operating system platforms are all Linux

2. Check whether the tablespace to be transmitted is a self-contained tablespace (TSPITR, TEST ):
SQL> exec sys. dbms_tts.transport_set_check ('tspitr', true );

PL/SQL procedure successfully completed.


SQL> exec sys. dbms_tts.transport_set_check ('test', true );

PL/SQL procedure successfully completed.

SQL> select * from sys. transport_set_violations;

No rows selected

If no rows are selected, the tablespace contains only table data and can be transmitted.
SQL> select count (*) from tspitr. tspitr;

COUNT (*)
----------
0

SQL> select count (*) from test. test;

COUNT (*)
----------
50683

3. Back up the source database. You must add include current controlfile when performing the backup. Otherwise, the following error message appears when you run the transport tablespace command:
Automatic instance removed
RMAN-00571: ========================================================== ==============================
RMAN-00569: ==================== error message stack follows ==========================
RMAN-00571: ========================================================== ==============================
RMAN-03002: failure of tranport tablespace command at 03/26/2015 20:24:22
RMAN-03015: error occurred in stored script Memory Script
RMAN-06026: some targets not found-aborting restore
RMAN-06024: no backup or copy of the control file found to restore

[Oracle @ oracle11g admin] $ export NLS_DATE_FORMAT = 'yyyy-mm-dd hh24: mi: ss'
[Oracle @ oracle11g admin] $ rman target catalog

Recovery Manager: Release 10.2.0.5.0-Production on Thu Mar 26 20:01:33 2015

Copyright (c) 1982,200 7, Oracle. All rights reserved.

Connected to target database: TEST (DBID = 2168949517)
Connected to recovery catalog database

RMAN> backup as backupset database include current controlfile plus archivelog;


Starting backup at 20:32:19
Current log archived
Using channel ORA_DISK_1
Channel ORA_DISK_1: starting archive log backupset
Channel ORA_DISK_1: specifying archive log (s) in backup set
Input archive log thread = 1 sequence = 68 recid = 75 stamp = 875286167
Input archive log thread = 1 sequence = 69 recid = 76 stamp = 875291999
Input archive log thread = 1 sequence = 70 recid = 77 stamp = 875302397
Input archive log thread = 1 sequence = 71 recid = 78 stamp = 875308491
Input archive log thread = 1 sequence = 72 recid = 79 stamp = 875350203
Input archive log thread = 1 sequence = 73 recid = 80 stamp = 875351397
Input archive log thread = 1 sequence = 74 recid = 81 stamp = 875390545
Input archive log thread = 1 sequence = 75 recid = 82 stamp = 875390643
Input archive log thread = 1 sequence = 76 recid = 83 stamp = 875391627
Input archive log thread = 1 sequence = 77 recid = 84 stamp = 875391661
Input archive log thread = 1 sequence = 78 recid = 85 stamp = 875391764
Input archive log thread = 1 sequence = 79 recid = 86 stamp = 875392340
Channel ORA_DISK_1: starting piece 1 at 2015-03-26 20:32:22
Channel ORA_DISK_1: finished piece 1 at 2015-03-26 20:32:29
Piece handle =/u02/ora_test87539234213991 tag = TAG20150326T203220 comment = NONE
Channel ORA_DISK_1: backup set complete, elapsed time: 00:00:08
Finished backup at 2015-03-26 20:32:29

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.