RMAN uses backup to transmit tablespaces by Time Point

Source: Internet
Author: User
If the target time is specified for the transporttablespace command during the tablespace transfer operation, RMAN will use backup in the secondary instance to restore the tablespace to the target

If the destination time is specified for the transport tablespace command during the tablespace transfer operation, RMAN will use backup in the secondary instance to restore the tablespace to the target

Use until time or SCN to execute transport tablespace
If the destination time is specified for the transport tablespace command during the tablespace transfer operation, then, RMAN restores the tablespace to the target time using backup in the secondary instance, and restores the secondary database to the specified target time point by time. (Backup and redo logs required for recovery by time point must be available)
You can use SCN (including the current incarnation or ancestors incarnation), log serial number, restore origin, or time expression to restore the target time.

Use SCN to execute transport tablespace
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.

Modify the records in the tspitr and test tables, record the current SCN before modification, and specify this SCN when performing the tablespace Transfer
SQL> conn tspitr/tspitr
Connected.
SQL> select current_scn from v $ database;

CURRENT_SCN
-----------
1167731

SQL> select to_char (scn_to_timestamp (1167731), 'yyyy-mm-dd hh24: mi: ss') from dual;

TO_CHAR (SCN_TO_TIME
-------------------
2015-03-27 16:48:29


SQL> insert into tspitr select * from tspitr;

50641 rows created.

SQL> commit;

Commit complete.

SQL> select count (*) from tspitr

COUNT (*)
----------
101282


SQL> conn test/test
Connected.
SQL> select count (*) from test;

COUNT (*)
----------
50680
SQL> delete from test;

50680 rows deleted.

SQL> commit;

Commit complete.

SQL> select count (*) from test;

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


After SCN = 1167731, the number of records in the tspitr table is 101282, the number of test records is 0, and before SCN = 1167731, the number of records in the tspitr table is 50641, and the number of test records in the table is 50680.

3. to back up the source database, you must add include current controlfile when performing the backup. Otherwise, the following error message will appear 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 sys/zzh_2046 @ test catalog rman/rman @ jy

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;

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.