Databases Reference
In-Depth Information
2.
Make sure the database is open in read/write mode:
SQL> select open_mode from v$database;
OPEN_MODE
----------
READ WRITE
3.
Choose where a temporary database can be created for the duration of the RMAN
operation. Designate a file system or an ASM disk group-the choice is yours. Just be sure
you choose a destination having enough space to hold SYSTEM, SYSAUX, and Undo
tablespaces along with the tablespace that holds the table. In this example, we will use the
disk group DG1.
4.
Decide the point in time to restore the table to. You can specify the point in time using
either of:
a. The timestamp
b. The SCN
In this example, in step 4, we specify recovery up to one minute prior to the current time.
Since a day has 24 hours, and an hour has 60 minutes, the expression sysdate - 1/60/24
represents the time just one minute ago.
Pay careful attention to choosing the time. The table you are recovering must have been
present in the database at that time. If the table was dropped prior to that time, the
recovery will fail with " RMAN-05057: Table not found " error.
5.
Connect to RMAN:
$ rman
RMAN> connect target '/ as sysdba'
as of the writing of this topic, there is bug #14172827 that causes the last step of this process to fail.
to avoid that bug, connect to the target database in rman as sysdba or as sys, i.e., connect target '/ as sysdba' ,
or as connect target sys/<SysPassword>; do not connect as connect target / .
Caution
6.
Issue the following command from RMAN. Be sure to plug in your chosen point in time:
RMAN> recover table SCOTT.ACCOUNTS
2> until time 'sysdate-1/60/24'
3> auxiliary destination '+DG1'
4> ;
The command will execute with a long output, which is not reproduced here for the sake
of brevity. At the end, the table will be reinstated in the database from the backup.
If you know the SCN, you can use that instead of the timestamp. For example:
RMAN> recover table SCOTT.ACCOUNTS
2> until scn 2012991
3> auxiliary destination '+DG1'
4> ;
 
Search WWH ::




Custom Search