Oracle 11g R2 UNIX Recovery

Posted on 2012-03-19
Medium Priority
Last Modified: 2012-05-14

We have a critical apps running in Oracle 11g in UNIX (HPUX), it is setup in the following;

Binary - in disk1 mount point
Data - disk2 mount point
Log - disk3 mount point
Control File 2 - disk4
Control File 3 - disk5

We need to run a restore, recovery test to the original server without impacting the data. Our plan is assign replacement disk to disk2, disk3, disk4 and disk5. We do not have cloning utility and disk size also slightly smaller than original - but enough to hold the data.
After copying the data from original disk to the new replacement disk - we unmounted all the original disk. But found that Oracle does not seems to work, we try using command "alter database open" and it fail with error "media need recovery etc".

Can someone advise how, what is the best method to get the environment ready for our restore testing by using disk replacement approach.

Thank you for your advise in advance.
Question by:Keng0499
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 4
  • 3
  • +1
LVL 16

Expert Comment

by:Wasim Akram Shaik
ID: 37740843
issue the command

alter database recover ;

and try

alter database open;
LVL 62

Expert Comment

ID: 37741474
Killing oracle process kills the data on disk.
"log" in oracle does not mean that this is the only exact file having data logged etc.

Author Comment

ID: 37741820
Sorry, I should have phrase my question clearly. I am looking for a solution where i can make a duplicate of oracle data to a different disk/mount point, subsequently un-mount the original disk/mount point and use the duplicate set of oracle data just created.

Original datafile in mount point ABC
Shutdown Oracle instance
Copy the datafile to another location/disk/mount point
Remove original mount point ABC, replacing with the duplicate mount point

does the above procedure make sense? What is the steps that was missing?  That cause Oracle instance has issue after the replacement.

We don't have much Oracle expertise, appolosize if my question does not make much sense.
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

LVL 77

Expert Comment

by:slightwv (䄆 Netminder)
ID: 37741915
Two ways

1- Just rename the data files:

2- Recreate the control files.
    a- from a sqlplus prompt:   alter database backup controlfile to trace;
        this generates a trace file with the create controlfile syntax.  Go find the newly created trace file in the trace folder under the directory pointed to by the diagnostic_dest spfile parameter.
    b- edit this file.  Locate the section "Set #1. NORESETLOGS case"
         delete set #2.
      make your folder changes
    c- shutdown your database, move your files, startup nomount, run the script to recreate the control files.  open the database.

Author Comment

ID: 37742082
Hi slightwv,

I intend to copy, rather than move because after doing the testing on the duplicate set, i want to revert back to original set. It is like putting a UAT and Production on the same server with identical set - depending on which disk volume i mount to server.

From what i read, seems that rename will not apply. Does the method #2 apply?

LVL 77

Accepted Solution

slightwv (䄆 Netminder) earned 1500 total points
ID: 37742150
>>It is like putting a UAT and Production on the same server with identical set

OH, Forget my examples.  That is form keeping the same database and changing the mount points.  I mis-read what you were wanting to do.

To duplicate a database, check out RMAN cloning.  The doc link:

This blog post seems to have the steps to duplicate on the same server.  I cannot ensure it is 100% accurate:


Author Comment

ID: 37742341
Thx. Will get the rest of team member to digest the info together.

The steps quite complicated for us. We thought that we can approach from system like how we did it for Windows SQL DB, i.e. copy all the data folder to new disks, remove old disks, restart back the DB - once complete testing, then we remount back the original disk as if nothing has change.

So Oracle is quite different.
LVL 77

Expert Comment

by:slightwv (䄆 Netminder)
ID: 37742383
Unfortunately Oracle needs other files/folders/etc... in specific locations.  Not just as simple as copying some files around.  You also need to make sure you have a unique databsae name.

RMAN is probably the easiest but if you prefer to manually do it check out the following:

The link above assumes a different host but should be the same for a local host.

Author Comment

ID: 37745539

We do online backup thru backup agent - which is rman. Because thru backup software, so backup restore more transparent. I always thought that if can affort to shutdown, backup all the folder consist of oracle and restore to "original folder", even if the disk has change - is the simplest.
LVL 77

Expert Comment

by:slightwv (䄆 Netminder)
ID: 37746961
In today's world, Cold backups can have disadvantages and no real advantage.

Tom Kyte has a brief discussion on this topic here:
LVL 62

Expert Comment

ID: 37746994
Full information about creating a copy of a DB in other directory, eventually on another continent. http://docs.oracle.com/cd/B19306_01/server.102/b14228/gen_rep.htm
LVL 77

Expert Comment

by:slightwv (䄆 Netminder)
ID: 37747013
>>Full information about creating a copy of a DB in other directory

I did not see where cloning a database was talked about in the Streams Replication Overview guide.
LVL 62

Expert Comment

ID: 37747152
it makes a transation-accurate copy of database....
sort of order of blocks on the disk has no relevance for DB logic. after that is running he has a spare database to make cold copies, patch tests, etc.
LVL 77

Expert Comment

by:slightwv (䄆 Netminder)
ID: 37747279
>>it makes a transation-accurate copy of database....

That is not what is being asked for here.  The question here is ot make a static copy of production for testing.  Once testing is done, the database is removed.

Strreams is a LIVE connection that will propogate changes from one database to the other as they happen.  Even if you set up streams, you still need the inintial copy to start from.

Featured Post

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Working with Network Access Control Lists in Oracle 11g (part 1) Part 2: http://www.e-e.com/A_9074.html So, you upgraded to a shiny new 11g database and all of a sudden every program that used UTL_MAIL, UTL_SMTP, UTL_TCP, UTL_HTTP or any oth…
This post first appeared at Oracleinaction  (http://oracleinaction.com/undo-and-redo-in-oracle/)by Anju Garg (Myself). I  will demonstrate that undo for DML’s is stored both in undo tablespace and online redo logs. Then, we will analyze the reaso…
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
This video shows information on the Oracle Data Dictionary, starting with the Oracle documentation, explaining the different types of Data Dictionary views available by group and permissions as well as giving examples on how to retrieve data from th…
Suggested Courses

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question