Solutions to ora-12154 problems with virtual machine Oracle connections

Source: Internet
Author: User

Speaking of ora-12154 problems, there are a lot of solutions online, the reasons are basically unified: TNS or Listener Configuration is incorrect. Generally, incorrect Listener Configuration rarely occurs. Most people follow the default configuration to "Next", which is basically the service name of orcl. If you can connect to orcl locally, other machines cannot connect to listener. Most of them are incorrect TNS configurations. I encountered a phenomenon: A 2003 virtual machine was created on the machine, and Oracle10g was installed on the virtual machine. The default configuration is as follows. Only the Oracle10g client is installed on this machine. When I used to connect to the orcl service of the local database in the LAN (the database is the same as the database in the LAN), there is no problem, but the orcl service in the connection virtual machine does not connect, always reports ora-12154 error. In the virtual machine, PLSQL can connect to the Virtual Machine Oracle, but cannot connect to the Oracle in the local area network.

Generally, you can solve the problem as follows:

  1. Run CMD in the VM and use LSNRCTL status to view the listener services.
  2. If you see the listening service "orcl", you must write orcl In the TNS configuration of the Local Machine (SERVICE_NAME = orcl). If you want to customize it, add the Custom Service name in the Listener Configuration of the Virtual Machine. Remember to restart the listening service: lsnrctl reload.
  3. The final configuration file is as follows:

Virtual Machine listener:

Sid_list_listener =
(Sid_list =
(Sid_desc =
(Global_dbname = test) Custom Service name
(ORACLE_HOME = E: \ oracle \ product \ 10.2.0 \ db_1) db_home
(Sid_name = test)

)
(Sid_desc =
(Program = EXTPROC)
(Sid_name = plsextproc)
(ORACLE_HOME = E: \ oracle \ product \ 10.2.0 \ db_1) # This Service ensures that you can use external processes, such as C Programs.
)
)

Local TNS:

Orcl_xnj =
(Description =
(Address_list =
(Address = (Protocol = TCP) (host = 182.12.15.232) (Port = 1521 ))
)
(CONNECT_DATA =
(SERVICE_NAME = test) corresponds to the Custom Service name
)
)

Connect again to solve the problem!

Remember, you must start from the simplest reason. Don't see any changes to the number of processes and registries on the Internet as soon as you go up. Think about why the local machine can connect to the network, locate the problem.

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.