Solved

Oracle 11g R2 UNIX Recovery

Posted on 2012-03-19
14
550 Views
Last Modified: 2012-05-14
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.
0
Comment
Question by:Keng0499
  • 6
  • 4
  • 3
  • +1
14 Comments
 
LVL 16

Expert Comment

by:Wasim Akram Shaik
ID: 37740843
issue the command

alter database recover ;

and try

alter database open;
0
 
LVL 62

Expert Comment

by:gheist
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.
0
 

Author Comment

by:Keng0499
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.

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.
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 76

Expert Comment

by:slightwv (䄆 Netminder)
ID: 37741915
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.
0
 

Author Comment

by:Keng0499
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?

Thx
0
 
LVL 76

Accepted Solution

by:
slightwv (䄆 Netminder) earned 500 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:
http://docs.oracle.com/cd/E11882_01/backup.112/e10642/rcmdupdb.htm

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

http://www.shutdownabort.com/quickguides/clone_rman.php
0
 

Author Comment

by:Keng0499
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.
0
 
LVL 76

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:
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.
0
 

Author Comment

by:Keng0499
ID: 37745539
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.
0
 
LVL 76

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:
http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:981953432485
0
 
LVL 62

Expert Comment

by:gheist
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
0
 
LVL 76

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.
0
 
LVL 62

Expert Comment

by:gheist
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.
0
 
LVL 76

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

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Cursors in Oracle: A cursor is used to process individual rows returned by database system for a query. In oracle every SQL statement executed by the oracle server has a private area. This area contains information about the SQL statement and the…
Background In several of the companies I have worked for, I noticed that corporate reporting is off loaded from the production database and done mainly on a clone database which needs to be kept up to date daily by various means, be it a logical…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
This video shows syntax for various backup options while discussing how the different basic backup types work.  It explains how to take full backups, incremental level 0 backups, incremental level 1 backups in both differential and cumulative mode a…

773 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