Newbie Trying to restore Oracle database. please help

Hi All,
I am a newbie who is trying to restore Oracle database, I currently use RMAN to backup the database, but the database needs to be restored onto a test server, I'm not quite sure of what I need to do or where I need to start here.
I currently backup the following
SPfile
ControlFile
Datafile
Archive Log
If someone can point me in the right direction or maybe a link to a website, I would be very grateful.
Thanks.

Hi,
login to your box using ssh or telnet
1. rman> connect target /
3. rman >startup force nomount;
4. rman >restore spfile from '/u01/restore/restore/2009_02_07/o1_mf_s_678160942_4rstxj3k_.bkp';
5. rman > shutdown immediate;
6. rman > startup nomount;
7. rman > restore controlfile from '/u01/restore/restore/2009_02_07/o1_mf_s_678160942_4rstxj3k_.bkp';
8. rman > mount database;
9. rman > restore database;
10.rman > recover database;
11. rman > sql 'alter database open resetlogs';
below is the sample i've done on my test environment
RMAN> startup mount;
connected to target database (not started)
Oracle instance started
database mounted
Total System Global Area 167772160 bytes
Fixed Size 1218316 bytes
Variable Size 67111156 bytes
Database Buffers 96468992 bytes
Redo Buffers 2973696 bytes
RMAN> backup database;
Starting backup at 11-FEB-09
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=158 devtype=DISK
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
input datafile fno=00001 name=/u01/app/oracle/oradata/ORCL1/datafile/o1_mf_system_4qzm5q6g_.dbf
input datafile fno=00003 name=/u01/app/oracle/oradata/ORCL1/datafile/o1_mf_sysaux_4qzm5qc1_.dbf
input datafile fno=00005 name=/u01/app/oracle/oradata/ORCL1/datafile/o1_mf_example_4qzmky86_.dbf
input datafile fno=00002 name=/u01/app/oracle/oradata/ORCL1/datafile/o1_mf_undotbs1_4qzm5sgk_.dbf
input datafile fno=00004 name=/u01/app/oracle/oradata/ORCL1/datafile/o1_mf_users_4qzm5vqj_.dbf
channel ORA_DISK_1: starting piece 1 at 11-FEB-09
channel ORA_DISK_1: finished piece 1 at 11-FEB-09
piece handle=/backup/ORCL1_1_1_678528722 tag=TAG20090211T081201 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:02:35
Finished backup at 11-FEB-09
Starting Control File and SPFILE Autobackup at 11-FEB-09
piece handle=/backup/c-1061732667-20090211-00 comment=NONE
Finished Control File and SPFILE Autobackup at 11-FEB-09
RMAN>
--- deleted all my file including spfile..
RMAN> shutdown immediate;
database dismounted
Oracle instance shut down
RMAN> exit
Recovery Manager complete.
[oracle]:/home/oracle>
[LinuxForOracle.bai.com]: orcl1 >rman target /
Recovery Manager: Release 10.2.0.1.0 - Production on Wed Feb 11 08:17:27 2009
Copyright (c) 1982, 2005, Oracle. All rights reserved.
connected to target database (not started)
RMAN> startup nomount;
startup failed: ORA-01078: failure in processing system parameters
LRM-00109: could not open parameter file '/u01/app/oracle/product/10.2.0.3/dbs/initorcl1.ora'
starting Oracle instance without parameter file for retrival of spfile
Oracle instance started
Total System Global Area 159383552 bytes
Fixed Size 1218268 bytes
Variable Size 54528292 bytes
Database Buffers 100663296 bytes
Redo Buffers 2973696 bytes
RMAN> restore spfile from '/backup/c-1061732667-20090211-00';
Starting restore at 11-FEB-09
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=36 devtype=DISK
channel ORA_DISK_1: autobackup found: /backup/c-1061732667-20090211-00
channel ORA_DISK_1: SPFILE restore from autobackup complete
Finished restore at 11-FEB-09
RMAN> shutdown immediate;
Oracle instance shut down
RMAN> startup nomount;
connected to target database (not started)
Oracle instance started
Total System Global Area 167772160 bytes
Fixed Size 1218316 bytes
Variable Size 67111156 bytes
Database Buffers 96468992 bytes
Redo Buffers 2973696 bytes
RMAN> restore controlfile from '/backup/c-1061732667-20090211-00';
Starting restore at 11-FEB-09
using channel ORA_DISK_1
channel ORA_DISK_1: restoring control file
channel ORA_DISK_1: restore complete, elapsed time: 00:00:16
output filename=/u01/app/oracle/oradata/ORCL1/controlfile/o1_mf_4s5n6jvq_.ctl
output filename=/u01/app/oracle/flash_recovery_area/ORCL1/controlfile/o1_mf_4s5n6n4f_.ctl
Finished restore at 11-FEB-09
RMAN> mount database;
database mounted
released channel: ORA_DISK_1
RMAN> restore database;
Starting restore at 11-FEB-09
Starting implicit crosscheck backup at 11-FEB-09
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=156 devtype=DISK
Crosschecked 1 objects
Finished implicit crosscheck backup at 11-FEB-09
Starting implicit crosscheck copy at 11-FEB-09
using channel ORA_DISK_1
Finished implicit crosscheck copy at 11-FEB-09
searching for all files in the recovery area
cataloging files...
no files cataloged
using channel ORA_DISK_1
channel ORA_DISK_1: starting datafile backupset restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
restoring datafile 00001 to /u01/app/oracle/oradata/ORCL1/datafile/o1_mf_system_4qzm5q6g_.dbf
restoring datafile 00002 to /u01/app/oracle/oradata/ORCL1/datafile/o1_mf_undotbs1_4qzm5sgk_.dbf
restoring datafile 00003 to /u01/app/oracle/oradata/ORCL1/datafile/o1_mf_sysaux_4qzm5qc1_.dbf
restoring datafile 00004 to /u01/app/oracle/oradata/ORCL1/datafile/o1_mf_users_4qzm5vqj_.dbf
restoring datafile 00005 to /u01/app/oracle/oradata/ORCL1/datafile/o1_mf_example_4qzmky86_.dbf
channel ORA_DISK_1: reading from backup piece /backup/ORCL1_1_1_678528722
channel ORA_DISK_1: restored backup piece 1
piece handle=/backup/ORCL1_1_1_678528722 tag=TAG20090211T081201
channel ORA_DISK_1: restore complete, elapsed time: 00:02:57
Finished restore at 11-FEB-09
RMAN> recover database;
Starting recover at 11-FEB-09
using channel ORA_DISK_1
starting media recovery
archive log thread 1 sequence 6 is already on disk as file /u01/app/oracle/flash_recovery_area/ORCL1/onlinelog/o1_mf_2_4qzmccv0_.log
archive log filename=/u01/app/oracle/flash_recovery_area/ORCL1/onlinelog/o1_mf_2_4qzmccv0_.log thread=1 sequence=6
media recovery complete, elapsed time: 00:00:01
Finished recover at 11-FEB-09
RMAN> sql 'alter database open resetlogs';
sql statement: alter database open resetlogs
RMAN> exit
[oracle]:/home/oracle>
[LinuxForOracle.bai.com]: orcl1 >sqlplus '/ as sysdba'
SQL> select name from v$database;
NAME
ORCL1
SQL>
i hope this will help you... enjoy!
Regards,
baidba

Similar Messages

Maybe you are looking for

  • How do I "download" the Overdrive icon to my dock?

    I use the Overdrive app to borrow books from Maryland library systems.  How do I put the Overdrive icon on my dock at the bottom of my home screen?

  • Can not update music library

    When I connect my ipod to my computer it tells me that I have 5 authorized computers and this device can no longer be updated.  I must deauthorize on of the other computers.  Under support it says that I should deauthorize all of the computers.  Will

  • T540p and ASUS PB287 4K display

    Hello, Just bought ASUS PB287 4K display. I connect it to Lenovo T540P with NVIDIA graphics card through mini displayport. I get 4K resolution at 30Hz but cannot increase the refresh rate to 60Hz. I have newest drivers. Intel graphics card control pa

  • No Definition for parameter with name NOREFFLAG available: IP Function

    Hi All! I'm working with Portal 7 and BW 7 I'm trying to create a Planning Function of Type: <b>Distribution by reference data</b> when I indicate some characteristics to be changed in the "To Characteristics Usage" tab and change to the "To Paramete

  • Dynamic Operation in Invoke activity

    Hi All, We have developed a java webservice name (ShippingUtil), In this we have exposed a number of methods like 1) UpdateShipmentDetails 2) FetchShipmentDetails 3) IsValidShipment now out of these IsValidShipment and FetchShipmentDetails both expec