Log on to PL/SQL Developer, log on to the local database, and check that the Oracle listening service is not started. Right-click to start the listening program and report an error. How can this problem be solved ?,

Source: Internet
Author: User

Log on to PL/SQL Developer, log on to the local database, and check that the Oracle listening service is not started. Right-click to start the listening program and report an error. How can this problem be solved ?,

I. Error description

When you log on to PL/SQL Developer to log on to the local database, no listening program is reported. Check that the Oracle listening service is not started. Right-click to start the listener and report the following error:

Error Description: The OracleOraDb11g_home1TNSListener service on the local computer is stopped after it is started. Some services are automatically stopped if they have nothing to do, such as the "performance log and alarm" service.

Ii. Cause Analysis

When you install oracle, you are connected to the network. The HOST in the listener. ora file is the IP address assigned to you by the network, and this occurs when you disconnect the network.

Iii. Solution

Method 1: Listener

Modify the listener Configuration through listener. ora or Net Manager. Change the original local string 127.0.0.1 or localhost to the host name.

First, check "tnsnames" in the ** \ product \ 11.2.0 \ dbhome_1 \ NETWORK \ ADMIN directory. ora and listener. ora ", and then check the" HOST "information to see if it is your current IP address. If it is not an attempt to change the two files to your IP address, or directly change to 127.0.0.1 (or computer name ):

Note: The listener Configuration File "listener. the HOST = content (IP or HOST name) in ora must be the same as that in the service configuration file "tnsnames. in ora, the HOST = content of the service you want to connect is exactly the same. This means that either an IP address or a host name is used. If there are multiple services (network services configured in Net Manager), View "tnsnames. the PL/SQL statement in the ora file that is consistent with the listening HOST content can be logged in normally. Otherwise, no listening program is available.

Here is the HOST in "listener. ora". My HOST name is used.

The above is the configuration information of "tnsnames. ora", because I installed two databases DB1 and DB2 on the machine. The connection services are also called DB1 and DB2 respectively. (I don't know what the situation is. After the configuration is completed, one HOST in tnsnames. ora is the IP address, and the other is my HOST name .) As a result, PL/SQL of DB1 is connected normally (because the IP address exactly matches the HOST address of listener. ora), while PL/SQL of DB2 prompts no listening program. (Under what circumstances, not all of DB1's access is normal. Why haven't we listened. I am going ~~) Later, I went online to the tutorial and said "Modify the HOST address of" listener. ora ". If it is an IP address, change it to the HOST Name. Run PL/SQL. DB2 is successfully logged on. As a result, DB1 does not have a listener (what is the situation ). Later, I checked "listener. ora" and found this problem. It indicates that the HOST content of the two files needs to be completely matched. Change all to the HOST name. Both databases are successfully logged on!

Method 2: Environment Variables

In the environment variable, change ORACLE_HOME to * (your own installation path) \ product \ 11.2.0 \ dbhome_1.

In some cases, it seems that the installation client is automatically changed to **: \ Ora11InstantClient

Method 3: Registry

KEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/services/OracleOraDb11g_home1TNSListener

In, change ImagePath to: D: \ oracle \ product \ 10.2.0 \ db_1/BIN/TNSLSNR. EXE (not followed by. EXE ).

Related Article

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.