Oracle restore

I am backuping up oracle database to server A.  I need to test  restore the database to PC B on regular basis.  Just installed developer suite  Oracle 10G on my PC B.  Can someone tell me step by step how to do this...I am new to Oracle.  Do I have to copy all the backup files to PC and issue the restore command?
Nana HemaaAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

slightwv (䄆 Netminder) Commented:
Are you backing up the developer suite or a database?

For backup/restore of a database I sugest RMAN.  The online docs have all the information.
0
sventhanCommented:
Are you doing this on Windows? What kind of server is this? Can you give more details about Servers?
0
sventhanCommented:
Here is the steps for Linux/Unix

http://www.dba-oracle.com/oracle_tips_db_copy.htm
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

sventhanCommented:
if you using RMAN to duplicate the DB here is the link

http://download.oracle.com/docs/cd/B19306_01/backup.102/b14191/rcmdupdb.htm
0
Nana HemaaAuthor Commented:
It is windows server 2003 .  The backups now reside in flash recovery area on server A where the database also reside. I need to test restore to a different windows server  B so as not to override the current production database
0
Nana HemaaAuthor Commented:
Are you backing up the developer suite or a database?--I am backing up a database

0
Praveen Kumar ChandrashekatrDatabase Analysist Senior Commented:
yes you need to copy all the backup files to the Server B then use restore.

if it is RMAN backup

1) copy all rman backup files from server A  to server B are in the same location(s) in the server B as in the server A(same path names)
2) Copy the initSID.ora file to the new ${Oracle Home}/dbs location and:
a) change the name to init<SID>.ora
b) Add the db_file_name_convert and log_file_name_convert to translate the file locations to new locations.
c) DO NOT yet change the db_name
3) Set ORACLE_SID to <New_SID>
4) Statup RMAN and execute these commands

CONNECT TARGET /
STARTUP NOMOUNT
### This is the prod db-id:
SET DBID=123456789;
RESTORE CONTROLFILE FROM '/backup/c-nnnnn-mmmm-00';
ALTER DATABASE MOUNT;
RUN {
        ALLOCATE CHANNEL C1 DEVICE TYPE DISK;
        ALLOCATE CHANNEL C2 DEVICE TYPE DISK;
        ALLOCATE CHANNEL C3 DEVICE TYPE DISK;
        ALLOCATE CHANNEL C4 DEVICE TYPE DISK;
        ### You need to set the point in time recovery:
        SET UNTIL SEQUENCE 6215 THREAD 1;
        ###
        RESTORE DATABASE;
        RECOVER DATABASE;
}
ALTER DATABASE OPEN RESETLOGS;
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Praveen Kumar ChandrashekatrDatabase Analysist Senior Commented:
0
sventhanCommented:
if its not RMAN you should try these steps

I assume you have oracle installed on your new location and your source is not in archive log mode.

You new DB name : NEWDB.
1) ALTER DATABASE BACKUP CONTROLFILE TO TRACE as '/backup_loc/create_DB_NEWDB.sql';
2) create pfile from spfile;
3) Copy the initSID.ora file to '/backup_loc';
4) Copy the backuped files, init.ora files, the control file trace (created above) to your pc
   Move the file to the proper location at the destination
   copy $ORACLE_HOME/dbs/init.ora to $ORACLE_HOME/dbs/initNEWDB.ora
5) Edit the Control File made earlier and clear out the junk at the top, so that the first line reads STARTUP NOMOUNT.
6) Edit this statement to read:
   CREATE CONTROLFILE SET DATABASE NEWDB RESETLOGS 
7) Also edit all the file locations mentioned in the trace file so that they point to appropriate clone locations
   Also remove the lines for "RECOVER ..." and "ALTER DATABASE OPEN ..."
8) Define the new $ORACLE_SID variable
   export ORACLE_SID=NEWDB
9) Edit the initNEWDB.ora file. Make sure you edit:
   CONTROL_FILES= (point to where you want the clone's Control Files created) 
   LOG_ARCHIVE_DEST_1= (and variants) (the source archives must not be overwritten by the clone's) 
   USER_DUMP_DEST & BACKGROUND_DUMP_DEST (source trace files must not be overwritten by the clone)
   INSTANCE_NAME
   Start sqlplus, connect SYS AS SYSDBA (internal) and run the create controlfile script.
10) create spfile from pfile;
    startup nomount;
    @Create_DB_NEWDB.sql

11)  RECOVER DATABASE USING BACKUP CONTROLFILE UNTIL CANCEL;
12)  ALTER DATABASE OPEN RESETLOGS;
13)  Add TEMP Tablespace 
14)  ALTER TABLESPACE TEMP ADD TEMPFILE '/yournewloc/NEWDB/TEMP.dbf'
     SIZE 600M REUSE AUTOEXTEND ON NEXT 100M  MAXSIZE 13767M;

Open in new window

0
sventhanCommented:
0
Nana HemaaAuthor Commented:
praveencpk:
----where do I copy this from pls.

2) Copy the initSID.ora file to the new ${Oracle Home}/dbs location anda) change the name to init<SID>.ora

--where are these files at..
b) Add the db_file_name_convert and log_file_name_convert to translate the file locations to new locations.

c) DO NOT yet change the db_name
3) Set ORACLE_SID to <New_SID>




I think the source is archive log mode
0
sventhanCommented:
run this in source;

select log_mode from v$database;

and paste the results here...
0
Praveen Kumar ChandrashekatrDatabase Analysist Senior Commented:
first let us know what type of backup are you using?

>>where do I copy this from pls.
copy the backup from server A to server B in the same location i.e if yor backup was in /U01/oradata/FRA/backup/ then create the same file structure in server B.

>>where are these files at..
the initSID.ora file will be in $ORACLE_HOME/dbs/ or login to database with sys user and query for path i.e
sql>show parameter pfile

then edit the pfile by adding the db_file_name_convert and log_file_name_convert parameter in your init file in server B.


0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Oracle Database

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.