restore datafile

From: sparks <han.brinkman_at_gmail.com>
Date: Tue, 1 Jul 2008 11:36:18 -0700 (PDT)
Message-ID: <95e3d965-6521-442f-83fd-9a4de5c6fe25@l64g2000hse.googlegroups.com>


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';
 } Received on Tue Jul 01 2008 - 13:36:18 CDT

Original text of this message