init.ora
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 7 of 7

Thread: init.ora

  1. #1
    Join Date
    Nov 2000
    Posts
    416
    How can I find where is the location of init.ora file for a specific DB in Unix ? FRom V$ tables ?

    If there is more than one database if I want to start the DB from svrmgrl do I need to put pfile='/....' phrase for startup command ?


  2. #2
    Join Date
    Feb 2001
    Location
    Paris, France
    Posts
    809
    the init.ora file is normally located in $ORACLE_HOME/dbs
    there you should have a init$ORACLE_SID.ora file.
    once ORACLE_SID is set, if ORACLE_HOME is correctly set, if you type svrmgrl, you automatically work on the database defined by ORACLE_SID.
    nevertheless the init.ora file can be elsewhere, and in this case you have to use pfile=... to tell oracle where to find the init file ...

  3. #3
    Join Date
    Mar 2000
    Location
    Chennai.Tamilnadu.India.
    Posts
    658

    Export oracle_sid

    Hi, 20th April 2001 20:46 hrs chennai

    I have worked on sun solaris oracle while i studied.

    After setting oracle_sid we have to use export oracle_sid or else it doesnt work.

    Whereas on NT its not so .

    Normally in NT we had to set oracle_sid=
    if we have more than one database but not if its a single DB.

    You have to set in sunsolaris

    $orapwd file= \export\home\oracle\dbs\pwdorcl.ora=orcl

    (pwd file has to be set in the dbs directory only)

    Cheers

    Padmam


    [Edited by padmam on 04-20-2001 at 11:34 AM]
    Attitude:Attack every problem with enthusiasam ...as if your survival depends upon it

  4. #4
    Join Date
    Oct 2000
    Location
    Saskatoon, SK, Canada
    Posts
    3,925
    As pipo mentioned, oracle would look to gather the pfile information by default from the $ORACLE_HOME/dbs/init$SID.ora. Which normally would be a symbolic link to the actual pfile locatd under $ORACLE_BASE/admin/SID/pfile/initSID.ora IF you really would like to have your instance stated using a different pfile then you can go ahead and mention as

    SVRMGR> startup pfile=/...

    When you do so, make sure that your pfile init.ora had the correct db_name in it.

    But it is always a good practice to startup the instance by explicitly mentioning the pfile.


    Sam
    Thanx
    Sam



    Life is a journey, not a destination!


  5. #5
    Join Date
    Nov 2000
    Posts
    416
    Let me put it in this way: What if you are new to a unix or NT box and when you query Environment variables ( By 'set' in NT and by 'env' in Unix ) you find out that ORACLE_SID and ORACLE_HOME is not setup but you know for example that this machine ( NT or Unix ) has three database up & running , Now tell me how can you figure out where is the init.ora for them ???


  6. #6
    Join Date
    Oct 2000
    Location
    Dallas:TX:USA
    Posts
    407
    pipo has already answered the closest possibile way of finding the init file. It's in the oracle_home\dbs directory and the name is like initSIDName.Ora

    Hypothetically the init file can be anywhere including a mapped drive in NT and any mount point on Unix and the database can be brought up by --

    startup pfile = 'file location'

    On NT you can start the database with the OracleServiceSID service and so you can find the location of the PFILE in the REGISTRY

    HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\HOME0\ORA_SIDName_PFILE

    In Unix if the database is brought up with the system startup you should be able to find a script that runs at the system startup and may find the command used to start the database instance.
    If it's --

    STARTUP PFILE = 'pfile location'

    then you know what pfile is used

    If it's simply

    STARTUP

    Then the pfile is in oracle_home\dbs directory with the name initSIDName.ora

    - Rajeev
    Rajeev Suri

  7. #7
    Join Date
    Oct 2000
    Location
    Saskatoon, SK, Canada
    Posts
    3,925
    I think that folks have provided a very good explanation to the max possible extent. I also would like to add some thing to their resources.

    Oracle normallu follows a OFA architecture as of 8i. So what is OFA? It is oracle flexible architecture.

    Oracle would put all of its database datafiles and other instance related files under

    In Unix:

    $ORACLE_BASE

    Here under:

    i) $ORACLE_BASE/oradata/sid/*.* would contain all the instance's data and control files.

    ii) $ORACLE_BASE/admin/sid/*.* would contain all of the instance related directories, like arch which would hold all the archived files, bdump normally would contain the server related thread trace files and the alert log for the instance. pfile would contain your parameter file to initialize the oracle instance and udump



    $ORACLE_HOME/ would normally hold the software or the binaries to the oracle.

    In the unix systems, it would be $ORACLE_HOME/dbs/initSID.ora the file which normally a symbolic link to the $ORACLE_BASE/admin/SID/pfile/initsid.ora file.

    So, when you don't specify the pfile explicitly, oracle would go to the $ORACLE_HOME/dbs/initSID.ora symlinkfile and read the information from $ORACLE_BASE/admin/SID/pfile/initSID.ora file and start your instance up.


    One other thing in the Unix is that I you have a script that would start the database automatically (normally presesnt /etc/init.d/dbora), then you have to make sure that the settings under /var/opt/oracle/oratab had been set correctly, b'cos it would start reading the instance name and the home directory path information from here to auto start the instance during boot time. For more detail on how it functions

    do

    less /etc/init.d/dbora

    It is a shell script and there you can see how it starts the database instances.


    In the unix environment, your environment should always have the set up for the following:

    ORACLE_BASE = path until the app
    ORACLE_HOME = $ORACLE_BASE/product/816
    LD_LIBRARY_PATH=...
    CLASSPATH= ...
    PATH=$ORACLE_HOME/bin:...

    For more detail refer the oracle documentation.


    I hope this would help you to know how the structure works.


    Sam
    Thanx
    Sam



    Life is a journey, not a destination!


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width