Oracle 11g installed; but when shut down and rebooted, oracle will not start (can not reach via URL), what to do?

Hello Experts,
Oracle 11g installed; but when shut down (overnight) and rebooted, oracle will not start (can not reach via URL), what to do?

VMware Server 2
Oracle 11g installed on guest OS: CentOS 5.3

thx

epifanio67Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

mrjoltcolaCommented:
In all UNIX / Linux you must configure the init script to startup Oracle via dbstart

dbstart is provided by Oracle to auto-start instances using the UNIX init script and /etc/oratab
It is included in the bin directory, and is the standard way to start Oracle automatically on UNIX systems.

It is called by /etc/init.d/dbora (which you also have to create) I can provide a sample.

You can then use it and the whole sysv run levels to stop/start Oracle instances in /etc/oratab.

/etc/init.d/dbora stop
/etc/init.d/dbora start

At bootup, it will usually start at run-level 5, but again, you have to install dbora in /etc/init.d and make a link to the appropriate /etc/rc.d/* directory for runlevel.

0
mrjoltcolaCommented:
This is a previous solution from my EE knowledgebase.

http://www.experts-exchange.com/Q_24445764.html


1) dbora file must go in /etc/init.d
   make sure it has execute perm (chmod +x dbora)

2) It will call $ORA_HOME/bin/dbstart

3) Add a symbolic link from /etc/rc.d/rc5.d/
   cd /etc/rc.d/rc5.d/
   ln -s ../init.d/dbora S98dbora

4) Also, some versions of Oracle have an error in $ORACLE_HOME/bin/dbstart
   Edit it and change the line:

   ORACLE_HOME_LISTNER=/ade/vikrkuma_new/oracle
   
   to
 
   ORACLE_HOME_LISTNER=$ORACLE_HOME

5) Manually test the startup by running
  /etc/init.d/dbora start
  /etc/init.d/dbora stop

#! /bin/bash
# dbora
#
# oracle Start/Stop the Databases...
#
# chkconfig: 2345 99 10 
# description: Start or stop Oracle databases
#
# processname: oracle
# config: /etc/oratab
# pidfile: /var/run/oracle.pid
 
# Source function library.
. /etc/init.d/functions
 
RETVAL=0
ORA_OWNER="oracle"
ORA_HOME="/oracle/11.1.0"
 
# See how we were called.
 
prog="oracle"
 
start() {
echo -n $"Starting $prog: "
su - $ORA_OWNER -c "$ORA_HOME/bin/dbstart $ORA_HOME" 
# su - $ORA_OWNER -c "$ORA_HOME/bin/lsnrctl start"
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/dbora
 
return $RETVAL
}
 
stop() {
echo -n $"Stopping $prog: "
su - $ORA_OWNER -c "$ORA_HOME/bin/dbshut $ORA_HOME" 
# su - $ORA_OWNER -c "$ORA_HOME/bin/lsnrctl stop"
} 
 
restart() {
stop
start
} 
 
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
restart
;;
*)
echo $"Usage: $0 {start|stop|restart}"
exit 1
esac
 
exit $?

Open in new window

0
schwertnerCommented:
You have not ensured automatic start of the components:

% lsnrctl start
% sqlplus /nolog
SQL>connect sys/password@alias as sysdba
or
SQL>connect / as sysdba
SQL>startup
SQL>exit

%oemctl start dbconsole
0
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

schwertnerCommented:
In /etc/oratab
set
instancename:Y


also
0
epifanio67Author Commented:
hey mrjoltcola.. nice working with you again...

I just typed
/etc/init.d/dbora stop
I get no file or directory...

how do I create one? thx
0
epifanio67Author Commented:
I just did
nano /etc/oratab

and I get
orcl:/u01/app/oracle/product/11.1.0/db_1:N

do you want me to type
instancename: y?

thx
0
epifanio67Author Commented:
sorry.. I didn't read the whole post...

reading now..

thx
0
mrjoltcolaCommented:
Yes, but unless you follow my directions above, Oracle will still not auto-start next reboot. /etc/oratab is used by dbstart. dbstart is run either by hand, or by the init auto script, I described above.

schwertner gave you directions to start manually, but on UNIX you still must configure auto-start by hand in the method above or next time you reboot you need to login and start it again.
0
epifanio67Author Commented:
ok, cool.. thx

however, I am still on step one... I can't find the dbora file to copy it to /etc/init.d/

where can I find it?

thx
0
mrjoltcolaCommented:
dbora is provided, that is what is in the snippet window above.
0
epifanio67Author Commented:
oh.. sorry about my basics...

so, I need to open nano, and copy and paste the snippet below?

thx
0
epifanio67Author Commented:
I just did it... moving to step 2...

sorry, kind of slow..

0
mrjoltcolaCommented:
In the snippet window above in my 2nd post, it starts with:

#! /bin/bash
# dbora


Copy the whole content into /etc/init.d/dbora

Follow the instructions line by line, then let me know. Once you have it setup test it (with step 5) prior to rebooting.
0
epifanio67Author Commented:
ok, cool.. I will...

where do I find the ORACLE_HOME_LISTENER? which file?

thx,
0
mrjoltcolaCommented:
>>where do I find the ORACLE_HOME_LISTENER? which file?

$ORACLE_HOME/bin/dbstart
0
epifanio67Author Commented:
thx...

this is what I am getting:

[root@localhost /]# /etc/init.d/dbora start
Starting oracle: -bash: /oracle/11.1.0/bin/dbstart: No such file or directory

[root@localhost /]# /etc/init.d/dbora
Usage: /etc/init.d/dbora {start|stop|restart}
[root@localhost /]# /etc/init.d/dbora {start}
Usage: /etc/init.d/dbora {start|stop|restart}
[root@localhost /]# /etc/init.d/dbora stop
Stopping oracle: -bash: /oracle/11.1.0/bin/dbshut: No such file or directory
[root@localhost /]#
[root@localhost /]# nano $ORACLE_HOME/bin/dbstart
[root@localhost /]# /etc/init.d/dbora start
Starting oracle: -bash: /oracle/11.1.0/bin/dbstart: No such file or directory

it seems that I don't have dbstart file...
0
mrjoltcolaCommented:
is your ORACLE_HOME /oracle/11.1.0 ?

Run the following commands:

su - oracle

echo $ORACLE_HOME
echo $PATH

which dbstart
0
epifanio67Author Commented:
thx so much
this is what I get:

[oracle@localhost etc]$ cd /
[oracle@localhost /]$ echo $ORACLE_HOME

[oracle@localhost /]$ echo $PATH
/usr/kerberos/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/oracle/bin
[oracle@localhost /]$
0
mrjoltcolaCommented:
Typically ORACLE_HOME is set in the oracle user's environment.

But regardless, find out where your Oracle software is installed and set the ORA_HOME variable in the dbora file to that path

The sample has ORA_HOME="/oracle/11.1.0" but that has to be changed.
0
mrjoltcolaCommented:
0
epifanio67Author Commented:
thx...

here is what I got:

[oracle@localhost /]$ cd /u01/app/oracle/product/11.1.0
[oracle@localhost 11.1.0]$ cd db_1
[oracle@localhost db_1]$ ls
apex                 hs                          network      relnotes
assistants           install                     nls          root.sh
bin                  install.platform            oc4j         scheduler
ccr                  instantclient               odbc         slax
cdata                inventory                   OPatch       sqldeveloper
cfgtoollogs          j2ee                        opmn         sqlj
clone                javavm                      oracore      sqlplus
config               jdbc                        oraInst.loc  srvm
crs                  jdk                         ord          sysman
csmig                jlib                        oui          tg4ifmx
css                  ldap                        owb          tg4ingr
ctx                  lib                         owm          tg4sybs
dbs                  lib32                       perl         tg4tera
demo                 localhost.localdomain_orcl  plsql        uix
diagnostics          log                         precomp      ultrasearch
EMStagePatches_orcl  md                          racg         wwg
has                  mesg                        rdbms        xdk
[oracle@localhost db_1]$ cd bin
[oracle@localhost bin]$ ls
adapters                    expO                  oidca
adrci                       extjob                oidprovtool
adrciO                      extjobo               oifcfg
AgentLifeCycle.pm           extjobO               oifcfg0
AgentMisc.pm                extjoboO              ojvmjava
agentok.sh                  extproc               ojvmtc
AgentStatus.pm              extproc32             omsdown.pl
AgentSubAgent.pm            extproc32O            omsstart.pl
agtctl                      extprocO              omsstop.pl
agtctlO                     extusrupgrade         onsctl
amdu                        fmputl                orabase
amduO                       fmputlhp              oracg
aqxmlctl                    genagtsh              oracle
aqxmlctl.pl                 genclntsh             oracleO
asmcmd                      genclntst             oradism
asmcmdcore                  genezi                oraenv
bndlchk                     geneziO               orajaxb
cfo                         genksms               orapipe
clscfg                      gennfgt               orapki
clscfg.bin                  gennttab              orapwd
clsfmt                      genoccish             orapwdO
clsfmt.bin                  genorasdksh           oratclsh
clsid                       gensyslib             oratclsh0
clsid.bin                   grdcscan              oraxml
cluvfy                      hsalloci              oraxsl
commonenv                   hsallociO             osdbagrp
commonenv.template          hsdepxa               osdbagrp0
CompEMagent.pm              hsdepxaO              osh
CompEMcentral.pm            hsots                 ott
CompEMcore.pm               hsotsO                owm
CompEMdbconsole.pm          imp                   pafctl
coraenv                     impdp                 PARDeploy
crsctl                      impdpO                patchAgtStPlugin.pm
crsctl.bin                  impO                  Path.pm
crsdiag.pl                  jssu                  plshprof
csscan                      kfed                  plshprofO
ctxkbtc                     kfedO                 proc
ctxlc                       kfod                  procob32
ctxlcO                      kfodO                 proxyserv
ctxload                     kgmgr                 proxyserv.bin
ctxloadO                    kgmgrO                purgeDeploymentLibrary
cursize                     kgpmon                racgeut
cursizeO                    LaunchEMagent.pm      racgeutO
db2gc                       LaunchEMdbconsole.pm  racgimon
dbca                        lbuilder              racgimonO
DBConsoleLifeCycle.pm       lcsscan               racgmain
DBConsole.pm                ldapadd               racgmainO
DBConsoleStatus.pm          ldapaddmt             racgmdb
dbfsize                     ldapbind              racgmdbO
dbfsizeO                    ldapcompare           racgons
dbgeu_run_action.pl         ldapdelete            racgwrap
dbhome                      ldapmoddn             racgwrap.sbs
dbshut                      ldapmodify            rawutl
dbstart                     ldapmodifymt          rconfig
dbua                        ldapsearch            RegisterTType.pm
dbv                         ldifmigrator          relink
dbvO                        linkshlib             repo_mig
deploymentLibraryExport.sh  lmsgen                rman
deploymentLibraryImport.sh  loadjava              rmanO
deploync                    loadpsp               rtsora32
dg4odbc                     loadpspO              runclass
dg4pwd                      localconfig           sAgentUtils.pm
dg4pwdO                     lsnodes               sbttest
dgmgrl                      lsnrctl               sbttestO
dgmgrlO                     lsnrctl0              schema
diagsetup                   lxchknlb              schemasync
Directory.pm                lxegen                searchctl
dropjava                    lxinst                searchctl.pl
dsml2ldif                   mapsga                SecureAgentCmds.pm
dumpsga                     mapsga0               SecureDBConsoleCmds.pm
dumpsga0                    maxmem                SecureOMSCmds.pm
e2eme                       maxmemO               SecureUtil.pm
e2eme0                      mkpatch               setsso.pl
echodo                      mkpatchO              sqlldr
emagent                     mkstore               sqlldrO
emagent0                    ncomp                 sqlplus
emagentdeploy.pl            netca                 sqlplusO
EMAgentPatch.pm             netca_deinst.sh       srvconfig
EMAgent.pm                  netmgr                srvctl
emagtm                      nfsPatchPlugin.pm     StartAgent.pl
emagtm0                     nid                   statusnc
emagtmc                     nidO                  symfind
emagtmc0                    nmb                   sysresv
emca                        nmb0                  targetdeploy.pl
EmCommonCmdDriver.pm        nmcbufp               tkprof
EMconnectorCmds.pm          nmei                  tkprofO
emctl                       nmei0                 tnslsnr
EmctlCommon.pm              nmhs                  tnslsnr0
emctl.pl                    nmhs0                 tnsping
emctl.template              nmo                   tnsping0
emdctl                      nmo0                  transx
emdctl0                     nmocat                trcasst
EMDeploy                    nmocat0               trcldr
EMDeploy.pm                 nmuct                 trcroute
emdfail.command             nmupm                 trcroute0
EMDiag.pm                   nmupm0                trcsess
emdrollogs.pl               oclskd                tstshm
emdwgrd                     oclskd.bin            tstshmO
emdwgrd.bat                 oclsomon              uidrvci
emdwgrd.pl                  oclsomon.bin          umu
EmKeyCmds.pm                oclsvmon              unzip
EMomsCmds.pm                oclsvmon.bin          wrap
EMSAConsoleCommon.pm        ocrcheck              wrapO
emtgtctl                    ocrcheck0             wrc
emtgtctl2                   ocrconfig             wrcO
emtgtctl20                  ocrconfig0            xml
emutil                      ocrdump               xmlcg
emwd.pl                     ocrdump0              xmlwf
eusm                        ocssd                 xsl
exp                         ocssd.bin             xsql
expdp                       odisrvreg             xvm
expdpO                      oerr                  zip
[oracle@localhost bin]$ ./dbstart
ORACLE_HOME_LISTNER is not SET, unable to auto-start Oracle Net Listener
Usage: ./dbstart ORACLE_HOME
[oracle@localhost bin]$ [oracle@localhost etc]$ cd /
bash: [oracle@localhost: command not found
[oracle@localhost bin]$ [oracle@localhost /]$ echo $ORACLE_HOME
bash: [oracle@localhost: command not found
[oracle@localhost bin]$
[oracle@localhost bin]$ [oracle@localhost /]$ echo $PATH
bash: [oracle@localhost: command not found
[oracle@localhost bin]$ /usr/kerberos/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/oracle/bin
bash: /usr/kerberos/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/oracle/bin: No such file or directory
[oracle@localhost bin]$ [oracle@localhost /]$
bash: [oracle@localhost: command not found
[oracle@localhost bin]$ clear

[oracle@localhost bin]$ ls
adapters                    expO                  oidca
adrci                       extjob                oidprovtool
adrciO                      extjobo               oifcfg
AgentLifeCycle.pm           extjobO               oifcfg0
AgentMisc.pm                extjoboO              ojvmjava
agentok.sh                  extproc               ojvmtc
AgentStatus.pm              extproc32             omsdown.pl
AgentSubAgent.pm            extproc32O            omsstart.pl
agtctl                      extprocO              omsstop.pl
agtctlO                     extusrupgrade         onsctl
amdu                        fmputl                orabase
amduO                       fmputlhp              oracg
aqxmlctl                    genagtsh              oracle
aqxmlctl.pl                 genclntsh             oracleO
asmcmd                      genclntst             oradism
asmcmdcore                  genezi                oraenv
bndlchk                     geneziO               orajaxb
cfo                         genksms               orapipe
clscfg                      gennfgt               orapki
clscfg.bin                  gennttab              orapwd
clsfmt                      genoccish             orapwdO
clsfmt.bin                  genorasdksh           oratclsh
clsid                       gensyslib             oratclsh0
clsid.bin                   grdcscan              oraxml
cluvfy                      hsalloci              oraxsl
commonenv                   hsallociO             osdbagrp
commonenv.template          hsdepxa               osdbagrp0
CompEMagent.pm              hsdepxaO              osh
CompEMcentral.pm            hsots                 ott
CompEMcore.pm               hsotsO                owm
CompEMdbconsole.pm          imp                   pafctl
coraenv                     impdp                 PARDeploy
crsctl                      impdpO                patchAgtStPlugin.pm
crsctl.bin                  impO                  Path.pm
crsdiag.pl                  jssu                  plshprof
csscan                      kfed                  plshprofO
ctxkbtc                     kfedO                 proc
ctxlc                       kfod                  procob32
ctxlcO                      kfodO                 proxyserv
ctxload                     kgmgr                 proxyserv.bin
ctxloadO                    kgmgrO                purgeDeploymentLibrary
cursize                     kgpmon                racgeut
cursizeO                    LaunchEMagent.pm      racgeutO
db2gc                       LaunchEMdbconsole.pm  racgimon
dbca                        lbuilder              racgimonO
DBConsoleLifeCycle.pm       lcsscan               racgmain
DBConsole.pm                ldapadd               racgmainO
DBConsoleStatus.pm          ldapaddmt             racgmdb
dbfsize                     ldapbind              racgmdbO
dbfsizeO                    ldapcompare           racgons
dbgeu_run_action.pl         ldapdelete            racgwrap
dbhome                      ldapmoddn             racgwrap.sbs
dbshut                      ldapmodify            rawutl
dbstart                     ldapmodifymt          rconfig
dbua                        ldapsearch            RegisterTType.pm
dbv                         ldifmigrator          relink
dbvO                        linkshlib             repo_mig
deploymentLibraryExport.sh  lmsgen                rman
deploymentLibraryImport.sh  loadjava              rmanO
deploync                    loadpsp               rtsora32
dg4odbc                     loadpspO              runclass
dg4pwd                      localconfig           sAgentUtils.pm
dg4pwdO                     lsnodes               sbttest
dgmgrl                      lsnrctl               sbttestO
dgmgrlO                     lsnrctl0              schema
diagsetup                   lxchknlb              schemasync
Directory.pm                lxegen                searchctl
dropjava                    lxinst                searchctl.pl
dsml2ldif                   mapsga                SecureAgentCmds.pm
dumpsga                     mapsga0               SecureDBConsoleCmds.pm
dumpsga0                    maxmem                SecureOMSCmds.pm
e2eme                       maxmemO               SecureUtil.pm
e2eme0                      mkpatch               setsso.pl
echodo                      mkpatchO              sqlldr
emagent                     mkstore               sqlldrO
emagent0                    ncomp                 sqlplus
emagentdeploy.pl            netca                 sqlplusO
EMAgentPatch.pm             netca_deinst.sh       srvconfig
EMAgent.pm                  netmgr                srvctl
emagtm                      nfsPatchPlugin.pm     StartAgent.pl
emagtm0                     nid                   statusnc
emagtmc                     nidO                  symfind
emagtmc0                    nmb                   sysresv
emca                        nmb0                  targetdeploy.pl
EmCommonCmdDriver.pm        nmcbufp               tkprof
EMconnectorCmds.pm          nmei                  tkprofO
emctl                       nmei0                 tnslsnr
EmctlCommon.pm              nmhs                  tnslsnr0
emctl.pl                    nmhs0                 tnsping
emctl.template              nmo                   tnsping0
emdctl                      nmo0                  transx
emdctl0                     nmocat                trcasst
EMDeploy                    nmocat0               trcldr
EMDeploy.pm                 nmuct                 trcroute
emdfail.command             nmupm                 trcroute0
EMDiag.pm                   nmupm0                trcsess
emdrollogs.pl               oclskd                tstshm
emdwgrd                     oclskd.bin            tstshmO
emdwgrd.bat                 oclsomon              uidrvci
emdwgrd.pl                  oclsomon.bin          umu
EmKeyCmds.pm                oclsvmon              unzip
EMomsCmds.pm                oclsvmon.bin          wrap
EMSAConsoleCommon.pm        ocrcheck              wrapO
emtgtctl                    ocrcheck0             wrc
emtgtctl2                   ocrconfig             wrcO
emtgtctl20                  ocrconfig0            xml
emutil                      ocrdump               xmlcg
emwd.pl                     ocrdump0              xmlwf
eusm                        ocssd                 xsl
exp                         ocssd.bin             xsql
expdp                       odisrvreg             xvm
expdpO                      oerr                  zip
[oracle@localhost bin]$ cd /
[oracle@localhost /]$ clear

[oracle@localhost /]$ cd /u01/app/oracle/product/11.1.0/db_1
[oracle@localhost db_1]$ ls
apex                 hs                          network      relnotes
assistants           install                     nls          root.sh
bin                  install.platform            oc4j         scheduler
ccr                  instantclient               odbc         slax
cdata                inventory                   OPatch       sqldeveloper
cfgtoollogs          j2ee                        opmn         sqlj
clone                javavm                      oracore      sqlplus
config               jdbc                        oraInst.loc  srvm
crs                  jdk                         ord          sysman
csmig                jlib                        oui          tg4ifmx
css                  ldap                        owb          tg4ingr
ctx                  lib                         owm          tg4sybs
dbs                  lib32                       perl         tg4tera
demo                 localhost.localdomain_orcl  plsql        uix
diagnostics          log                         precomp      ultrasearch
EMStagePatches_orcl  md                          racg         wwg
has                  mesg                        rdbms        xdk
[oracle@localhost db_1]$ cd bin
[oracle@localhost bin]$ ls
adapters                    expO                  oidca
adrci                       extjob                oidprovtool
adrciO                      extjobo               oifcfg
AgentLifeCycle.pm           extjobO               oifcfg0
AgentMisc.pm                extjoboO              ojvmjava
agentok.sh                  extproc               ojvmtc
AgentStatus.pm              extproc32             omsdown.pl
AgentSubAgent.pm            extproc32O            omsstart.pl
agtctl                      extprocO              omsstop.pl
agtctlO                     extusrupgrade         onsctl
amdu                        fmputl                orabase
amduO                       fmputlhp              oracg
aqxmlctl                    genagtsh              oracle
aqxmlctl.pl                 genclntsh             oracleO
asmcmd                      genclntst             oradism
asmcmdcore                  genezi                oraenv
bndlchk                     geneziO               orajaxb
cfo                         genksms               orapipe
clscfg                      gennfgt               orapki
clscfg.bin                  gennttab              orapwd
clsfmt                      genoccish             orapwdO
clsfmt.bin                  genorasdksh           oratclsh
clsid                       gensyslib             oratclsh0
clsid.bin                   grdcscan              oraxml
cluvfy                      hsalloci              oraxsl
commonenv                   hsallociO             osdbagrp
commonenv.template          hsdepxa               osdbagrp0
CompEMagent.pm              hsdepxaO              osh
CompEMcentral.pm            hsots                 ott
CompEMcore.pm               hsotsO                owm
CompEMdbconsole.pm          imp                   pafctl
coraenv                     impdp                 PARDeploy
crsctl                      impdpO                patchAgtStPlugin.pm
crsctl.bin                  impO                  Path.pm
crsdiag.pl                  jssu                  plshprof
csscan                      kfed                  plshprofO
ctxkbtc                     kfedO                 proc
ctxlc                       kfod                  procob32
ctxlcO                      kfodO                 proxyserv
ctxload                     kgmgr                 proxyserv.bin
ctxloadO                    kgmgrO                purgeDeploymentLibrary
cursize                     kgpmon                racgeut
cursizeO                    LaunchEMagent.pm      racgeutO
db2gc                       LaunchEMdbconsole.pm  racgimon
dbca                        lbuilder              racgimonO
DBConsoleLifeCycle.pm       lcsscan               racgmain
DBConsole.pm                ldapadd               racgmainO
DBConsoleStatus.pm          ldapaddmt             racgmdb
dbfsize                     ldapbind              racgmdbO
dbfsizeO                    ldapcompare           racgons
dbgeu_run_action.pl         ldapdelete            racgwrap
dbhome                      ldapmoddn             racgwrap.sbs
dbshut                      ldapmodify            rawutl
dbstart                     ldapmodifymt          rconfig
dbua                        ldapsearch            RegisterTType.pm
dbv                         ldifmigrator          relink
dbvO                        linkshlib             repo_mig
deploymentLibraryExport.sh  lmsgen                rman
deploymentLibraryImport.sh  loadjava              rmanO
deploync                    loadpsp               rtsora32
dg4odbc                     loadpspO              runclass
dg4pwd                      localconfig           sAgentUtils.pm
dg4pwdO                     lsnodes               sbttest
dgmgrl                      lsnrctl               sbttestO
dgmgrlO                     lsnrctl0              schema
diagsetup                   lxchknlb              schemasync
Directory.pm                lxegen                searchctl
dropjava                    lxinst                searchctl.pl
dsml2ldif                   mapsga                SecureAgentCmds.pm
dumpsga                     mapsga0               SecureDBConsoleCmds.pm
dumpsga0                    maxmem                SecureOMSCmds.pm
e2eme                       maxmemO               SecureUtil.pm
e2eme0                      mkpatch               setsso.pl
echodo                      mkpatchO              sqlldr
emagent                     mkstore               sqlldrO
emagent0                    ncomp                 sqlplus
emagentdeploy.pl            netca                 sqlplusO
EMAgentPatch.pm             netca_deinst.sh       srvconfig
EMAgent.pm                  netmgr                srvctl
emagtm                      nfsPatchPlugin.pm     StartAgent.pl
emagtm0                     nid                   statusnc
emagtmc                     nidO                  symfind
emagtmc0                    nmb                   sysresv
emca                        nmb0                  targetdeploy.pl
EmCommonCmdDriver.pm        nmcbufp               tkprof
EMconnectorCmds.pm          nmei                  tkprofO
emctl                       nmei0                 tnslsnr
EmctlCommon.pm              nmhs                  tnslsnr0
emctl.pl                    nmhs0                 tnsping
emctl.template              nmo                   tnsping0
emdctl                      nmo0                  transx
emdctl0                     nmocat                trcasst
EMDeploy                    nmocat0               trcldr
EMDeploy.pm                 nmuct                 trcroute
emdfail.command             nmupm                 trcroute0
EMDiag.pm                   nmupm0                trcsess
emdrollogs.pl               oclskd                tstshm
emdwgrd                     oclskd.bin            tstshmO
emdwgrd.bat                 oclsomon              uidrvci
emdwgrd.pl                  oclsomon.bin          umu
EmKeyCmds.pm                oclsvmon              unzip
EMomsCmds.pm                oclsvmon.bin          wrap
EMSAConsoleCommon.pm        ocrcheck              wrapO
emtgtctl                    ocrcheck0             wrc
emtgtctl2                   ocrconfig             wrcO
emtgtctl20                  ocrconfig0            xml
emutil                      ocrdump               xmlcg
emwd.pl                     ocrdump0              xmlwf
eusm                        ocssd                 xsl
exp                         ocssd.bin             xsql
expdp                       odisrvreg             xvm
expdpO                      oerr                  zip
[oracle@localhost bin]$ ./dbstart
ORACLE_HOME_LISTNER is not SET, unable to auto-start Oracle Net Listener
Usage: ./dbstart ORACLE_HOME

which file do I open to edit ORACLE_HOME_LISTENER?
0
mrjoltcolaCommented:
You have an incomplete configuration.

Your ORACLE_HOME is:    /u01/app/oracle/product/11.1.0/db_1

Set that in the oracle user's .profile or .bash_profile (or even /etc/profile for system wide)

 export ORACLE_HOME=/u01/app/oracle/product/11.1.0/db_1

Also set:

 export PATH=$ORACLE_HOME/bin:$PATH
 export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH


Also set ORA_HOME in dbora to the same value of ORACLE_HOME


>>which file do I open to edit ORACLE_HOME_LISTENER

I have answered that already. Read previous comments above. :)
0
epifanio67Author Commented:
sorry... now I am lost..
0
mrjoltcolaCommented:
If you followed the Oracle install guide you would have seen to set the ORACLE_HOME environment variables. However, this is note required to make the dbora script work. Just edit that script and set

ORA_HOME="/u01/app/oracle/product/11.1.0/db_1"
0
epifanio67Author Commented:
thx so much mrjoltcola...

I've taken my time to review this because I was nearly losing my mind yesterday. I realize linux knowledge is important; therefore I am sticking to it until I get to your level (if I am not sent to mental institution before that) :-)

I have reviewed and confirmed every step and yet I am still unable to start the db...
here is what I get:

[oracle@localhost bin]$ /etc/init.d/dbora start
Starting oracle: Password:
ORACLE_HOME_LISTNER is not SET, unable to auto-start Oracle Net Listener
Usage: /u01/app/oracle/product/11.1.0/db_1/bin/dbstart ORACLE_HOME

this is what I do to try to set the ORACLE_HOME_LISTNER:
I nano the dbora file located here
/etc/init.d/dbora
and make sure the ORA_HOME has the correct path:
ORA_OWNER="oracle"
ORA_HOME="/u01/app/oracle/product/11.1.0/db_1"

I also nano dbstart located here
/u01/app/oracle/product/11.1.0/db_1/bin/dbstart
to make sure the first argument is correct:

# First argument is used to bring up Oracle Net Listener
ORACLE_HOME_LISTNER=$ORACLE_HOME

and nothing... I am still unable to run
/etc/init.d/dbora

[oracle@localhost /]$ /etc/init.d/dbora stop
Stopping oracle: Password:
su: incorrect password
[oracle@localhost /]$ /etc/init.d/dbora stop
Stopping oracle: Password:
[oracle@localhost /]$ /etc/init.d/dbora start
Starting oracle: Password:
ORACLE_HOME_LISTNER is not SET, unable to auto-start Oracle Net Listener
Usage: /u01/app/oracle/product/11.1.0/db_1/bin/dbstart ORACLE_HOME





[oracle@localhost /]$


:-(

please help
 

0
mrjoltcolaCommented:
The problem is this line wants an environment variable that apparently does not exist:

# First argument is used to bring up Oracle Net Listener
ORACLE_HOME_LISTNER=$ORACLE_HOME


ORACLE_HOME must be set in your environment.

Edit your .profile or .bash_profile for the oracle user and add it. See my directions in:

http:#24818538


ORACLE_HOME is a required environment variable.
0
epifanio67Author Commented:
thx mrjoltcola...

To add the environmental var; I go to /etc/ sh
sh-3.2$ ORACLE_HOME=/u01/app/oracle/product/11.1.0/db_1
sh-3.2$ export ORACLE_HOME
exit

then
when I nano /etc/profile; I don't see ORACLE_HOME :

# /etc/profile

# System wide environment and startup programs, for login setup
# Functions and aliases go in /etc/bashrc

pathmunge () {
        if ! echo $PATH | /bin/egrep -q "(^|:)$1($|:)" ; then
           if [ "$2" = "after" ] ; then
              PATH=$PATH:$1
           else
              PATH=$1:$PATH
           fi
        fi
}

# ksh workaround
if [ -z "$EUID" -a -x /usr/bin/id ]; then
        EUID=`id -u`
        UID=`id -ru`
fi

# Path manipulation
if [ "$EUID" = "0" ]; then
        pathmunge /sbin
        pathmunge /usr/sbin
        pathmunge /usr/local/sbin
fi
# No core files by default
ulimit -S -c 0 > /dev/null 2>&1

if [ -x /usr/bin/id ]; then
        USER="`id -un`"
        LOGNAME=$USER
        MAIL="/var/spool/mail/$USER"
fi

HOSTNAME=`/bin/hostname`
HISTSIZE=1000

if [ -z "$INPUTRC" -a ! -f "$HOME/.inputrc" ]; then
    INPUTRC=/etc/inputrc
fi

export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE INPUTRC

for i in /etc/profile.d/*.sh ; do
    if [ -r "$i" ]; then
        . $i
    fi
done

unset i
unset pathmunge

thx so much for being there....
0
epifanio67Author Commented:
oh wow.. look what I just got...

I never seen this before... SELinux icon... AVC denial
Summary
SELinux is preventing lsnrctl from loading /u01/app/oracle/product/11.1.0/db_1/lib/libnnz11.so which requires text relocation.
Detailed Description
The lsnrctl application attempted to load /u01/app/oracle/product/11.1.0/db_1/lib/libnnz11.so which requires text relocation. This is a potential security problem. Most libraries do not need this permission. Libraries are sometimes coded incorrectly and request this permission. The SELinux Memory Protection Tests web page explains how to remove this requirement. You can configure SELinux temporarily to allow /u01/app/oracle/product/11.1.0/db_1/lib/libnnz11.so to use relocation as a workaround, until the library is fixed. Please file a bug report against this package.
Allowing Access
If you trust /u01/app/oracle/product/11.1.0/db_1/lib/libnnz11.so to run correctly, you can change the file context to textrel_shlib_t. "chcon -t textrel_shlib_t '/u01/app/oracle/product/11.1.0/db_1/lib/libnnz11.so'" You must also change the default file context files on the system in order to preserve them even on a full relabel. "semanage fcontext -a -t textrel_shlib_t '/u01/app/oracle/product/11.1.0/db_1/lib/libnnz11.so'" The following command will allow this access:chcon -t textrel_shlib_t '/u01/app/oracle/product/11.1.0/db_1/lib/libnnz11.so'

I am gonna try it...
0
epifanio67Author Commented:
just did... no db...

losing my mind...
0
mrjoltcolaCommented:
SELinux should be disabled for an Oracle box. This is always the first thing I uncheck when installing Linux. To disable temporarily from the command line do:  setenforce 0

But you should disable it permanently.

This is my /etc/selinux/config

After changing, reboot the box. :)
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#       enforcing - SELinux security policy is enforced.
#       permissive - SELinux prints warnings instead of enforcing.
#       disabled - SELinux is fully disabled.
SELINUX=disabled
# SELINUXTYPE= type of policy in use. Possible values are:
#       targeted - Only targeted network daemons are protected.
#       strict - Full SELinux protection.
SELINUXTYPE=targeted

Open in new window

0
mrjoltcolaCommented:
Don't be frustrated, these are good lessons. The main lesson is, follow the Linux install guide from the very start. :) Most of these things are in the install guide.

I have a good book to recommend, it has a full section on Linux setup of Oracle.

http://www.apress.com/book/view/9781430210153
0
epifanio67Author Commented:
Thx u so much mrjoltcola... I will definitely get the book...

well, I disabled SELinux and rebooted....

then, I tried to start it again and this is what I get:

[oracle@localhost bin]$ /etc/init.d/dbora stop
Stopping oracle: Password:
[oracle@localhost bin]$ /etc/init.d/dbora start
Starting oracle: Password:
Failed to auto-start Oracle Net Listener using ORACLE_HOME/bin/tnslsnr

different msg is a good thing... but I just don't know what it means... :-)
0
mrjoltcolaCommented:
Please show me your .profile and your dbora file

Include them in separate snippet windows


0
epifanio67Author Commented:
sure... thx..

here is the oracle profile
nano /etc/profile

# /etc/profile
 
# System wide environment and startup programs, for login setup
# Functions and aliases go in /etc/bashrc
 
pathmunge () {
        if ! echo $PATH | /bin/egrep -q "(^|:)$1($|:)" ; then
           if [ "$2" = "after" ] ; then
              PATH=$PATH:$1
           else
              PATH=$1:$PATH
           fi
        fi
}
# ksh workaround
if [ -z "$EUID" -a -x /usr/bin/id ]; then
        EUID=`id -u`
        UID=`id -ru`
fi
 
# Path manipulation
if [ "$EUID" = "0" ]; then
        pathmunge /sbin
        pathmunge /usr/sbin
        pathmunge /usr/local/sbin
fi
# No core files by default
ulimit -S -c 0 > /dev/null 2>&1
 
if [ -x /usr/bin/id ]; then
        USER="`id -un`"
        LOGNAME=$USER
        MAIL="/var/spool/mail/$USER"
fi
 
HOSTNAME=`/bin/hostname`
HISTSIZE=1000
 
if [ -z "$INPUTRC" -a ! -f "$HOME/.inputrc" ]; then
    INPUTRC=/etc/inputrc
fi
 
export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE INPUTRC
for i in /etc/profile.d/*.sh ; do
    if [ -r "$i" ]; then
        . $i
    fi
done
 
unset i
unset pathmunge

Open in new window

0
epifanio67Author Commented:
and here is the dbora file:
/etc/init.d/dbora
#! /bin/bash
# dbora
#
# oracle Start/Stop the Databases...
#
# chkconfig: 2345 99 10
# description: Start or stop Oracle databases
#
# processname: oracle
# config: /etc/oratab
# pidfile: /var/run/oracle.pid
 
# Source function library.
. /etc/init.d/functions
RETVAL=0
ORA_OWNER="oracle"
ORA_HOME="/u01/app/oracle/product/11.1.0/db_1"
 
# See how we were called.
 
prog="oracle"
 
start() {
echo -n $"Starting $prog: "
su - $ORA_OWNER -c "$ORA_HOME/bin/dbstart $ORA_HOME"
# su - $ORA_OWNER -c "$ORA_HOME/bin/lsnrctl start"
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/dbora
 
return $RETVAL
}
 
stop() {
echo -n $"Stopping $prog: "
su - $ORA_OWNER -c "$ORA_HOME/bin/dbshut $ORA_HOME"
# su - $ORA_OWNER -c "$ORA_HOME/bin/lsnrctl stop"
}
 
restart() {
stop
start
}
 
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
restart
;;
*)
echo $"Usage: $0 {start|stop|restart}"
exit 1
esac
 
exit $?

Open in new window

0
mrjoltcolaCommented:
/etc/profile and the oracle profile are 2 different things. The oracle profile is in the oracle user's home directory. It is that file (or this file) that I told you to add the ORACLE_HOME environment vars.

You must then restart a shell or re-login for the vars to go into effect

Also, why did you comment out the lsnrctl start lines in dbora?
# Add to your oracle profile or your /etc/profile
#
export ORACLE_HOME=/u01/app/oracle/product/11.1.0/db_1
export PATH=$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH

Open in new window

0
mrjoltcolaCommented:
Note it is .profile or .bash_profile, the dot makes then hidden to non-root users. (ls -a to show them)
0
epifanio67Author Commented:
oh... I had to read this 6 times... ok, I think I get it...
let me repeat...

I need to add to oracle /home/oracle/.bash_profile this:
ORACLE_HOME=/u01/app/oracle/product/11.1.0/db_1

and

I didn't know I had the lsnctl line commented in the dbora file... I need to check and uncomment....

let me try...

0
epifanio67Author Commented:
oh my gosh... something happened... it looks good...

it seems that the listener started

but I just try to access it via the URL; but it didn't come up

I am gonna reboot...
[oracle@localhost etc]$ /etc/init.d/dbora start
Starting oracle: Password: 
Failed to auto-start Oracle Net Listener using ORACLE_HOME/bin/tnslsnr
Password: 
 
LSNRCTL for Linux: Version 11.1.0.6.0 - Production on 10-JUL-2009 15:59:48
 
Copyright (c) 1991, 2007, Oracle.  All rights reserved.
 
Starting /u01/app/oracle/product/11.1.0/db_1/bin/tnslsnr: please wait...
 
TNSLSNR for Linux: Version 11.1.0.6.0 - Production
System parameter file is /u01/app/oracle/product/11.1.0/db_1/network/admin/listener.ora
Log messages written to /u01/app/oracle/product/11.1.0/db_1/log/diag/tnslsnr/localhost/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost.localdomain)(PORT=1521)))
 
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.1.0.6.0 - Production
Start Date                10-JUL-2009 15:59:51
Uptime                    0 days 0 hr. 0 min. 1 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/oracle/product/11.1.0/db_1/network/admin/listener.ora
Listener Log File         /u01/app/oracle/product/11.1.0/db_1/log/diag/tnslsnr/localhost/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost.localdomain)(PORT=1521)))
The listener supports no services
The command completed successfully

Open in new window

0
mrjoltcolaCommented:
You are not quite reading close enough. Copy my command exactly, verbatim.

export ORACLE_HOME=/u01/app/oracle/product/11.1.0/db_1
0
mrjoltcolaCommented:
Test if the database is up:

ps -ef | grep smon
0
epifanio67Author Commented:
thx a million mrjoltcola...thx u so much for hanging there with me....

I just typed
https://localhost.localdomain:1158/em
to access it... and nope... can't access it...

:-( crying


[oracle@localhost ~]$ ps -ef | grep smon
oracle    4790  4770  0 16:12 pts/1    00:00:00 grep smon

Open in new window

0
mrjoltcolaCommented:
Ok lets _not_ try to connect via EM yet (https://localhost.localdomain:1158/em) , lets just get the basic database up.

So what happens now when you run the /etc/init.d/dbora start from root?

# /etc/init.d/dbora start
0
epifanio67Author Commented:
oh ok...

here is what I get:
[oracle@localhost ~]$ ps -ef | grep smon
oracle    4790  4770  0 16:12 pts/1    00:00:00 grep smon
[oracle@localhost ~]$ su
Password: 
[root@localhost oracle]# /etc/init.d/dbora start
Starting oracle: Failed to auto-start Oracle Net Listener using ORACLE_HOME/bin/tnslsnr
 
LSNRCTL for Linux: Version 11.1.0.6.0 - Production on 10-JUL-2009 16:23:14
 
Copyright (c) 1991, 2007, Oracle.  All rights reserved.
 
TNS-01106: Listener using listener name LISTENER has already been started
 
[root@localhost oracle]# 

Open in new window

0
mrjoltcolaCommented:
Lets skip dbora for a while, switch back to the oracle user and run dbstart directly:

Example from my system:


[oracle@vice bin]$ dbstart $ORACLE_HOME

Processing Database instance "CAT": log file /oracle/11.1.0/startup.log
Processing Database instance "MMED1": log file /oracle/11.1.0/startup.log
0
epifanio67Author Commented:
oh ok... here is what I get:
[oracle@localhost bin]$ dbstart $ORACLE_HOME
Failed to auto-start Oracle Net Listener using ORACLE_HOME/bin/tnslsnr
[oracle@localhost bin]$ 

Open in new window

0
mrjoltcolaCommented:
It like you have no instances in /etc/oratab

What is in /etc/oratab? Remember the instructions at the beginning of this thread? Instances must be set to Y to auto-start.
0
epifanio67Author Commented:
thx so much...

well, here is what's in /etc/oratab

# the entry.  Lines beginning with a pound sign, '#', are comments.
#
# Entries are of the form:
#   $ORACLE_SID:$ORACLE_HOME:<N|Y>:
#
# The first and second fields are the system identifier and home
# directory of the database respectively.  The third filed indicates
# to the dbstart utility that the database should , "Y", or should not,
# "N", be brought up at system boot time.
#
# Multiple entries with the same $ORACLE_SID are not allowed.
#
#
orcl:/u01/app/oracle/product/11.1.0/db_1:N

Open in new window

0
epifanio67Author Commented:
ooohhhh..

do you want me to change the :N to :Y?
0
mrjoltcolaCommented:
I don't understand. You are skipping steps that we already told you about? :(

Change the N to Y


orcl:/u01/app/oracle/product/11.1.0/db_1:Y

Then rerun dbstart (as oracle)

If that works, then run dbshut (as oracle), then proceed to try /etc/init.d/dbora start (as root) again
0
mrjoltcolaCommented:
>>do you want me to change the :N to :Y?

Yes *bonk*   :)   getting late there?
0
mrjoltcolaCommented:
I need to reboot for a PC tweak. will be back in a few. You can IM me to ping me back to the question if I don't see your response.
0
epifanio67Author Commented:
thx u so much... I am laughing so hard.... I needed that... thx

done.. here is that I get:

[oracle@localhost etc]$ /etc/init.d/dbora start
Starting oracle: Password: 
Failed to auto-start Oracle Net Listener using ORACLE_HOME/bin/tnslsnr
Processing Database instance "orcl": log file /u01/app/oracle/product/11.1.0/db_1/startup.log
Password: 
 
LSNRCTL for Linux: Version 11.1.0.6.0 - Production on 10-JUL-2009 16:43:40
 
Copyright (c) 1991, 2007, Oracle.  All rights reserved.
 
Starting /u01/app/oracle/product/11.1.0/db_1/bin/tnslsnr: please wait...
 
TNSLSNR for Linux: Version 11.1.0.6.0 - Production
System parameter file is /u01/app/oracle/product/11.1.0/db_1/network/admin/listener.ora
Log messages written to /u01/app/oracle/product/11.1.0/db_1/log/diag/tnslsnr/localhost/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost.localdomain)(PORT=1521)))
 
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.1.0.6.0 - Production
Start Date                10-JUL-2009 16:43:40
Uptime                    0 days 0 hr. 0 min. 0 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/oracle/product/11.1.0/db_1/network/admin/listener.ora
Listener Log File         /u01/app/oracle/product/11.1.0/db_1/log/diag/tnslsnr/localhost/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost.localdomain)(PORT=1521)))
The listener supports no services
The command completed successfully
 
[oracle@localhost etc]$ 

Open in new window

0
mrjoltcolaCommented:
Did the db start?

ps -ef | grep smon
0
epifanio67Author Commented:
no, I am still unable to access it via the URL..
the boss is screaming to get home too...
I don't know why this is not working...


[root@localhost etc]# ps -ef | grep smon
oracle    7026     1  0 16:49 ?        00:00:00 ora_smon_orcl
root      7303  6843  0 16:53 pts/1    00:00:00 grep smon
[root@localhost etc]# 

Open in new window

0
epifanio67Author Commented:
thx u so much mrjoltcola.... I have to break for a bit...
I will be back online later to review config...
0
mrjoltcolaCommented:
The good news is the database is now starting correctly.

Now see what the listener is doing.

lsnrctl status
lsnrctl services



0
epifanio67Author Commented:
Hello mrjoltcola,

I am still unable to get the db via the browser:
https://localhost.localdomain:1158/em

below are the output of the two commands listed above.


[oracle@localhost ~]$ /etc/init.d/dbora start
Starting oracle: Password: 
Failed to auto-start Oracle Net Listener using ORACLE_HOME/bin/tnslsnr
Processing Database instance "orcl": log file /u01/app/oracle/product/11.1.0/db_1/startup.log
Password: 
 
LSNRCTL for Linux: Version 11.1.0.6.0 - Production on 13-JUL-2009 10:15:15
 
Copyright (c) 1991, 2007, Oracle.  All rights reserved.
 
TNS-01106: Listener using listener name LISTENER has already been started
 
[oracle@localhost ~]$ lsnrctl status
 
LSNRCTL for Linux: Version 11.1.0.6.0 - Production on 13-JUL-2009 10:15:41
 
Copyright (c) 1991, 2007, Oracle.  All rights reserved.
 
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.1.0.6.0 - Production
Start Date                13-JUL-2009 07:36:26
Uptime                    0 days 2 hr. 39 min. 14 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/oracle/product/11.1.0/db_1/network/admin/listener.ora
Listener Log File         /u01/app/oracle/product/11.1.0/db_1/log/diag/tnslsnr/localhost/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost.localdomain)(PORT=1521)))
Services Summary...
Service "orcl" has 1 instance(s).
  Instance "orcl", status READY, has 1 handler(s) for this service...
Service "orclXDB" has 1 instance(s).
  Instance "orcl", status READY, has 1 handler(s) for this service...
Service "orcl_XPT" has 1 instance(s).
  Instance "orcl", status READY, has 1 handler(s) for this service...
The command completed successfully
[oracle@localhost ~]$ lsnrctl services
 
LSNRCTL for Linux: Version 11.1.0.6.0 - Production on 13-JUL-2009 10:16:08
 
Copyright (c) 1991, 2007, Oracle.  All rights reserved.
 
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
Services Summary...
Service "orcl" has 1 instance(s).
  Instance "orcl", status READY, has 1 handler(s) for this service...
    Handler(s):
      "DEDICATED" established:0 refused:0 state:ready
         LOCAL SERVER
Service "orclXDB" has 1 instance(s).
  Instance "orcl", status READY, has 1 handler(s) for this service...
    Handler(s):
      "D000" established:0 refused:0 current:0 max:972 state:ready
         DISPATCHER <machine: localhost.localdomain, pid: 10724>
         (ADDRESS=(PROTOCOL=tcp)(HOST=localhost.localdomain)(PORT=49498))
Service "orcl_XPT" has 1 instance(s).
  Instance "orcl", status READY, has 1 handler(s) for this service...
    Handler(s):
      "DEDICATED" established:0 refused:0 state:ready
         LOCAL SERVER
The command completed successfully
[oracle@localhost ~]$ 

Open in new window

0
mrjoltcolaCommented:
Enterprise manager needs to be started. Try

emctl start dbconsole
0
epifanio67Author Commented:
thx mrjoltcola..

does this mean, I have to define it here:
/home/oracle/bash_profile?
[oracle@localhost ~]$ emctl start dbconsole
Environment variable ORACLE_SID not defined. Please define it. 

Open in new window

0
epifanio67Author Commented:
oh no... I have to define it here:
/bin/sh
sh-3.2$ ORACLE_SID=NAMEOFDATABASE
exit

correct?
0
mrjoltcolaCommented:
If you only have one database, I usually recommend to set ORACLE_SID in the .profile

Otherwise you must manually set it.

You can also add a call to source the oraenv script in your .profile


. $ORACLE_HOME/bin/oraenv


Note the dot above and then a space. That is critical, it is sourcing that script into your shell. It will prompt for the ORACLE_SID upon login.
0
epifanio67Author Commented:
ok, here is what I did
as root
nano /etc/profile
added: export ORACLE_SID=NAMEOFDATABASE

then,
under all the export variables, I added
. $ORACLE_HOME/bin/oraenv

then, if prompted for a passwd, input the password set during initial install, correct?

trying now....
0
epifanio67Author Commented:
weird... I am still getting this...

do I need to reboot?

thx
[root@localhost etc]# emctl start dbconsole
Environment variable ORACLE_SID not defined. Please define it. 

Open in new window

0
epifanio67Author Commented:
I just rebooted...

here is what I get now... frustrating... running out of nails to chew.


[oracle@localhost ~]$ /etc/init.d/dbora start
Starting oracle: Password: 
ORACLE_SID = [gnsys] ? Y      
ORACLE_HOME = [/home/oracle] ? Y
The Oracle base for ORACLE_HOME=Y is Y
Failed to auto-start Oracle Net Listener using ORACLE_HOME/bin/tnslsnr
Processing Database instance "orcl": log file /u01/app/oracle/product/11.1.0/db_1/startup.log
Password: 
ORACLE_SID = [gnsys] ? mypasswd
ORACLE_HOME = [/home/oracle] ? mypasswd
The Oracle base for ORACLE_HOME=mypasswd is mypasswd
 
LSNRCTL for Linux: Version 11.1.0.6.0 - Production on 13-JUL-2009 12:21:14
 
Copyright (c) 1991, 2007, Oracle.  All rights reserved.
 
TNS-01106: Message 1106 not found; No message file for product=network, facility=TNS       [LISTENER]
 
:-(
thx mrjoltcola

Open in new window

0
mrjoltcolaCommented:
Ok, there is no need to use oraenv if you set ORACLE_SID.

Remove oraenv references from the profile, but _LEAVE_ the ORACLE_SID

0
epifanio67Author Commented:
Ok, cool... I removed
. $ORACLE_HOME/bin/oraenv
from /etc/profile

then, I logged off and back in

then, I start it via dbora and ran emctl start console.

Not sure why I am getting this msg. During the initial install, the documentation asked to set these environmental variables (which I thought I did)
$ORACLE_BASE=/u01/app/oracle
$ORACLE_SID=gnsys
export ORACLE_BASE ORACLE_SID

I have never been asked to configure gnsys though?


[oracle@localhost ~]$ /etc/init.d/dbora start
Starting oracle: Password: 
Failed to auto-start Oracle Net Listener using ORACLE_HOME/bin/tnslsnr
Processing Database instance "orcl": log file /u01/app/oracle/product/11.1.0/db_1/startup.log
Password: 
 
LSNRCTL for Linux: Version 11.1.0.6.0 - Production on 13-JUL-2009 12:49:44
 
Copyright (c) 1991, 2007, Oracle.  All rights reserved.
 
TNS-01106: Listener using listener name LISTENER has already been started
 
[oracle@localhost ~]$ emctl start dbconsole
OC4J Configuration issue. /u01/app/oracle/product/11.1.0/db_1/oc4j/j2ee/OC4J_DBConsole_localhost.localdomain_gnsys not found. 
[oracle@localhost ~]$ 

Open in new window

0
mrjoltcolaCommented:
I will repeat one last time regarding the environment variables you need.

ORACLE_HOME
ORACLE_BASE
ORACLE_SID

Those must be set before any db related work or programs are run in the shell.

ORACLE_HOME is required before running dbora / dbstart, but it takes its SIDs from /etc/oratab

Other tools like sqlplus or emctl (to start enterprise manager) also require ORACLE_SID because they are database specific.

ORACLE_SID will change per each individual database instance, but the other 2 variables stay the same if you have only one Oracle installation. Also understand that your PATH and LD_LIBRARY_PATH must also include the correct bin and lib directories under ORACLE_HOME.

Here is one of my .profile's

This is an EXAMPLE, do not take them literally. Your ORACLE_SID and NLS_LANG may differ. Or NLS_LANG may not be set at all in your environment.

# .bash_profile
 
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi
 
# User specific environment and startup programs
 
export ORACLE_BASE=/oracle
export ORACLE_HOME=/oracle/11.1.0
export ORACLE_SID=MMED1
 
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib
export PATH=$PATH:$ORACLE_HOME/bin:$HOME/bin
 
export NLS_LANG=AMERICAN_AMERICA.AL32UTF8

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
epifanio67Author Commented:
mrjoltcola... I want to thank you for the courtesy and respect you have extended to me. Thank you for hanging there answering so many basic questions... I have no words.... thx u for your patience with me and your encouragement.

I am sure that anyone reviewing this solution will make things work....

regards,
0
mrjoltcolaCommented:
You are very welcome. I am always available for additional help. Good luck.

Sorry I did not reply sooner I was sidetracked with one of my own issues today. :)
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Oracle Database

From novice to tech pro — start learning today.