cancel
Showing results for 
Search instead for 
Did you mean: 

Loading Oracle question

SOLVED
Go to solution
ConnieK
Regular Advisor

Loading Oracle question

I have a general question about loading Oracle on an HPUX server. I know it's possible to restore the DB files from a backup, but is it possible to actually resore the Oracle software (base) from a tape backup or an image?

In previous migrations, I have always loaded Oracle itself using a CD.

Thanks,

Connie
Independent by nature
5 REPLIES
Jean-Luc Oudart
Honored Contributor

Re: Loading Oracle question

Connie

when we installed Oracle sw (8i) we took a copy of our test server.
Obviously, you will have to amend your config files, tnsnames.ora , listener.ora, ... to refelct the new server.

Please note, on the test server there is a file oraInst.loc located in /var/opt/oracle that indicates the location for oracle products inventory in case you need to add more products.

Regards
Jean-Luc
fiat lux
DCE
Honored Contributor

Re: Loading Oracle question

Yes it is possible. I have restored Oracle from tape multiple times during Disaster Recovery tests, with no problem what so ever.
ConnieK
Regular Advisor

Re: Loading Oracle question

Thanks Bunches both of you!
Independent by nature
TwoProc
Honored Contributor
Solution

Re: Loading Oracle question

Yes, you can just copy an existing Oracle Home from another server. Fix the listener.ora tnsnames.ora config files, password file, etc.

Make sure to get files in /var/opt/oracle and copy over too (and edit them).

However, if you are moving version 8i (or newer) there is a directory called OraInventory that was laid down (could be in Oracle's home directory, could be in the ORACLE_HOME, could be in ORACLE_BASE, could be in the parent dir of either of the last two.

This directory is FULL of binary files that have your machine name, your instance name, and the path to ORACLE_BASE, ORACLE_HOME, etc.

The files in this directory MUST be updated to reflect the machine name, instance name, etc if you ever want to patch that ORACLE_HOME (and you will want to).

You can accomplish this following a few simple rules:

A) Always use the same number of letters for machine names.
B) Always use the same number of letters for instance names (ORACLE_SID).
C) Always use the same mount point for home directories, (/u01/oracle/product/MYSID, /u01/oracle/product/URSID, etc.).

What you need to go for is the ability to replace strings in ALL of these files (in OraInventory) with the same size strings for another database on another machine.

So:

Source machine: bob
Dest machine: sue
Source ORACLE_SID(and db name): MYSID
Dest ORACLE_SID(and db name): URSID
Source path /u01/oracle/product/MYSID/9.2.0.5
Dest path /u01/oracle/product/URSID/9.2.0.5

So, if you can change all strings in all files from "bob" to "sue" and all strings in all files of "MYSID" to "URSID" then you'll be OK.

Next find a copy of "rpl":
(Excert from rpl with no arguments)
......................
rpl v1.1.1 by Joe Laffey, LAFFEY Computer Imaging.
Visit http:// www.laffeycomputer.com for updates.
,,,,,,,,,,,,,,,,,,,,,,,,,,
I think you may also find it on the HPUX porting archive.

Now after you've copied the OraInventory to the new server, then run rpl on it.

cd $ORACLE_HOME/OraInventory
rpl -R BOB SUE .
rpl -R MYSID URSID .
rpl -R bob sue .
rpl -R mysid ursid .

Note that rpl has a simulated mode on it (so you can see what it wants to do first) with the "-s" switch. I often use it to see if anything even needs changing, and if so, what would be involved.

OK, now, you're ready to go, and you can apply patches to the ORACLE_HOME too.

The bad news - if your server names don't have the same length it's not going to work.
The good news - I think there is a workaround.
I believe that we may have used in the past when one server had a name length that was slightly shorter than the others, and that we could patch it, and it worked as a database just fine.
Suppose "bob" is the source, and "sueellen" is the dest. Just go into /etc/hosts and add an alias to "sueellen" as "sue" (three letters).
From what I've seen about what the hostname is used for (and that's very little) - this should work fine. Of course externally, the host name is important - go ahead and use the real name from the other servers, as long as your tnsnames.ora file lines up to the server's listener.ora file you should be in business.
Lastly, if you've got directory name changes that don't match - you can fake it out along the whole path way with symbolic links and get around it that way.


We are the people our parents warned us about --Jimmy Buffett
ConnieK
Regular Advisor

Re: Loading Oracle question

John - Thanks! Very helpful information for future loads.

Connie.
Independent by nature