How to Resolve TNS-01201: Listener cannot find executable

  • by

TNS-01201

After adding a static service to the local listener, I tried to start the listener, but it failed with TNS-01201.

[oracle@test ~]$ vi $ORACLE_HOME/network/admin/listener.ora
...
SID_LIST_LISTENER=
  (SID_LIST=
    (SID_DESC=
      (SID_NAME=ORCL)
      (ORACLE_HOME=/u01/app/oracle/product/19.0.0/dbhome_1)
    )
  )
[oracle@test ~]$ lsnrctl stop
[oracle@test ~]$ lsnrctl start
...
TNS-01201: Listener cannot find executable /u01/app/oracle/product/19.0.0/dbhome_1/bin/oracle for SID ORCL

Listener failed to start. See the error message(s) above...

Solution

To solve TNS-01201, we should inspect ORACLE_SID and ORACLE_HOME, then correct them if any.

[oracle@test ~]$ echo $ORACLE_SID
ORCLCDB
[oracle@test ~]$ echo $ORACLE_HOME
/u01/app/oracle/product/19.3.0/dbhome_1

As we can see, we used incorrect values of ORACLE_SID and ORACLE_HOME in the listener.ora.

  • ORACLE_SID
  • It should be ORCLCDB, not ORCL.

  • ORACLE_HOME
  • it should be 19.3.0, not 19.0.0.

We fixed the problem by correct the values of ORACLE_SID and ORACLE_HOME like this:

[oracle@test ~]$ vi $ORACLE_HOME/network/admin/listener.ora
...
SID_LIST_LISTENER=
  (SID_LIST=
    (SID_DESC=
      (SID_NAME=ORCLCDB)
      (ORACLE_HOME=/u01/app/oracle/product/19.3.0/dbhome_1)
    )
  )

Then start the listener again.

[oracle@test ~]$ lsnrctl start
...
Services Summary...
Service "ORCLCDB" has 1 instance(s).
  Instance "ORCLCDB", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully

We solved it.

Leave a Reply

Your email address will not be published. Required fields are marked *