Oracle DB executes tablespace recovery at a time point

Source: Internet
Author: User

• List table space recovery at execution time (TSPITR) operations that will occur • Definitions of terms used by TSPITR • determining the appropriate conditions for using TSPITR as a solution • determining the correct target time for time point recovery • determining the cases where TSPITR cannot be used and solution • Execute automatic TSPITR

  • Table Space Time Point recovery (TSPITR): Concept
• You can execute TSPITR to quickly restore one or more tablespaces to a previous time. • Executing TSPITR will not affect the status of other tablespaces or objects in the database. Using RMAN automatic tablespace time point recovery (TSPITR) can quickly restore one or more tablespaces in Oracle DB to a previous time without affecting the statuses of other tablespaces and objects in the database.
  • Table Space Time Point recovery (TSPITR): Terminology
• Target time: the time point at which the tablespace is restored or SCN • recovery set: the data file that makes up the tablespace to be restored • Secondary Set: required to execute TSPITR on the recovery set, but it does not belong to the data file of the recovery set. The auxiliary set usually includes:-SYSTEM tablespace-restored tablespace-temporary tablespace • secondary objective: the disk location of the stored file. The following terms are used when discussing TSPITR: • target time: the time point at which the tablespace will be restored or the system change number (SCN) during the execution of TSPITR ). • Recovery set: data files that constitute the tablespace to be restored. • Secondary Set: It is required to execute TSPITR on the recovery set, but it is not a data file of the recovery set. The secondary set usually includes:-a copy of the SYSTEM tablespace-contains data files from the restoration segment of the target instance-temporary tablespace used when exporting database objects from the secondary instance in some cases • secondary target: during the execution of TSPITR, any auxiliary set data files, control files, and online logs of the secondary instance are stored on the disk. After TSPITR is executed, you can delete the files stored in the secondary target.
  • Tablespace time point recovery: Architecture
The following TSPITR entities are displayed in the chart: • target database: including the tablespace to be restored • control file: provide backup information to RMAN • backup set: from target database, source for table space reconstruction • archive redo logs: source from the target database for table space reconstruction • Secondary instance: the Oracle DB instance RMAN used for recovery during the recovery process performs the following steps during the recovery of the tablespace: 1. restore the backup control file at a certain time point before the target time to the secondary instance. Restore the data files of the recovery set to the target database, and restore the data files of the secondary set to the secondary instance. 2. Restore the restored data file to the specified time point. 3. Export the dictionary metadata of objects in the restored tablespace to the target database. 4. Run the SWITCH command on the target database to direct the control file of the target database to the recovered data files in the secondary instance. 5. Import the dictionary metadata in the secondary instance to the target instance to access the recovered object.
  • When to use TSPITR
• TSPITR can be used in the following scenarios: -recover data lost due to incorrect truncate table statements-recover from logical damage to the TABLE-Undo only affects the batch jobs of some databases or the results of DML statements-restore the logical solution to physical the rest of the database at different time points • TSPITR uses removable tablespace and Data Pumps, provides the following new features and features:-TSPITR can be used to restore deleted tablespaces-repeated execution of TSPITR to multiple time points before the tablespace is online, without using the recovery directory rman tspitr: • recover data lost due to incorrect truncate table statements • recover from logical corruption • undo operations that only affect the database subset incorrect batch processing jobs or other data manipulation languages (DML)) statement Results • Restore the logical solution to a different time point from the other parts of the physical Database before Oracle Database 11g Release 2, TSPITR is exported and imported for processing. TSPITR now uses removable tablespaces and Data Pumps. Due to this change in the underlying technology, you can use TSPITR to restore the deleted tablespace. In addition, you can execute TSPITR repeatedly to restore to different time points without the need to use the Restore directory.
  • Prepare for TSPITR
To prepare for TSPITR, perform the following steps: • determine the correct target time. • Determine the content required for the recovery set. • Determine and retain the objects that will be lost after TSPITR is executed. Before executing TSPITR, you must determine the correct recovery target time. Determine whether other tablespaces are required in the recovery set. You should estimate which objects will be lost after performing the TSPITR operation, and then determine how to keep these objects.
  • Determine the correct target time
• TSPITR cannot be executed again unless the recovery directory is used. • After TSPITR is executed and the tablespace is connected online, earlier backups cannot be used. • Use the following methods to determine the correct target time:-flash back query-flash back transaction processing query-flash back VERSION Query • a simple alternative to TSPITR: flash back data (if the data can still be restored ). It is extremely important to select the correct target time or SCN when executing TSPITR. After TSPITR is executed and the tablespace is brought online, no backup can be used earlier than when the tablespace is online. In fact, this means that after selecting the wrong target time for the first time, you cannot try to execute TSPITR again unless the directory is restored. However, if the directory is restored, You can execute repeated TSPITR operations to restore to different target times. If the Restore directory is not used, the current control file does not contain the old prototype records of the restored tablespace. When the current control file containing the tablespace is used for restoration, the backup created before the tablespace is online cannot be used. However, you can restore the database to any point in time before or equal to when the tablespace is online, the premise is that the backup control file can be restored from a time point earlier than this time point. You can use Oracle flash back query, Oracle flash back transaction processing query, and Oracle flash back version query to view the changes made to the database and help determine the correct target time of TSPITR. NOTE: With the flash back tool and data that can still be used to restore data, it is easier to use the flash back tool to restore unsatisfactory changes than to use TSPITR for restoration.

For more details, please continue to read the 2nd page content:

Oracle Undo image data exploration

Oracle ROLLBACK and Undo)

The Undo tablespace cannot be opened because it is damaged.

How to handle Undo tablespace failures

Oracle Undo tablespace reconstruction and restoration

  • 1
  • 2
  • Next Page

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.