Configure tnsnames. ora in the local Naming Service of Oracle

Source: Internet
Author: User

Sqlplus local connection is not a server

The error is as follows:

SQL> conn hailiang/hailiang @ DBNetSpider
ERROR:
ORA-12154: TNS: cocould not resolve the connect identifier specified

Solution: I forgot to configure the tnsnames. ora file locally...

In Oracle in the Windows environment, the D: \ oraclexe \ app \ oracle \ product \ 10.2.0 \ server \ NETWORK \ ADMIN file is very important, and its role is to configure local names.


You can use a simple name to access the required database or server information. The information is saved
In tnsnames. ora.
After tnsnames. ora is configured, end users enter the connection string including the NET service

CONNECT username/password @ net_service_name

You can create or modify it in Oracle's NET Manager, or directly change Oracle \ Network \ ADMIN \ tnsnames. ora

LocalName =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.0.2) (PORT = 1521 ))
)
(CONNECT_DATA =
(SERVICE_NAME = Icare_service)
)
)
The above is a configuration named locally in tnsnames. ora.

LocalName: Your local name
ADDRESS: server ADDRESS
PROTOCOL: the PROTOCOL used. Here it is TCP
PORT: the listening PORT number of the server.
SERVICE_NAME: Server Service name

Note: The Password is not included. Therefore, when connecting to. net, the User Id = xianyun; Password = 1234; Data Source = LocalName; is used;

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.