1846838 Members
8346 Online
110256 Solutions
New Discussion

change path

 
SOLVED
Go to solution
hangyu
Regular Advisor

change path

I have a database is running at the path /ora_app , now I would like to move it to another path /app/ora physically but keep the path logically , that means there is no need to change the hard-code program , the user can use the old path to do the same thing after movement, is setup a link ( ln -s ) a good method ? except use link , is there other better method ? thx
3 REPLIES 3
Hein van den Heuvel
Honored Contributor
Solution

Re: change path

Sure, you can move the stuff below /ora_app to /app/ora; rmdir /ora_app; ln -s /app/ora /ora_app

- Is there a mountpoint involved?
- Will the data move to a new device?
- Don't use -f on the rmdir nor ln... you want this to fail if you get it wrong
- Applications tend not to hardcode something like /ora_app. That is often hidden behind some envoronment variable like $ORA_APP or $APP_DIR or such.
Switch to the app user and issue: env | grep ora_app

To keep sanity as you move forward it may be desireable NOT to have the softlink, but fix (all) environment variables in play.

The softlink is the easy solution but may cause grievance over time.

Cheers,
Hein.
A. Clay Stephenson
Acclaimed Contributor

Re: change path

If the developers hard-coded pathnames into the application then go find a baseball bat and hardcode them. Normally there should be environment variables or a configuration file that sets all of this up so that it can be easily changed. Your soft links will work but make sure that they are well-documented and consider having to do a restore from backup because it would be very easy to miss the symbolic links.
If it ain't broke, I can fix that.
Yogeeraj_1
Honored Contributor

Re: change path

Hi,

unless you redo a fresh installation of the oracle software (+ some minor adjustments - requires downtime), there is no other way than creating a soft link of the directory.

This should not be a problem but do make sure that it is properly documented.

hope this helps too!

kind regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)