"ORA-12541: TNS: No listener" error

Source: Internet
Author: User
Tags snmp time 0

When PL/SQL developer is used to connect to the database
"ORA-12541: TNS: No listener" error.

1. Check the listener. log.
The following error is found:
Tnslsnr for 32-bit windows: Version 10.2.0.1.0-production on June 20-2008 10:25:26

Copyright (c) 1991,200 5, Oracle. All rights reserved.

The system parameter file is D:/Oracle/product/10.2.0/db_1/Network/admin/listener. ora.
Log information written to D:/Oracle/product/10.2.0/db_1/Network/log/listener. Log
Write trace information for D:/Oracle/product/10.2.0/db_1/Network/Trace/listener. TRC
The trail level is currently 0.

Start with PID = 1704
Listener: (description = (address = (Protocol = IPC) (pipename = //./pipe/extproc1ipc )))
An error occurred while listening to this object: (description = (address = (Protocol = TCP) (host = 0.5.0.5) (Port = 1521 )))
TNS-12545: the connection failed because the target host or object does not exist
TNS-12560: TNS: protocol adapter error.
TNS-00515: the connection failed because the target host or object does not exist
32-bit Windows Error: 49: Unknown error
No listening: (description = (address = (Protocol = IPC) (pipename = //./pipe/extproc1ipc )))

2. Check whether Oracle listener is enabled.
C:/Documents and Settings/mengzhaoliang> LSNRCTL status

LSNRCTL for 32-bit windows: Version 10.2.0.1.0-production on 2008
0: 44

Copyright (c) 1991,200 5, Oracle. All rights reserved.

Connecting to (description = (address = (Protocol = IPC) (Key = extproc1 )))
TNS-12541: TNS: no listeners
TNS-12560: TNS: protocol adapter error.
TNS-00511: no listeners
32-bit Windows Error: 2: no such file or directory
Connecting to (description = (address = (Protocol = TCP) (host = 0.5.0.5) (Port = 1521 )))
TNS-12535: TNS: Operation timeout
TNS-12560: TNS: protocol adapter error.
TNS-00505: Operation timeout
32-bit Windows Error: 60: Unknown error

Previously, listener was not started and cannot be started using the "LSNRCTL start" command.
C:/Documents and Settings/mengzhaoliang> LSNRCTL start

LSNRCTL for 32-bit windows: Version 10.2.0.1.0-production on 2008
2: 16

Copyright (c) 1991,200 5, Oracle. All rights reserved.

Start tnslsnr: Please wait...

Tnslsnr for 32-bit windows: Version 10.2.0.1.0-Production
The system parameter file is D:/Oracle/product/10.2.0/db_1/Network/admin/listener. ora.
Log information written to D:/Oracle/product/10.2.0/db_1/Network/log/listener. Log
Listener: (description = (address = (Protocol = IPC) (pipename = //./pipe/extproc1ipc )))
An error occurred while listening to this object: (description = (address = (Protocol = TCP) (host = 0.5.0.5) (Port = 1521 ))
)
TNS-12545: the connection failed because the target host or object does not exist
TNS-12560: TNS: protocol adapter error.
TNS-00515: the connection failed because the target host or object does not exist
32-bit Windows Error: 49: Unknown error

The listener failed to start. See the error message above...

3. view the content of listener. ora:
# Listener. ora network configuration file: D:/Oracle/product/10.2.0/db_1/Network/admin/listener. ora
# Generated by Oracle configuration tools.

Sid_list_listener =
(Sid_list =
(Sid_desc =
(Sid_name = plsextproc)
(ORACLE_HOME = D:/Oracle/product/10.2.0/db_1)
(Program = EXTPROC)
)
)
Listener =
(Description_list =
(Description =
(Address = (Protocol = IPC) (Key = extproc1 ))
(Address = (Protocol = TCP) (host = 0.5.0.5) (Port = 1521 ))
)
)

After the IP address of the local machine changes, the above problem occurs. Change the IP address of the Database Listener:
(Address = (Protocol = TCP) (host = 0.5.0.5) (Port = 1521 ))
Change
(Address = (Protocol = TCP) (host = 127.0.0.1) (Port = 1521 ))

127.0.0.1: the IP address currently in use by the database.

4. Start Oracle listener again
C:/Documents and Settings/mengzhaoliang> LSNRCTL start

LSNRCTL for 32-bit windows: Version 10.2.0.1.0-production on 2008
4: 40

Copyright (c) 1991,200 5, Oracle. All rights reserved.

Start tnslsnr: Please wait...

Tnslsnr for 32-bit windows: Version 10.2.0.1.0-Production
The system parameter file is D:/Oracle/product/10.2.0/db_1/Network/admin/listener. ora.
Log information written to D:/Oracle/product/10.2.0/db_1/Network/log/listener. Log
Listener: (description = (address = (Protocol = IPC) (pipename = //./pipe/extproc1ipc )))
Listener: (description = (address = (Protocol = TCP) (host = 127.0.0.1) (Port = 1521 )))

Connecting to (description = (address = (Protocol = IPC) (Key = extproc1 )))
Listener status
------------------------
Alias listener
Version tnslsnr for 32-bit windows: Version 10.2.0.1.0-produ
Ction
Start Date:-2008 10:54:41
Normal operation time 0 days 0 hours 0 minutes 1 second
Tracking level off
Security on: Local OS Authentication
SNMP off
Listener parameter file D:/Oracle/product/10.2.0/db_1/Network/admin/listener. o
RA
Listener log file D:/Oracle/product/10.2.0/db_1/Network/log/listener. Log

Listener endpoint overview...
(Description = (address = (Protocol = IPC) (pipename = //./pipe/extproc1ipc )))
(Description = (address = (Protocol = TCP) (host = 127.0.0.1) (Port = 1521 )))
Service summary ..
The Service "plsextproc" contains one routine.
Routine "plsextproc", status unknown, contains one handler of this service...
Command executed successfully

Started successfully,

5. Add tnsnames. ora.
Orcl_127.0.0.1 =
(Description =
(Address = (Protocol = TCP) (host = 127.0.0.1) (Port = 1521 ))
(CONNECT_DATA =
(Server = dedicated)
(SERVICE_NAME = orcl)
)
)

6. Use PL/SQL developer to connect to the database again
The following error occurs:
TNS-12514: TNS: The Listener currently cannot identify the Service requested in the connection Descriptor

Check listener. log again
June 20-2008 11:01:54 * (CONNECT_DATA = (Server = dedicated) (SERVICE_NAME = orcl) (cid =

(Program = D:/PLSQL/plsqldev.exe) (host = RUIFEI-EF0ADC98) (user = mengzhaoliang) * (address =

(Protocol = TCP) (host = 127.0.0.1) (Port = 1267) * establish * orcl * 12514
TNS-12514: TNS: The Listener currently cannot identify the Service requested in the connection Descriptor

View listener:
C:/Documents and Settings/mengzhaoliang> LSNRCTL services

LSNRCTL for 32-bit windows: Version 10.2.0.1.0-production on month 20-2008 11
1: 09

Copyright (c) 1991,200 5, Oracle. All rights reserved.

Connecting to (description = (address = (Protocol = IPC) (Key = extproc1 )))
Service summary ..
The Service "plsextproc" contains one routine.
Routine "plsextproc", status unknown, contains one handler of this service...
Handler:
"Dedicated" created: 0 rejected: 0
Local Server
Command executed successfully

7. The same error occurs with sqlplus:
C:/Documents and Settings/mengzhaoliang> sqlplusscott/mzl@ORCL_127.0.0.1

SQL * Plus: Release 10.2.0.1.0-production on Saturday September 20 11:15:09 2008

Copyright (c) 1982,200 5, Oracle. All rights reserved.

Error:
ORA-12514: TNS: The Listener currently cannot identify the Service requested in the connection Descriptor

8. view the listenser status:
C:/Documents and Settings/mengzhaoliang> LSNRCTL status

LSNRCTL for 32-bit windows: Version 10.2.0.1.0-production on 2008
6:42

Copyright (c) 1991,200 5, Oracle. All rights reserved.

Connecting to (description = (address = (Protocol = IPC) (Key = extproc1 )))
Listener status
------------------------
Alias listener
Version tnslsnr for 32-bit windows: Version 10.2.0.1.0-produ
Ction
Start Date:-2008 11:24:33
Normal operation time 0 days 0 hours 2 minutes 8 seconds
Tracking level off
Security on: Local OS Authentication
SNMP off
Listener parameter file D:/Oracle/product/10.2.0/db_1/Network/admin/listener. o
RA
Listener log file D:/Oracle/product/10.2.0/db_1/Network/log/listener. Log

Listener endpoint overview...
(Description = (address = (Protocol = IPC) (pipename = //./pipe/extproc1ipc )))
(Description = (address = (Protocol = TCP) (host = 127.0.0.1) (Port = 1521 )))
Service summary ..
The Service "plsextproc" contains one routine.
Routine "plsextproc", status unknown, contains one handler of this service...
Command executed successfully

C:/Documents and Settings/mengzhaoliang> tnsping orcl

TNS Ping utility for 32-bit windows: Version 10.2.0.1.0-production on 20-9-
11:27:43 2008

Copyright (c) 1997,200 5, Oracle. All rights reserved.

Used parameter files:
D:/Oracle/product/10.2.0/db_1/Network/admin/sqlnet. ora

TNS-03505: unable to resolve name

9. View sqlnet. ora content:
# Sqlnet. ora network configuration file: D:/Oracle/product/10.2.0/db_1/Network/admin/sqlnet. ora
# Generated by Oracle configuration tools.

# This file is actually generated by netca. But if MERs choose
# Install "software only", this file wont exist and without the native
# Authentication, they will not be able to connect to the database on NT.

Sqlnet. authentication_services = (CNT)

Names. directory_path = (tnsnames, ezconnect)

10. Set the content of listener. ora:
# Listener. ora network configuration file: D:/Oracle/product/10.2.0/db_1/Network/admin/listener. ora
# Generated by Oracle configuration tools.

Sid_list_listener =
(Sid_list =
(Sid_desc =
(Sid_name = plsextproc)
(ORACLE_HOME = D:/Oracle/product/10.2.0/db_1)
(Program = EXTPROC)
)
)

Listener =
(Description_list =
(Description =
(Address = (Protocol = IPC) (Key = extproc1 ))
(Address = (Protocol = TCP) (host = 127.0.0.1) (Port = 1521 ))
)
)

Change to the following content:

# Listener. ora network configuration file: D:/Oracle/product/10.2.0/db_1/Network/admin/listener. ora
# Generated by Oracle configuration tools.

Sid_list_listener =
(Sid_list =
(Sid_desc =
(Sid_name = orcl)
(ORACLE_HOME = D:/Oracle/product/10.2.0/db_1)
# (Program = EXTPROC)
)
)

Listener =
(Description_list =
(Description =
(Address = (Protocol = IPC) (Key = orcl ))
(Address = (Protocol = TCP) (host = 127.0.0.1) (Port = 1521 ))
)
)

11. Close and start listener.
Run the "LSNRCTL stop" and "LSNRCTL stop" commands in cmd and log on again!
C:/Documents and Settings/mengzhaoliang> sqlplus Scott/mzl @ orcl

SQL * Plus: Release 10.2.0.1.0-production on Saturday September 20 11:55:47 2008

Copyright (c) 1982,200 5, Oracle. All rights reserved.

Connect:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0-Production
With the partitioning, OLAP and Data Mining options

SQL>

If you log in again with PL/SQL pevel.pdf, there is no problem.

Finished!

After performing the preceding steps, I have not solved the problem. Then I restarted the oracleoradb10g_home1tnslistener service.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.