Link to home
Start Free TrialLog in
Avatar of jcob_l
jcob_l

asked on

command not

Why command not found

[oracle@newmac db]$ lsnrctl status
bash: lsnrctl: command not found
[oracle@newmac db]$ cd network/
[oracle@newmac network]$ ls
admin  doc  install  jlib  lib  log  mesg  tools  trace
[oracle@newmac network]$ cd admin/
[oracle@newmac admin]$ ls
listener.ora  samples  shrept.lst  tnsnames.ora  tnsnames.ora~
[oracle@newmac admin]$ lsnrctl start
bash: lsnrctl: command not found
[oracle@newmac admin]$ lsnrctl
bash: lsnrctl: command not found
[oracle@newmac admin]$ cat listener.ora
# listener.ora Network Configuration File: /oracle/app/oracle/product/11.2.0/db/network/admin/listener.ora
# Generated by Oracle configuration tools.

LISTENER_DB =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = newmac)(PORT = 1521)
    )
  )

ADR_BASE_LISTENER_DB = /oracle/app/oracle

[oracle@newmac admin]$ cat tnsnames.ora
# tnsnames.ora Network Configuration File: /oracle/app/oracle/product/11.2.0/db/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.

LISTENER_POST =
  (ADDRESS = (PROTOCOL = TCP)(HOST = 10.0.0.11)(PORT = 1521))


STAND =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 10.0.0.11)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = stand)
    )
  )

DEST =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 10.0.0.10)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = dest)
    )
  )

TEST =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = newmac)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = test)
    )
 )
POST =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = newmac)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = post)
    )
  )
[oracle@newmac admin]$ lsnrctl
bash: lsnrctl: command not found
[oracle@newmac admin]$
Avatar of slightwv (䄆 Netminder)
slightwv (䄆 Netminder)

Just like your last several questions on this topic:  $ORACLE_HOME/bin needs to be in your PATH.

I strongly suggest you add everything to your .profile so you don't keep forgetting.

export ORACLE_HOME=/oracle/app/oracle/product/11.2.0/db
export PATH=$ORACLE_HOME/bin:$PATH
lsnrctl
ASKER CERTIFIED SOLUTION
Avatar of sventhan
sventhan
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jcob_l

ASKER

[oracle@newmac db]$ ls -al $ORACLE_HOME/bin/lsnrctl
-rwxr-x--x 1 oracle oinstall 120664 Aug 11 21:40 /oracle/app/oracle/product/11.2.0/db/bin/lsnrctl
Avatar of jcob_l

ASKER

I started like this..

LSNRCTL> start
Starting /oracle/app/oracle/product/11.2.0/db/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 11.2.0.1.0 - Production
System parameter file is /oracle/app/oracle/product/11.2.0/db/network/admin/listener.ora
Log messages written to /oracle/app/oracle/product/11.2.0/db/log/diag/tnslsnr/newmac/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=newmac)(PORT=1521)))

Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date                30-SEP-2013 10:27:47
Uptime                    0 days 0 hr. 0 min. 2 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /oracle/app/oracle/product/11.2.0/db/network/admin/listener.ora
Listener Log File         /oracle/app/oracle/product/11.2.0/db/log/diag/tnslsnr/newmac/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=newmac)(PORT=1521)))
The listener supports no services
The command completed successfully
LSNRCTL>

Is this correct..
yes. It is.
Avatar of jcob_l

ASKER

Thank you very much for the clue..

Great !!