Oracle restores tablespace data in a TSPITR way

Source: Internet
Author: User

The most commonly seen restore operation is to restore all tablespace and data to the same point in time, whether it is a recovery point or not. Tspitr, however, is to restore a table-space content to a specific recoverable point in a single table space as a granular unit.

As an example: an Oracle database runs in archive mode and retains a full backup at night 22 o'clock. At 8 o ' Day in the morning, a data table on a particular tablespace (a single table exclusive table space) takes a wrong operation and the data is corrupted. Requires that the tablespace data be restored to 5 a.m. in the morning without harming other data table data. This partial data recovery scenario is a typical application of TSPITR. In a real-world scenario, it is often desirable to restore part of the data to a past point in time.

The most convenient method for Tspitr is to use RMAN for automatic recovery.

The use of the premises is two:

1. A corresponding backup collection must exist

2. Tablespace objects are sub-contained, that is, other table spaces do not include object data related to this Tablespace object (independent of each other)

The recovery steps and principles are as follows:

RMAN Three collection of objects: catalog, target, and auxiliary. The auxiliary is the operational database that is used to assist Target's various backup and restore requirements. This library plays the role of temporary data reduction in TSPITR;

First, complete the data inspection work, determine the backup set and table space integrity;

The current time is T1, if you need to restore the data to T0. Use RMAN to extract the collection of backup data and revert to auxiliary to form a new instance database. Selectively apply archived log sequences to restore auxiliary to point-in-time;

Use the EXPDP tool to export the target table space as a dump object from the auxiliary. Note: Restoring auxiliary is not 100% rebuilding target, but choosing the system running table space and target table space;

Delete the original table space in the target database. Use the IMPDP tool to import the dump file into the target database;

Cleans up the environment and deletes the created auxiliary database.

This series of operations can be done incrementally if using the RMAN command series. Automating the tspitr operation of RMAN is also a complete automated operation of the process.

Here's an experiment to demonstrate the operation:

--Create a test user zlm and give permissions

      • This article is from: Linux Learning Tutorial Network

Oracle restores tablespace data in a TSPITR way

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.