watermark,size_16,text_QDUxQ1RP5Y2a5a6i,color_FFFFFF,t_100,g_se,x_10,y_10,shadow_90,type_ZmFuZ3poZW5naGVpdGk=

          subject         part

stay Oracle in ,TSPITR( Tablespace is based on point in time recovery ) What is it? ?


     
          Answer section          


TSPITR(Tablespace Point-In-Time Recover, Tablespace is based on point in time recovery ) Also known as a small range of incomplete recovery , Used to restore one or more tablespaces to the state of a point in time in the past , Other tablespaces remain in their existing state . Through execution TSPITR You can quickly restore one or more tablespaces to a previous time . perform TSPITR Does not affect the state of other tablespaces or objects in the database .

The following concepts are worth learning :

l DBPITR(Database Point-In-Time Recovery, Database point in time recovery ) Represents to restore all tablespaces of the database to the state of the past point in time . Be careful ,DBPITR Only applicable to ARCHIVELOG Pattern .

l  Master database (Primary Database) It refers to the database used to store application system data , Also known as product database or target database or Source Database. When executed TSPITR when , The primary database is the database that contains the recovered tablespaces .

l  Recovery set (Recovery Set) It refers to the execution on the main database TSPITR Set of tablespaces . Be careful , When executed on the tablespace of the recovery set TSPITR when , These tablespaces are required to be self-contained .

l  Secondary database (Auxiliary Database) It's a replica database of the primary database . When executed TSPITR when , The secondary database is used to recover the recovery set tablespace to a point in the past . Be careful , All the physical files of the secondary database are obtained from the backup of the primary database , And the secondary database must contain SYSTEM Table space 、Undo Backup files for tablespaces and recovery set tablespaces .

l  Auxiliary set (Auxiliary Set) It refers to the auxiliary database 、 A collection of files other than recovery set tablespace files . When executed TSPITR when , The secondary database needs to recover the backup files of the set tablespace , You also need to control file backups 、SYSTEM Backup files for tablespaces 、Undo Backup files for tablespaces .

TSPITR It can be used in the following situations :

① Recover from wrong TRUNCATE TABLE Statement and lost data .

② Recover from table logical corruption .

③ Undo only affects batch jobs or DML Result of statement .

④ Restore the logical solution to a different point in time than the rest of the physical database .

TSPITR Use removable tablespaces and data pumps , The following new features and features are available :

Ø TSPITR Can be used to recover deleted tablespaces .

Ø  Can be executed repeatedly TSPITR Restore to multiple points in time before tablespace online , Without using the recovery Directory .

stay Oracle 11gR2 Before ,TSPITR Use export and import for processing , Now we use the mobile tablespace and data pump . Because of this change in underlying technology , Now you can use TSPITR To recover deleted tablespaces .

RMAN stay TSPITR The following steps will be performed :

(1) Restore the backup control file of a certain point in time before the target time to the secondary instance . Restore the data files of the recovery set to the target database , Restore the data file of the secondary set to the secondary instance .

(2) Restore the restored data file to the specified point in time .

(3) Export dictionary metadata of objects in recovered tablespace to target database .

(4) Issue... On the target database SWITCH command , To make the target database control file point to the data file in the recovered recovery set on the secondary instance .

(5) Import the dictionary metadata in the secondary instance into the target instance , To access recovered objects .

perform TSPITR The command format of is :

1RECOVER TABLESPACE TS_NAME UNTIL TIME '10/06/2016:22:42:00' AUXILIARY DESTINATION '/aux';
2RECOVER TABLESPACE TS_NAME UNTIL LOGSEQ 504 AUXILIARY DESTINATION '/aux';
3RECOVER TABLESPACE TS_NAME1, TS_NAME2 UNTIL LOGSEQ 1300 THREAD 1 AUXILIARY DESTINATION '/aux';
     


TSPITR Related data dictionary view of :

1SELECT * FROM SYS.TS_PITR_CHECK;-- Check if the tablespace is self-contained
2SELECT * FROM SYS.TS_PITR_OBJECTS_TO_BE_DROPPED;-- Check which objects execute TSPITR Will be deleted after 
     


&  explain :

of TSPITR Please refer to my BLOG:http://blog.itpub.net/26736162/viewspace-1671741/


The real question 1、Which options must you configure while performing an automated Tablespace Point-in-Time Recovery(TSPITR) by using Recovery Manager(RMAN)?

A、New channels for restore and recovery tasks

B、New name for the data files of the tablespace

C、Auxiliary name for the data files of the tablespace

D、Auxiliary destinations for an auxiliary set of data files

answer :D.

The question is to use the recovery manager (RMAN) Perform automatic tablespace point in time recovery (TSPITR), What options must be configured .

In this question , For options A, Restore and restore tasks must be configured ,TSPITR No need to configure these . therefore , Options A error .

For options B, Set a new name for the tablespace data file ,TSPITR You don't have to configure this . therefore , Options B error .

For options C, Set a new secondary name for the data file of the tablespace ,TSPITR You don't have to configure this . therefore , Options C error .

For options D, Set the secondary destination for the secondary set's data file , from TSPITR The command format of can be seen ,Auxiliary destinations about TSPITR Is a must . therefore , Options D correct .

therefore , The answer to this question is D.


The real question 2、Which of the following restrictions are not true with respect to tablespace point-in-time recovery?(Choose all that apply)

A、The target database must be in NOARCHIVELOG mode.

B、No backup is required of the database before you perform a TSPITR.

C、You must have all archived redo logs generated since the last backup up to the point to which you want to restore the transport set.

D、If you rename a tablespace,you can not perform a TSPITR to any point in time before that rename operation occurred.

E、If you have tables in tablespace_1 that have associated constraints in tablespace_2,then you must transport both tablespaces.

answer :A、B.

The question is about point in time recovery of tablespace , What is wrong , Ask for all the wrong options .

In this question , For options A, Option says the target database must be in non Archive Mode , The statement is wrong , in fact , The target database must be in archive mode . therefore , Options A correct .

For options B, Option to say before performing a tablespace point in time recovery , No database backup is required , The statement is wrong , You have to back up the database to do TSPITR. therefore , Options B correct .

For options C, The option says that you must have all the time from the last backup to the time you need to restore Redo journal , That's right . therefore , Options C error .

For options D, Option to rename a tablespace , Then it can't be carried out TSPITR To any point before the rename operation , That's right . therefore , Options D error .

For options E, Options say if there are tables in the tablespace 1, And tablespace 1 And tablespace 2 There are relevant constraints , Then you have to transfer two tablespaces , That's right , The transmitted tablespace must be a self-contained tablespace . therefore , Options E error .

therefore , The answer to this question is A、B.