Forum Stats

  • 3,872,015 Users
  • 2,266,364 Discussions
  • 7,911,025 Comments

Discussions

Parameter to change ORACLE_HOME/dbs

Franck Pachot
Franck Pachot Member Posts: 912 Bronze Trophy
edited Aug 19, 2016 4:10PM in Database Ideas - Ideas

The working directory of oracle processes is ORACLE_HOME/dbs ('database' on Windows) and this is where we find spfile, passwordfile and several other files.

It's not a good idea to save keep those files here. Better to separate binaries (read only, not to backup often, size do not increase) and configuration/variable files that have nothing to do there. There are several means to do it: symbolic links, ifile, parameter for specific files, etc

However, it would be nice to have a simple environment variable for that, such as ORACLE_DBS for example. Somethin similar to TNS_ADMIN we use to put sqlnet configuration files in a different place.

Laurent_LeturgezFranck PachotPini DibaskVlad Visan-OracleSven W.BeGinBPeaslandDBAMarcelDBAMartin PreissctriebberxThomas Teske-OracleMhAGOUGregVGbenga AjakayeAndreas Hubershachou1434User_NSID4user3840601Emad Al-Mousauser12031234
21 votes

Active · Last Updated

Comments

  • Mike Kutz
    Mike Kutz Member Posts: 6,251 Gold Crown

    The working directory ($PWD) should be in close proximity to the other files that are needed by the other executables and DLLs/ELFs.

    The working directory (where the datafiles exist) is wherever you put them.

    On newer systems, "datafiles" (as you know them) don't even exist!!! (ie ASM)

    As far as files such as your Archive Log files and RMAN backups go:  That is defined by the Database.

    It is highly recommended that the value for your Flash Recovery Area [FRA] is pointing to a location (drive/mount point) that is dedicated for use by the FRA.

    (eg a set of large, slow, cheap disks.)

    If I'm missing something, please explain in more detail.

    My $0.02

    MK

    Andreas Huber
  • Franck Pachot
    Franck Pachot Member Posts: 912 Bronze Trophy

    The working directory ($PWD) should be in close proximity to the other files that are needed by the other executables and DLLs/ELFs.

    The working directory (where the datafiles exist) is wherever you put them.

    On newer systems, "datafiles" (as you know them) don't even exist!!! (ie ASM)

    As far as files such as your Archive Log files and RMAN backups go:  That is defined by the Database.

    It is highly recommended that the value for your Flash Recovery Area [FRA] is pointing to a location (drive/mount point) that is dedicated for use by the FRA.

    (eg a set of large, slow, cheap disks.)

    If I'm missing something, please explain in more detail.

    My $0.02

    MK

    Hi Mike, I'm not talking about database files but configuration files such as the password file for example. There is no reason to put it in the software directory (=ORACLE_HOME)

  • Pini Dibask
    Pini Dibask Member Posts: 521 Gold Badge
    edited Aug 20, 2016 5:10AM

    Hi Franck,

    To be honest, I'm not aware of any issues related to having the password file, SPFile under the $ORACLE_HOME/dbs (Linux) or $ORACLE_HOME/database (Windows) and I'm not sure I fully understand which problem are you trying to solve.I haven't voted up or down yet, perhaps you could clarify the idea to me?

  • Franck Pachot
    Franck Pachot Member Posts: 912 Bronze Trophy

    Hi Franck,

    To be honest, I'm not aware of any issues related to having the password file, SPFile under the $ORACLE_HOME/dbs (Linux) or $ORACLE_HOME/database (Windows) and I'm not sure I fully understand which problem are you trying to solve.I haven't voted up or down yet, perhaps you could clarify the idea to me?

    Hi,

    In general it's a good idea to separate software binaries from updatable configuration files, as /usr and /etc for example.

    One reason is backups. You need to backup the binaries only once you have installed or patched. Configuration files should be backup more frequently

    Another reason is consequences when filesystem is full. For binaries, you don't care. For configuration files you may have issues. And because it's the default for lot of files, it can happen that get large files

    When you upgrade/migrate to another Oracle Home, you have to move some files. This can be avoided with an environment variable for dbs.

    There are also all those cleanups that you have to do when you clone an ORACLE_HOME

    So many files go there with different (but not consistent) ways to put them elsewhere, or sometimes no way.

    The ASM file extent map ab_SID.dat, the clonedb SID_bitmap.dbf, ... lot of files have not their place there.

    Not big problems, but IMO any software should have the possibility to set its 'working directory' where you want. The era of '.ini' in c:\windows and all binaries in windows/system has ended long time ago

    Regards,

    Franck.

    Gbenga AjakayeAndreas Huber
  • Pini Dibask
    Pini Dibask Member Posts: 521 Gold Badge

    Hi,

    In general it's a good idea to separate software binaries from updatable configuration files, as /usr and /etc for example.

    One reason is backups. You need to backup the binaries only once you have installed or patched. Configuration files should be backup more frequently

    Another reason is consequences when filesystem is full. For binaries, you don't care. For configuration files you may have issues. And because it's the default for lot of files, it can happen that get large files

    When you upgrade/migrate to another Oracle Home, you have to move some files. This can be avoided with an environment variable for dbs.

    There are also all those cleanups that you have to do when you clone an ORACLE_HOME

    So many files go there with different (but not consistent) ways to put them elsewhere, or sometimes no way.

    The ASM file extent map ab_SID.dat, the clonedb SID_bitmap.dbf, ... lot of files have not their place there.

    Not big problems, but IMO any software should have the possibility to set its 'working directory' where you want. The era of '.ini' in c:\windows and all binaries in windows/system has ended long time ago

    Regards,

    Franck.

    Voted Up

  • top.gun
    top.gun Member Posts: 3,666 Gold Crown

    For a lot of files if the FRA is not configured, then the file goes to the Oracle home.

    So rather than an environment variable, why not extend the same rule to other files. ie create in the FRA if configured, otherwise leave in the Oracle home.

    Franck PachotGbenga Ajakaye
  • Gbenga Ajakaye
    Gbenga Ajakaye Member Posts: 3,422 Gold Trophy

    I vote up. Though accessing /DBS is a rather straight forward to find. However, I think this might come in handy.