Link to home
Start Free TrialLog in
Avatar of Keng0499
Keng0499Flag for United States of America

asked on

Oracle 11g R2 UNIX Recovery

Hi,

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.
Avatar of Wasim Akram Shaik
Wasim Akram Shaik
Flag of India image

issue the command

alter database recover ;

and try

alter database open;
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.
Avatar of Keng0499

ASKER

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.

Example:
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.
Avatar of slightwv (䄆 Netminder)
slightwv (䄆 Netminder)

Two ways

1- Just rename the data files:
http://docs.oracle.com/cd/E11882_01/server.112/e25494/dfiles005.htm

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.
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?

Thx
ASKER CERTIFIED SOLUTION
Avatar of slightwv (䄆 Netminder)
slightwv (䄆 Netminder)

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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.
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:
http://www.dba-oracle.com/oracle_tips_db_copy.htm

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

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.
In today's world, Cold backups can have disadvantages and no real advantage.

Tom Kyte has a brief discussion on this topic here:
http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:981953432485
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
>>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.
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.
>>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.