From: sparks on
Hi,

Try to restore some datafiles of an instance in order to create
another database. Need this to restore a single table. However the
restore fails: it tells me that the datafile is in use or in recovery.
Looks it tries to recover the actual instance but that's not what I
want. Just need the datafiles. This is the script I use. Can someone
give me a hint where I am going wrong? I have gone to all the rman
official documentation ...

Thanks,

connect target /
run {
allocate channel tc1 type 'SBT_TAPE'
send 'NSR_ENV=(NSR_SERVER=live,
NSR_CLIENT=live,
NSR_DATA_VOLUME_POOL=xx)';

allocate channel tc2 type 'SBT_TAPE'
send 'NSR_ENV=(NSR_SERVER=live,
NSR_CLIENT=live,
NSR_DATA_VOLUME_POOL=xx)';
set until '26-JUN-08';
set newname for datafile '/data/oradata/live/sysaux01.dbf' to '/data/
oradata/restore/sysaux01.dbf';
set newname for datafile '/data/oradata/live/system01.dbf' to '/data/
oradata/restore/system01.dbf';
set newname for datafile '/data/oradata/live/undotbs01.dbf' to '/data/
oradata/restore/undotbs01.dbf';
set newname for datafile '/data/oradata/live/comp900_01.dbf' to '/
data/oradata/restore/comp900_01.dbf';
restore datafile '/data/oradata/live/sysaux01.dbf','/data/oradata/
live/system01.dbf','/data/oradata/live/undotbs01.dbf','/data/oradata/
live/comp900_01.dbf';
}

From: sybrandb on
On Tue, 1 Jul 2008 11:36:18 -0700 (PDT), sparks
<han.brinkman(a)gmail.com> wrote:

> Need this to restore a single table

You can not use RMAN 'to restore a single table'. You would need
TableSpace Poiht in Time Recovery, TSPITR, to restore a tablespace.
Also you are performing incomplete recovery without recovering the
database, you only restore it. Why do you think you have errors?

If you have set up flashback (as this seems to be 10g) and you have
the recycle bin feature enabled, you should be capable to flashback
the table,

--

Sybrand Bakker
Senior Oracle DBA