Showing posts with label ORACLE_HOME. Show all posts
Showing posts with label ORACLE_HOME. Show all posts

Thursday, January 12, 2017

discard dynamic "testdb" : cannot determine its home

After installing Oracle Enterprise Manager Control agent for any host, adding database could not be completed successfully.According to log file of agent (emagent_perl.trc) Oracle database services are found but, ORACLE_HOME could not.

oracledb.pl: Mon Sep  5 08:51:18 2016: INFO:  DB_LISTENER_DISCOVERY:  found dynamic sid="testdb" service =testdb.localdomain port = 1521 host =testdb01 home=/oracle/app/oracle/product/11.2.0/dbhome_2
oracledb.pl: Mon Sep  5 08:51:18 2016: WARN:  DB_LISTENER_DISCOVERY:  discard dynamic "testdb" : cannot determine its home

After adding entry for testdb into oratab like below , problem has gone and related database has been added to Oracle EM Cloud Control successfully.

testdb:/oracle/app/oracle/product/11.2.0/dbhome_2:N

Monday, June 13, 2016

Connected to idle instance while database is up

While database is up , whenever i would like to connect database with sqlplus it gives me "Connected to idle instance" message.ORACLE_SID enviroment variable seems true by checking pmon process with this command

[bash$]# ps -ef | grep pmon
oracle   30607     1  0 Jun09 ?        00:01:35 ora_pmon_testdb

[bash$]# echo $ORACLE_SID
testdb

But ORACLE_HOME enviroment variable is not the same as that the instance was started with.Oracle user which owns the database has ORACLE_HOME enviroment variable

/oracle/product/11.2.0/dbhome_2

But instance was started with ,

/oracle/product/11.2.0/dbhome_2/

In order to check which enviroment variables has been used when Oracle instance started ,following commands give detail.These commands are run with root user.

Pid of process is determined at OS level,
[bash$]# ps -ef | grep pmon

Enviroments of process (pmon) are get

[bash$]# cat /proc/<pid of process taken above>/environ

Output of above command gives all detail about enviroment variable of smon process.ORACLE_SID,ORACLE_HOME,ORA_CRS_HOME can be seen at output.In my case i have seen ORACLE_HOME env variable was with slash at the end of variable.After setting ORACLE_HOME with slash on oracle user , I can be able to login to the instance.