Skip Headers

Oracle® Database Backup and Recovery Advance d User's Guide
10g Release 1 (10.1)

Part Number B10734-01
Go to Documentation Home
Home
Go to Book List
Book List

Contents
Go to Index
Index
Go to Master Index< br> Master Index Go to Feedback page
Feedback

Go to previous page
Previous
Go to next page
Next
View PDF

10
RMAN Tabl espace Point-in-Time Recovery (TSPITR)

Recovery Manager (RMAN ) automatic tablespace point-in-time recovery (commonly abbreviated TSPITR) enables you to quickly recover one or more tablespaces in an Oracle database to an earlier time, without affecting the state of th e rest of the tablespaces and other objects in the database.

This chapter explains when you can and cannot use TSPITR, what RMAN actually does to your database during TSPITR, how to prepare a database for TSPITR, how to run TSPITR, and options for controlling the TSPITR process.

This chapter contains the following sections:

Understanding RMAN TSPITR

In or der to use TSPITR effectively, you need to understand what problems it can solve for you, what the major elements used in TSPITR are, what RMAN does during TSPITR, and limitations on when and how it can be applied.

RMAN TSPITR Concepts

Figure 10-1 illustrates the context within which TSPITR takes place , and a general outline of the process.

Figu re 10-1 Tablespace Point-in-Time Recovery (TSPITR) Architecture

Text
description of bradv032.gif follows

Text description of the illustration bradv032.gif

The figure contains the following entities:

There are four other important terms related to TSPITR, which will be used in the rest of this discussion:

All of these terms will be referenced throughout the remainder of this chapter.

How TSPITR Works With an RMAN-Managed Auxiliary Instance

To perform TSPITR of the recovery set using RMAN and an automated a uxiliary instance, you carry out the preparations for TSPITR described in "Planning and Preparing for TSPITR", and then issue the RECOVER TABLESPACE command, specifying, at a minimum, the tablespaces of the recovery set and the target time for the point-in-time recovery, and, if desired, an auxiliary destination as well.

RMAN then carries out the following steps:

  1. If there is no connection to an auxiliary instance, RMAN creates the auxiliary instance , starts it up and connects to it.
  2. Takes the tablespaces to be recovere d offline in the target database
  3. Restores a backup controlfile from a p oint in time before the target time to the auxiliary instance
  4. Restores the datafiles from the recovery set and the auxiliary set to the auxiliary instance. Files are restored either in locations you speci fy for each file, or the original location of the file (for recovery set files) or in the auxiliary destination (for auxiliary set fi les, if you used the AUXILIARY DESTINATION argument of RECOVER TABLESPACE)
  5. Recovers the restored datafiles in the auxiliary instance to the specified time
  6. Opens the auxiliary database with the RESETLOGS option
  7. Exports the dictionary metadata about objects in the recovered tablespaces to the target database
  8. Shuts down the auxiliary instance
  9. Issues SWITCH commands on the target instance, so that the target database control file now po ints to the datafiles in the recovery set that were just recovered at the auxiliary instance.
  10. Imports the dictionary metadata from the auxiliary instance to the target instance, allowing the recovered ob jects to be accessed.
  11. Deletes all auxiliary set files.

At that point the TSPITR process is complete. The recovery set datafiles are returned to their conte nts at the specified point in time, and belong to the target database.

Deciding When to Use TSPITR

Like a table import, RMAN TSPITR enables you to recover a consistent data set; however, the data set recovered includes an entire tablespace rather than one object.

RMAN TSPITR is most useful for situat ions such as these:

Note that, as with database point-in-time recovery (DBPITR), you canno t perform TSPITR if you do not have your archived redo logs. For databases running in NOARCHIVELOG mode, you cannot perform TSPITR.

Limitation s of TSPITR

There are a number of situations which you cannot resolv e by using TSPITR.

TSPITR has some other limitations:

Limitations of TSPITR Without a Recovery Catalog

If you do not use a recovery catalog when performing TSPITR, then note the following special restrictions:

Planning and Preparing for TSPITR

There are several steps to be carried out in preparing for TSPITR:



Using Image Copies for Faster TSPITR Performance

TSPITR performance can be greatly enhanced by redirecting RMAN to use existing image copies of the recovery s et and auxiliary set datafiles on disk in TSPITR, rather than restoring them from backup. You can use the CONFIGURE AUXNAME command with image copies of recovery set datafiles or auxiliary set datafiles, or the SET NEWNAME command with imag e copies of auxiliary set datafiles, to tell RMAN about the possible existence of an image copy of a datafile.

While exact details vary depending on the command used and whether the file is an auxiliary set or recovery set f ile, in general, if a suitable image copy is available in the specified location, then during TSPITR, RMAN uncatalogs the image copy from the RMAN repository of the target instance, and catalogs it in the control file of the auxiliary instance. The auxiliary instanc e then performs point-in-time recovery using the image copy.

Details of using image copies with each type of file are explained in the following sections.

Using CONFIGURE AUXNAME With Recovery Set Image Copies

During TSPITR, RMAN looks in the specified AUXNAME location for the datafile, to see whether the file there is an image copy backup of the datafile, with a checkpoint SCN early enough that it can be recovered to the target time for TSPITR. If such an image copy is found, it is used in TSPITR. Otherwise, the datafile is restored and recovered in its original location, and any file in the location specified by the AUXNAME is not changed or deleted.

RMAN> CONFIGURE AUXNAME FOR DATAFILE 'ORACLE_HOME/oradata/trgt/users01.dbf'
     TO '/newfs/users1.dbf';
...other RMAN commands, if any...
RM
AN> RECOVER TABLESPACE users, tools UNTIL SEQUENCE 1300 THREAD 1;

CONFIGURE AUXNAME is meant to be used as the basis of a strategy to make TSPITR faster by eliminating restore times. If you have tablespaces on which you anticipate performing TSPITR, you can maintain a set of image copies of the affected datafiles, updated periodically to the earliest point to which you expect to perform TSPITR. The expected usage model is:

  • Configure the AUXNAME for the file once
  • Perform "BACKUP AS COPY DATAFILE n FORMAT auxname" regularly to maintain the updated image copy, or use an incrementally updated backups strategy as described in Oracle Database Backup and Recovery Basics to kee p the image copies up to date without performing full backups of the datafiles
  • When TSPITR is needed, specify a target time since the last update of the image copy.

In planning for TSPITR with image copies, remember that you may not know know which tablespaces will require image copies in advanc e. As discussed in "Determining the Recovery Set: Analyzing Data Relationships", relationships between the tablespaces you wish to TSPITR and other tablespaces may require that you add tablespaces to your final recovery set, and still other tablespaces may wind up in the auxiliary set. You should configure an AUXNAME for each d atafile that is likely to be required, and update image copies of all datafiles often. However, TSPITR will still work if only a subs et of datafiles are prepared in advance using this strategy. The process will just take longer, and recover recovery set datafiles fo r which there are no image copies in their original locations.

Note thatthe order of preced ence of naming methods is still respected when you use CONFIGURE AUXNAME to rename a recovery set file. A SET NEWN AME for a recovery set file will override the effect of the CONFIGURE AUXNAME command for the same f ile. Behavior in this instance will be as described in "Renaming TSPITR Recovery Set Datafiles with SE T NEWNAME". SET NEWNAME used with a recovery set file never refers to an image copy file.

SET NEWNAME a nd CONFIGURE AUXNAME With Auxiliary Set Image Copies

As with recover y set datafiles, CONFIGURE AUXNAME sets a persistent alternative location for an auxiliary set datafile image copy, and SET NEWNAME sets an alternative location for the duration of a RUN block. However, RMAN handles values for auxiliary set datafiles differently from recovery set datafiles.

If SET NEWNAME is used to specify a new location for an auxiliary set datafile, and there is an image copy at that location with an SCN such that it can be use d in TSPITR, then the image copy will be used. If there is no usable image copy at that location, however, RMAN will restore a usable copy from backup. (If an image copy is present but the SCN is after the target time for TSPITR, then the datafile is overwritten by the restored file.)

If CONFIGURE AUXNAME is used to specify a new location for an auxiliary set datafile, and there is an image copy at that location with an SCN such that it can be used in TSPITR, then the imag e copy will be used. If there is no usable copy at the specified location, the file is restored to this location from bcakup.

As with all auxiliary set files, the file is deleted after successful TSPITR, or left for use in t roubleshooting if TSPITR fails, regardless of whether it was an image copy created before TSPITR or restored by RMAN from backup duri ng TSPITR.

TSPITR With CONFIGURE AUXNAME and Image Copies: Scenario

You have enough disk space to save image copies of your entire database for use in TSPITR. In preparation for the possibility that you need pe rform TSPITR, you perform the following tasks:

  • Configure an AU XNAME for each datafile in your database using:
    CONFIGURE AUXNAME FOR DATAFILE n TO auxname_n;
    
    
  • < /a>Every week on Sunday night you take an image copy of the database which is placed in the files referenced by the configured AUXNAM Es:
                  BACKUP AS COPY DATAFILE n FORMAT auxname_n
    
    

    Note that if the image copies are all in the sam e location on disk and named similarly to the original datafiles, it is possible to use FORMAT or DB_FILE_NAME_CON VERT options of the BACKUP command and use BACKUP AS COPY DATABASE instead of performing individual backups of every datafile. For example if the configured auxnames are a simple translation of the location 'maindisk' to 'auxdisk', you could use the following backup command:

    BACKUP AS COPY DATABA
    SE DB_FILE_NAME_CONVERT=(maindisk, auxdisk);
    
    

You are th en prepared for TSPITR without restoring from backup. If, for example, an erroneous batch job started at November 15 2003, 19:00:00 u pdates incorrectly the tables in the tablespace PARTS. You could use the following command to perform TSPITR on tablespace PARTS:

RECOVER TABLESPACE parts UNTIL TIME 'November 15 2003, 19:00:00';

Because AUXNAMES are configured and refer to datafile copies from an SCN before the TSPITR ta rget time, the auxiliary set and recovery set datafiles are not restored from backup. Instead the datafile copies are directly used i n recovery, eliminating the restore overhead.

Note that at the end of the TSPITR, the table space PARTS will not be located in the original datafile locations, but in the auxname locations. If only the auxnames for the auxili ary set should be used (so that the recovery set is left in its original locations), then CONFIGURE AUXNAME ... CLEAR should be used before TSPITR is started. In such a case, though, note that the datafiles will have to be rest ored.

Cus tomizing Initialization Parameters for the Automatic Auxiliary Instance

The automatic auxiliary instance looks for parameters in a file that is operating system dependent (for Unix this location is ?/rdbms/admin/params_auxint.ora, where '?' stands for ORACLE_HOME, and the file is located on the node running the RMAN client, not necessarily the same node as the one running the database instances) This default parameter file f or the automatic auxiliary instance is always searched when TSPITR is performed. If the file is not found RMAN does not generate an e rror.

Another way to specify parameters for the automatic auxiliary instance is to place th e initializations parameter in a file, and then provide the location of these file with the SET AUXILIARY INSTANCE PARAMETER command before executing TSPITR. (Note that the path specified when using SET AUXILIARY INSTANCE PARAMETER is a pat h on the system running the RMAN client, not the target or auxiliary instances.)

RMAN defin es the following basic parameters for the automatic auxiliary instance:

  • DB_NAME - Same as db_name of the target database
  • DB_UNIQUE_NAME - Generated, based on the DB_NAME, to be unique
  • DB_BLOCK_SIZE - Same as the DB_BLOCK_SIZE of the target database
  • COMPATIBLE - Same as the compatible setting of the target database
< p class="BP">If AUXILIARY DESTINATION is used, RMAN also defines:

  • DB_CREATE_FILE_DEST - Set to the auxiliary destination
  • CONTROL_FILES - Generated filename in the auxiliary destination

When an auxiliary destination is specified, RMAN uses these two parameters in creating the auxiliary instance online logs and control files in the auxiliary destination.

If AUXILIARY DESTINATION is n ot used, then you must use LOG_FILE_NAME_CONVERT in an auxiliary instance parameter file to specify the online log file names. Otherwise, TSPITR fails when attempting to create the online logs for the automatic instance.

If AUXILIARY DESTINATION is not used and you do not use CONTROL_FILES in an auxiliary instance pa rameter file, the auxiliary instance will create one controlfile with an operating system-dependent name in an operating system depen dent location. (In Unix, it defaults to ?/dbs/cntrl_@.dbf, where '?' stands for ORACLE_HOME an d '@' stands for ORACLE_SID. For an automatic auxiliary instance, ORACLE_SID is randomly gener ated by RMAN).

It is rarely necessary, however, to alter the parameter file, especially if you provide an AUXILIARY DESTINATION argument to RECOVER TABLESPACE. If one of the six basic initialization parameters is overridden in the auxiliary instance parameter file, it might cause TSPITR to fail. However, other parameters besides these basic parameters can be added if needed. For example you can use DB_FILE_NAME_CONVERT to specify the names of the datafiles in the auxiliary set.

Performing RMAN TSPITR Using Your Own Auxiliary Instance

Oracle Corporation recommends that you allow RMAN to manage the creation and destruction of the auxiliary instance used d uring RMAN TSPITR. However, creating and using your own auxiliary instance is also supported. One reason you might want to do this is to exercise control of channels used in TSPITR. RMAN's automatic auxiliary instance uses the configured channels of the target datab ase as the basis for the channels to configure on the auxiliary instance and use during backup. If you need different channel setting s, and you do not want to use CONFIGURE to change the settings on the target database, you can operate your own auxiliar y instance.

Preparing Your Own Auxiliary Instance for RMAN TSPITR

Creating an Oracle instance suitable for use as an auxiliary instance requires that you carry out all of the following steps:

Step 1: Create an Oracle Password File for the Auxil iary Instance

For instructions on how to create and maintain Oracle password files, refer to the Oracle Database Admi nistrator's Guide.

Step 2: Create an Initialization Parameter File for the Auxiliary Instance

Create a client-side initialization parameter file for the auxiliary instance on the machine where you will be running SQL*Plus to contorl the auxiliary instance. For this example, we will assume your parameter file is placed at /tmp/ initAux.ora. Set the parameters described in the following table, making sure that paths in parameters like DB_FILE_NAME _CONVERT, LOG_FILE_NAME_CONVERT and CONTROL_FILES are all server-side paths, not client-side.

Table 10-2 Initialization Parameters in the Auxiliary Instance

REMOTE_LOGIN_PASSWORDFILE

Parameter Mandatory? Value

DB_NAME

YES

The same name as the target database.

DB_UNIQUE_NAME

YES

A value different from any database in the same Oracle home. For simplicity, specify _dbname. Fo r example, if the target database name is trgt, then specify _trgt.

LOG_FILE_NAME_CONVERT

YES

Patterns to gener ate filenames for the online redo logs of the auxiliary database based on the online redo log names of the target database. Query V$LOGFILE.MEMBER, to obtain target instance online log names, and ensure that the conversion pattern matches the format of the filename displayed in the view.

This parameter is the only way to name the online redo l ogs for the auxiliary instance. Without it, TSPITR will fail when trying to open the auxiliary instance because the online logs canno t be created.

Note: Some platforms do not support ending patte rns in a forward or backward slash (\ or /).

YES

Set to EXCLUSIVE when c onnecting to the auxiliary instance by means of a password file. Otherwise, set to NONE.

COMPATIBLE

YES

The same value as th e parameter in the target database.

DB_BLOCK_SIZE

YES

If this initialization parameter is set in the target database, then it must be set to the same value in the auxiliary instance.

DB_FILE_NAME_CONVERT

NO< /p>

Patterns to convert filenames for the datafiles of the auxiliary da tabase. You can use this parameter to generate filenames for those files that you did not name with SET NEWNAME or CONFIGURE AUXNAME. Obtain the datafile filenames by querying V$DATAFILE.NAME, and ensu re that the conversion pattern matches the format of the filename displayed in the view. You can also specify this parameter on the < code>RECOVER command itself.

Note: Some platforms do no t support ending patterns in a forward or backward slash (\ or /).

See Also: "Using DB_FILE_NAME_CONVERT to Name Auxiliary Set Datafiles"< /a>

CONTROL_FILES

NO

Filenames that do not conflict with the control file names of the target instance (or any other existing file).



Set other parameters as needed, including the parameters that allow you to connect as SYSDBA through Oracle Net.

Following are examples of the initialization parameter settings for the auxiliary instance:

DB_NAME=trgt
DB_UNIQUE_NAME=_trgt
CONTROL_FILES=/tmp/control01.ctl
DB_FILE_NAME_CONVERT=('/oracle/oradata/trgt/','/tmp/')
LOG_FILE_NAME_CONVERT=('/oracle/oradata/trg
t/redo','/tmp/redo')
REMOTE_LOGIN_PASSWORDFILE=exclusive
COMPATIBLE =10.1.0
DB_BLOCK_SIZE=8192

Note:

After setting these initialization parameters, ensure that you do not overwrite the initialization settings for the production files at the target database.


See Also:

Oracle Net Services Administrator's Guide for more information about Oracle Net

Step 3: Check Oracle Net Connectivity to the Auxiliary Instance

The auxiliary instance must have a valid net service name. Before proceeding, use SQ L*Plus to ensure that you can establish a connection to the auxiliary instance.

Preparing RMAN Commands for TSPITR with Your Own Auxiliary Ins tance

If you are running your own auxiliary instance, then you may f ind that the sequence of commands required for TSPITR is quite long, if you allocate a complex channel configuration for restoring fr om backup, or if you are not using DB_FILE_NAME_CONVERT to control file naming.

You may wish to store the sequence of commands for TSPITR in a command file, a text file under the host operating system. This comm and file can be read into RMAN using the @ command (or the CMDFILE command line argument when starting RMAN ) to execute the series of commands in the command file.

See "Using RMAN with Command Files" for more details.

Planning Channels for TSPITR with Your Own Auxiliary Instance

When you run your own auxiliary instance, the default beha vior is to use the automatic channel configuration of the target instance. However, if you decide to allocate your own channel config uration, you can do so by including the ALLOCATE AUXILIARY CHANNEL commands in a RUN block along with the RECOVER TABLESPACE command for TSPITR. Plan out these commands, if necessary, and add them to the sequence of commands you will run to perform your TSPITR.

See the example in "Executing TSPITR W ith Your Own Auxiliary Instance: Scenario" for details of how to include channel allocation in your TSPITR script.

Planning Datafile Names with Your Own Auxiliary Instance: SET NEWNAME

You may wish to use SET NEWNAME commands, either to refer to existing image copies of auxiliary set files to improve TSPITR performance, or to assign new names to the recovery set files for after TSPITR. Plan out these commands, if necessa ry, and add them to the sequence of commands you will run to perform your TSPITR.

Executing TSPITR with Your Own Auxiliary Instance

With the preparations complete and your TSPITR commands completely planned, yo u are now ready to carry out your TSPITR. The following steps are required:

Step 1: Start the Auxiliary Instance in NOMOUNT Mode

Before beginning RMAN TSPITR, use SQL*Plus to connect to the auxiliary instance and start it in NOMOUNT mode, specifying a parameter file if n ecessary. For example:

SQL> CONNECT SYS/oracle@aux AS SYSDBA
SQL&g
t; STARTUP NOMOUNT PFILE='/tmp/initAux.ora'

Remember that the pat h for the PFILE will be a client-side path, on the machine from which you run SQL*Plus, not a server-side path.

Because the auxiliary instance does not yet have a control file, you can only start the instance in NOMOUN T mode. Do not create a control file or try to mount or open the auxiliary instance for TSPITR.

Step 2: Connect the RMAN Client to Targ et and Auxiliary Instances

Start RMAN connecting to the target and t he manually created auxiliary instance:

% rman target / auxiliary sysuse
r/syspwd@auxiliary_service_name

Step 3: Execute the RECOVER TABLESPACE Command

Now you are ready to run your TSPITR commands. In the simplest case, just execute the RECOVER TABLESPACE... UNTIL command at the RMAN prompt:

RMAN> R
ECOVER TABLESPACE ts1, ts2... UNTIL TIME 'time'

If you want to use ALLOCATE CHANNEL or SET NEWNAME then create a RUN block w hich includes those commands before the RECOVER TABLESPACE command.

RUN {
   ALLOCATE CHANNEL c1 DEVICE TYPE DISK;
   ALLOCATE CHANNEL c2 DEVICE TYPE SBT;
  #
 and so on...
   RECOVER TABLESPACE ts1, ts2 UNTIL TIME 'time';
}


Using a Command File for TSPITR

Entering a lengthy series of commands in a RUN block can be error-prone. To avoid making mistakes entering the sequence of commands, create a command f ile (called, for example, /tmp/tspitr.rman) to store the whole sequence of commands for your TSPITR. Review it carefully to catch any errors. Then run the command file at the RMAN prompt, using this command:

RMA
N> @/tmp/tspitr.rman ;

The results will be the same as in the previous example.

Executing TSPITR With Your Own Auxiliary Instance: Scenario

The following example shows the execution of a RECOVER TABLESPACE... UNTIL operation using the following features of RM AN TSPITR:

  • Managing your own auxiliary instance
  • Configuring channels for restore of backups from disk and sbt
  • Using recoverable image copies for some auxiliary set datafiles using SET NEWNAME
  • Specifying new names for recovery set datafiles using SET NEWNAME

The process used is as follows:

  1. Prepare the auxiliary instance as described in "Preparing Your Own Auxiliary Ins tance for RMAN TSPITR". Specify "tspitr" as the password for the auxiliary instan ce in the password file, and set up the auxiliary instance parameter file /bigtmp/init_tspitr_prod.ora with the followin g settings:
    db_name=PROD
    db_unique_name=tspitr_PROD
    <
    /a>control_files=/bigtmp/tspitr_cntrl.f'
    db_file_name_convert=('?/oradata/prod', '/bigtmp')
    <
    /a>log_file_name_convert=('?/oradata/prod', '/bigtmp')
    compatible=10.1.0
    block_size=8192
    remote_login_password=exclusive
    
    
  2. Create service name pitprod for the auxiliary instance, and check for connectivity.
  3. Start the auxiliary instance in NOMOUNT state, as shown:
    
    $ sqlplus
    SQL> connect sys/tspitr@pit_prod as sysdba
      SQL> startup nomount pfi
    le=/bigtmp/init_tspitr_prod.ora
    
    
  4. Start up RMAN, connecting to the auxiliary instance:
    % rman target / auxiliary sys/tspitr@pit_prod 
    <
    a name="1032847">
    
  5. Enter the following commands, in a RUN bl ock, to set up and execute the TSPITR:
    run {
    # Specify NEWNAMES for rec
    overy set datafiles
        SET NEWNAME FOR DATAFILE '?/oradata/prod/clients01.f' 
    
                            TO '?/oradata/prod/clients01_rec.f';
                SET NEWNAME FOR DATAFILE '?/oradata/pr
    od/clients02.f'
                                      TO '?/oradata/prod/clients02_rec.f';
    
              SET NEWNAME FOR DATAFILE '?/oradata/prod/clients03.f'
                                      TO '?/oradata
    /prod/clients03_rec.f';
                SET NEWNAME FOR DATAFILE '?/oradata/prod/clients04.f'
                                      TO '?/oradata/prod/clients04_rec.f';
    
    # Specified newn
    ames for some of the auxiliary set 
    # datafiles that have a valid image copy to avoid restores:
                SET NEWNAME FOR DATAFILE '?/oradata/prod/system01.f'
                                      TO '/
    backups/prod/system01_monday_noon.f';
                SET NEWNAME FOR DATAFILE '?/oradata/prod/system02.f'
                                      TO '/backups/prod/system02_monday_noon.f';
                SET NEWN
    AME FOR DATAFILE '?/oradata/prod/undo01.f'
                                      TO '/backups/prod/undo01_monday_no
    on.f';
    
    # Specified the disk and SBT channels to use
                al
    locate auxiliary channel c1 device type disk;
                allocate auxiliary channel c2 device type disk;
                allocate auxiliary channel t1 device type sbt;
                allocate auxiliary chan
    nel t2 device type sbt;
    
    # Recovered the clients tablespace to 24 hours ago:
        RECOVER TABLESPACE clients UNTIL TIME 'sysdate-1';
       }
    
    

If the TSPITR operation is successful, then the results are:

  • The recovery set datafiles are registered in the target database control file under the names spe cified with SET NEWNAME, with their contents as of the time specified time for the TSPITR.
  • The auxiliary files are removed by RMAN, including the control files, online logs and auxiliary set datafiles of the aux iliary instance
  • The auxiliary instance is shut down

If the TSPITR operation fails, the auxiliary files are left on disk for troubleshooting purposes. If RMAN creat ed the auxiliary instance, it is shut down; otherwise it is left in whatever state it was in when the TSPITR operation failed.

Troubleshooting RMAN TSPITR

A variety of problems can cause TSPITR to fail before t he process is complete.

  • There can be name conflicts between fi les already in the target database, filenames assigned by the SET NEWNAME or CONFIGURE AUXNAME commands, an d filenames generated by the effect of the DB_FILE_NAME_CONVERT parameter.
  • When RMAN exports the metadata about recovered objects from the auxiliary instance, it uses space in the temporary tablespa ce for sorting. If there is insufficient space in the temporary tablespace for the sorting operation, you need to increase the amount of sort space available.

Troubleshooting TSPITR Example: Filename Conflicts

If your uses of SET NEWNAME, CONFIGURE AUXNAME and DB_FILE_NAME_CONVERT cause multiple f iles in the auxiliary or recovery sets to have the same name, RMAN will report an error during TSPITR. To correct the problem, use di fferent values for these parameters to eliminate the duplicate name.

Troubleshooting TSPITR Example: Insufficient Sort Space during Export

In this case, you need to edit the recover.bsq file, where ver it resides on your host platform. For instance, on UNIX, it is located in $ORACLE_HOME/rdbms/admin. This file contai ns the following:

# 
# tspitr_7: do the incomplete recovery and reset
logs.  This member is used once. 
# 
define tspitr_7 
<<<

# make the control file point at the restored datafiles, then recover them 
RECOVER CLON
E DATABASE TABLESPACE &1&; 
ALTER CLONE DATABASE OPEN RESETLOGS; 
# PLUG HERE the
 creation of a temporary tablespace if export fails due to lack 
# of temporary space. 
#
 For example in Unix these two lines would do that: 
# sql clone "create tablespace aux_tspitr_tmp 
#           datafile ''/tmp/aux_tspitr_tmp.dbf'' size 500K"; 
} 
>>>


Remove the '#' symbols from the last two lines of comments and m odify the statement to create a temporary tablespace. Retry the TSPITR operation, increasing the size of the tablespace until the exp ort operation succeeds.

Troubleshooting: Restarting Manual Auxiliary Instance After TSPITR Failure

If you are managing your own auxiliary instance and there is a failure in TSPITR, then before you can try TSPIT R again, you must shut down the auxiliary instance, correct the problem which interfered with TSPITR, and then bring the auxiliary in stance back to NOMOUNT before trying TSPITR again.