Sunday, August 16, 2020

Oracle oratab file

 Oracle oratab file

Introduction

oratab:


oratab file is created by the root.sh script during oracle database installation ,and it is updated by the database configuration assistant DBCA when creating or deleting  a database ,the oratab file entry is also created automatically by the database agent 


When does oratab file created?

What are the contents of oratab file?

how to read oratab file?

How do we verify number of databases on server? (from oratab file)

How to locate the binaries installed on a server for a database?



oratab file get created when root.sh script executed while install.

Will read using more command

eg: $more /etc/oratab


The contents are

SID:$ORACLE_HOME:Y/N


Note: SID - database name, System identifier

The path of oracle binaries located using ORACLE_HOME parameter


eg: /u01/app/oracle/product/12.1.0/dbhome_1


Can have multiple homes for multiple database , can find from oratab.


prod:/u01/app/oracle/product/12.1.0/dbhome_1:Y

dev:/u01/app/oracle/product/11.2.0/dbhome_1:N


Here N/Y represents, to start on server boot..

----------------

Y - Yes , to start

N - No, Will not start on boot.


To login to a database , verify the SID value from ORACLE_SID using echo command.

----------------------

$echo $ORACLE_SID

If the value is prod

the database connected to prod


IF its dev

the db is dev

If not dev,then how to connect/set


using export command can set the environment variable...to login to aparticular db.

---------------------

$export ORACLE_SID=dev

then verify

$echo $ORACLE_SID


Which location to verify , the db installed ?

using variable ORACLE_HOME

how to verify ?

$echo $ORACLE_HOME


Conclusion:


Number of databases on a server

.bash_profile

root scripts while install

Binaries path

/etc/oratab

export - to set environment variable

echo - to verify the variable

$ORACLE_SID

$ORACLE_HOME


THANKS FOR VIEWING MY BLOG FOR MORE UPDATES FOLLOW ME

ITIL Process

ITIL Process Introduction In this Blog i am going to explain  ITIL Process, ITIL stands for Information Technology Infrastructure Library ...