Databases
cancel
Showing results for 
Search instead for 
Did you mean: 

how can I move the oracle software to the storage disk?

SOLVED
Go to solution
Deanna Tran_1
Frequent Advisor

how can I move the oracle software to the storage disk?

When i first install oracle, I placed the oracle software on the HP internal disk, but now I want to move it to the storage how can I do that? do i have to do another installation ?
15 REPLIES
Sanjay_6
Honored Contributor
Solution

Re: how can I move the oracle software to the storage disk?

Hi Deanna,

You can use pvmove to do this. First add the external disk to the same vg on which oracle is stored and then use pvmove to move the lv from the internal disk to the external disk.

Try these links,

http://support2.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&docId=200000058669146

http://support2.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&docId=200000060353648

Hope this helps.

Regds
PIYUSH D. PATEL
Honored Contributor

Re: how can I move the oracle software to the storage disk?

Hi,

First add the new disk in the same volume group using vgextend.

#vgextend /dev/vg02 /dev/dsk/c#t#d#

# pvmove /dev/dsk/c1t2d0 /dev/dsk/c#t#d# ( destination)

Piyush


Dave Chamberlin
Trusted Contributor

Re: how can I move the oracle software to the storage disk?

I don't think you need to reinstall. After you move the Oracle base directory where you need it, anything that references ORACLE_HOME or ORACLE_BASE etc would need fixing. At the least you would need to fix the .profile for the Oracle user. You would have to change the ORACLE_BASE and ORACLE_HOME etc. If /etc/oratab exists, you would need to fix the paths in that file as well. On the other hand, you could move the Oracle base directory and create a symbolic link at the original location. For example you could do this in the original directory after you move the oracle directory: ln -s /mystorage/oracle oracle

Then you dont need to change any references.
Brian Crabtree
Honored Contributor

Re: how can I move the oracle software to the storage disk?

Ok. To move Oracle to the storage, my best recommendation would be to move your current installation into a temporary area, mount a directory from your storage into the original path, and move the data from temp area back onto the original path.

If you want to change the ORACLE_HOME completely, you will have to relink the binaries after setting your enviroment variables for the new installation. Be warned though, that there is a hardcoded path in the $ORACLE_HOME/rdbms/admin/nmliblist that will need to be changed if you decide to move the ORACLE_HOME. I would recommend not moving it unless absolutely necessary.

Brian
Jeanine Kone
Trusted Contributor

Re: how can I move the oracle software to the storage disk?

On the other hand. It probably is just as easy to shut the database down. Reinstall the software where you want it. Fix your env variables to point to the new locations (probably in .profile and oratab). You can then just start up the database with the newly installed software.
Deanna Tran_1
Frequent Advisor

Re: how can I move the oracle software to the storage disk?

thank you for those suggestions. However, I should clarify what I wish to accomplish.
I 'd like to have 1 software on the HP internal disks and 1 software on the storage.
is there a way that I could make the copy?
or it will be much easier for me to install the software?
Leif Halvarsson_2
Honored Contributor

Re: how can I move the oracle software to the storage disk?

Hi
Do you want two oracle instances or just two copies of the same instance. In the first case you not need to copy anything but create a new instance, this is a oracle task. In the second case is not so easy as there are information in the oracle database about certain file locations.
Deanna Tran_1
Frequent Advisor

Re: how can I move the oracle software to the storage disk?

hi...
here is the desire setting that I'd like to have
1st instance = 1 database = software is located on the internal disks...
2nd instance = new database = software would like to be on the external disks...
What is the easiest way to accomplish this task?

Re: how can I move the oracle software to the storage disk?

There are a couple of ways. Once the new disk has been added, I would recommend that you install a new copy of the binaries, so that you have a valid oraInventory for the new set. If you do this you have to rename the file /var/opt/oracle/orainst.loc. Once the new Oracle is installed you can either create the new instance from scratch, or you can copy the datafiles from your other instance and recreate the control files to get an exact copy of the data.
Leif Halvarsson_2
Honored Contributor

Re: how can I move the oracle software to the storage disk?

Hi
If you want the same Oracle version on the both instances you don' need (and I dont think it is recommended) to install (or copy) the oracle binaries. It is perhaps possible but I think you will get problem. All you need is to create a new instance (database), this needs several steps but all is done with the Oracle Server Manager, there is both a CLI and a GUI version (svrmgrl and svrmgrm). Whith this tool you also have the option to select on which disks (volumes) your database files should be located.
I have one Oracle server with 3 instances running bur there is only one copy of the Oracle binaries.

It is another case if you want to create the instances with different Oracle versions (for example Oracle 8 and 9). In this case you need two installations, but you should be very careful if installing two different Oracle versions on the same server.
Jeanine Kone
Trusted Contributor

Re: how can I move the oracle software to the storage disk?

Deanna,

I have to agree that it does not make much sense to have two copies of the software if they will both be the same version. I also have multiple instances running from one installed ORACLE_HOME. This is the "standard" approach. Do you have a reason that you want two copies of the software? If you explain the reasoning, maybe we can come up with better suggestions.
Deanna Tran_1
Frequent Advisor

Re: how can I move the oracle software to the storage disk?

hi jeannine,
To answer your question, the purpose of wanting the software to be on external disk...is to allow us to test what happens when it's on the external disks and we do error recovery?
What will be reason for the oracle to crash?

Jeanine Kone
Trusted Contributor

Re: how can I move the oracle software to the storage disk?

If you are asking what could cause Oracle to crash, I would say:

Disk failure (if you are not using some sort of RAID5 or mirroring) that causes loss of database files (control file, datafiles, or redo logs)

Hardware problems: i.e. CPU failure or something else that might cause the whole system to go down. In this case though, your database will most likely come up just fine once the problem is fixed.

User Error - for example: accidental deltion of datafile files.

It has been a long time (years) since I have had any of my Oracle databases crash due to software bugs or general instability (except the one database we had on NT - which I blame on the instability of NT as opposed to Oracle).

Leif Halvarsson_2
Honored Contributor

Re: how can I move the oracle software to the storage disk?

Hi
Perhaps this can work for you if your "original" Oracle installation is in a single directory tree (for ex. /home/oracle).

- Shut down the database.
- For security, take a cold backup of the Oracle installation.
- Create a filesystem on the external disk and mount it on a temporary directory (for ex.
/disk1)
- Go to the Oracle directory (/home/oracle), copy evrything to the temporary directory (find . -print |cpio -pdvmux /disk1).
- Umount the external disk from the temporary directory.
- Mount the disk on /home/oracle.
- Startup the Oracle instance.
- Now Oracle is running on the external disk and you can test anything you want witout risk for the "original" installation.
- After finishing your tests, shutdown again, unmount the external disk, startup Oracle, and you are back to the "original".


Dave Chamberlin
Trusted Contributor

Re: how can I move the oracle software to the storage disk?

Deanna,
A failure will involve the instance (database) not the Oracle software itself. You just need to make a test instance for this purpose where convenient. This instance can sit on the same disks as your production database, but with its own folders for the datafiles. ex: /u01/oradata/PROD, /u01/oradata/TEST etc.