A. lsnrctl status
Service "star" has 1 instance(s).
Instance "star", status UNKNOWN, has 1 handler(s) for this service...
B.possible problem
1.listener.ora define wrong term. (10%)
2./etc/hosts define wrong hostname (5%)
3.tnanames.ora define wrong service name that can not match listener.ora (5%)
4.someone chagne $oracle_home/bin/oracle permission and restart instance to cause listener register changed. (80%)
C.solution
1. destory listener.ora, create a new one.
2.modify /etc/hosts file , correct to new one.
3.modify tnsnames.ora
4. let's see before modify (use static mapping)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS= (PROTOCOL= IPC)(KEY= test6))
(ADDRESS= (PROTOCOL= IPC)(KEY= PNPKEY))
)
)
)
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME= c1)
(ORACLE_HOME= /ora10g)
(SID_NAME = c1)
)
(SID_DESC =
(GLOBAL_DBNAME= c3)
(ORACLE_HOME= /ora10g)
(SID_NAME = c3)
)
(SID_DESC =
(GLOBAL_DBNAME= c2)
(ORACLE_HOME= /ora10g)
(SID_NAME = c2)
)
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /ora10g)
(PROGRAM = extproc)
)
)
STARTUP_WAIT_TIME_LISTENER = 0
CONNECT_TIMEOUT_LISTENER = 10
TRACE_LEVEL_LISTENER = OFF
L1521 =
(ADDRESS_LIST =
(ADDRESS= (PROTOCOL= TCP)(Host= hela6)(Port= 1521))
)
SID_LIST_L1521 =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME= c1)
(ORACLE_HOME= /ora10g)
(SID_NAME = c1)
)
(SID_DESC =
(GLOBAL_DBNAME= c3)
(ORACLE_HOME= /ora10g)
(SID_NAME = c3)
)
(SID_DESC =
(GLOBAL_DBNAME= c2)
(ORACLE_HOME= /ora10g)
(SID_NAME = c2)
)
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /ora10g)
(PROGRAM = extproc)
)
)
STARTUP_WAIT_TIME_L1521 = 0
CONNECT_TIMEOUT_L1521 = 10
TRACE_LEVEL_L1521 = OFF
L1526 =
(ADDRESS_LIST =
(ADDRESS= (PROTOCOL= TCP)(Host= hela6)(Port= 1526))
)
SID_LIST_L1526 =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME= c1)
(ORACLE_HOME= /ora10g)
(SID_NAME = c1)
)
(SID_DESC =
(GLOBAL_DBNAME= c3)
(ORACLE_HOME= /ora10g)
(SID_NAME = c3)
)
(SID_DESC =
(GLOBAL_DBNAME= c2)
(ORACLE_HOME= /ora10g)
(SID_NAME = c2)
)
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /ora10g)
(PROGRAM = extproc)
)
)
STARTUP_WAIT_TIME_L1526 = 0
CONNECT_TIMEOUT_L1526 = 10
TRACE_LEVEL_L1526 = OFF
change to .....
LISTENER =
(ADDRESS_LIST =
(ADDRESS= (PROTOCOL= IPC)(KEY= test6))
(ADDRESS= (PROTOCOL= IPC)(KEY= PNPKEY))
)
L1521 =
(ADDRESS_LIST =
(ADDRESS= (PROTOCOL=TCP)(port=1521))
(ADDRESS= (PROTOCOL= IPC)(KEY= c1))
)
L1526 =
(ADDRESS_LIST =
(ADDRESS= (PROTOCOL=TCP)(port=1526))
(ADDRESS= (PROTOCOL= IPC)(KEY= c3))
)
5. When you start listener, you will find no instance register.
lsnrctl status
LSNRCTL for IBM/AIX RISC System/6000: Version 10.2.0.4.0 - Production on 05-JUL-2012 15:14:36
Copyright (c) 1991, 2007, Oracle. All rights reserved.
Connecting to (ADDRESS=(PROTOCOL=IPC)(KEY=hela6))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for IBM/AIX RISC System/6000: Version 10.2.0.4.0 - Production
Start Date 05-JUL-2012 11:09:19
Uptime 0 days 4 hr. 5 min. 17 sec
Trace Level off
Security ON: Local OS Authentication
SNMP ON
Listener Parameter File /ora10g/network/admin/listener.ora
Listener Log File /ora10g/network/log/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=test6)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=PNPKEY)))
The listener supports no services
The command completed successfully
6.after a few minutes the instance will auto dynamic register to listener
Services Summary...
Service "c1" has 1 instance(s).
Instance "c1", status READY, has 1 handler(s) for this service...
Service "c1_XPT" has 1 instance(s).
Instance "c1", status READY, has 1 handler(s) for this service...
Service "c3" has 1 instance(s).
Instance "c3", status READY, has 1 handler(s) for this service...
Service "c3_XPT" has 1 instance(s).
Instance "c3", status READY, has 1 handler(s) for this service...
Service "c2" has 1 instance(s).
Instance "c2", status READY, has 1 handler(s) for this service...
Service "c2_XPT" has 1 instance(s).
Instance "c2", status READY, has 1 handler(s) for this service...
The command completed successfully
conclusion:do not modify $oracle_home/bin/oracle file permission when instance is up !
chmod -6755 /ora10g/bin/oracle (example)
you should shutdown database instance first.