Using PLSql to connect to Oracle Reports error ORA-12541: TNS: No listener, plsqlora-12541
Many times oracle services are disabled to optimize our startup items. However, when we use PLSQL to log on to oracle after restart, no listening program will appear, which indicates that some of our services are not started. First, let's check whether the oracle service is started. The method is computer> Management> service and application> service to find the oracle startup service,
The details are as follows:
Here we can see that oracle's startup services, such as OracleServiceORCL, OracleOraDb11g_home1TNSLister, and OracleDBCConsoleorcl, are not started. Here we can start the services in the red rectangle box.
After the oracle11 installation is successful, with PLSQL login prompt ORA-12541: TNS: no listening program, login failure. I have summarized some solutions to this problem, hoping to help you.
Method 1: due to incorrect address allocation, We need to reconfigure the local environment.
Find the network from the oracle installation environment ,:
My oracle has been installed on the D drive, so you can find it based on your own installation path, for example: D: \ app \ Administrator \ product \ 11.2.0 \ dbhome_2 \ NETWORK
LISTENER_ORCL =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP) (HOST = localhost) (PORT = 1521 ))
)
(CONNECT_DATA =
(SERVICE_NAME = ORCL)
)
)
Export lr_connection_data =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC) (KEY = EXTPROC1521 ))
)
(CONNECT_DATA =
(SID = CLRExtProc)
(PRESENTATION = RO)
)
)
ORCL =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP) (HOST = localhost) (PORT = 1521 ))
)
(CONNECT_DATA =
(SERVICE_NAME = ORCL)
)
)
Modified code {
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP) (HOST = localhost) (PORT = 1521 ))
)
(CONNECT_DATA =
(SERVICE_NAME = ORCL)
)
)
Change the localhost to the IP address randomly generated by the computer.
If localhost or 127.0.0.1 is entered, no listening program is displayed. Because the automatically assigned IP address changes, change the host in the oracle value to the computer name of the Local Machine and save the modified tnsnames. ora. Connect to the database again (10.1.10.183/orcl) and solve the error.
The second method is to view the oracle system.
The specific process is as follows:
Step 1: view the oracle 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,2005, Oracle. All rights reserved.
The system parameter file is D: \ oracle \ product \ 10.2.0 \ db_1 \ network \ admin \ listener. ora.
Write the log information of 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 anymore :( DESCRIPTION = (ADDRESS = (PROTOCOL = ipc) (PIPENAME = \. \ pipe \ EXTPROC1ipc )))
Step 2: Check whether the oracle listener is started
In the dos window, enter the shortcut key + R, Enter cmd, and enter lsnrctlstatus in the dos window to view your running status. If the result is as follows:
LSNRCTL for 32-bitWindows: Version 10.2.0.1.0-Production on 2008
0: 44
Copyright (c) 1991,2005, 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
This means that your listener is not started. You need to start the listener. There are two ways to start the listener: Enter lsnrctl start in dos. Another method is to find the oracle self-starting service on the computer, and then find OracleOraDb11g_home1TNSListener. Click Start.
Third: reset the listener and configure the local network name.
My computer is Windows 7, so find the oracle installation directory from the Start Menu, find the Net Configuration Assistant, and configure it. The main configuration is implemented through the management tools provided by oracle, such:
The images here are searched on the Internet, but I used all the methods, because there were a lot of problems at that time, and I changed several methods. More knowledge can be found on my public platform: MuDi_Assistant, account: MuDi_Assistant. I recently started to prepare for the project. I plan to share the solutions to various problems and bugs in my cases. Scan the QR code:
Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.