Restore/recover database from RMAN
-- before the restore:
--    1. generate the pfile to C:\oracle\product\10.2.0\database\initXXXXXXXX.ora
--    2. restore the rman backup from tape
--    3. copy the controlfile autobackup from tape 
--    4. blackout database
--    5. shutdown the database
--    6. remove all files

/*
del /q D:\oradata\XXXXXXXX\*

*/

set ORACLE_SID=XXXXXX
rman target /
set dbid=nnnnnnnnnnnnn
startup nomount pfile=C:\oracle\product\10.2.0\database\initXXXXXX.ora
SET CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO 'D:\ARCHIVE\ctrlFbkup\cf_%d_%F.bak';
restore controlfile from autobackup ;
alter database mount;
restore database check readonly;
recover database;
alter database open resetlogs;