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;