Today, when I use sqlplus to connect to Oracle on the server, I cannot connect to it. The database name on the server is cebdsp, and tnsnames. ora is configured
Cebdsp =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.1.101) (PORT = 1521 ))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = cebdsp)
)
)
View the tnsping cebdsp in the command line.
C: \ Users \ zyxuc> tnsping cebdsp
TNS Ping Utility for 32-bit Windows: Version 10.2.0.1.0-Production on 30-1-
18:41:15 2012
Copyright (c) 1997,200 5, Oracle. All rights reserved.
Used parameter files:
D: \ oracle \ product \ 10.2.0 \ db_1 \ network \ admin \ sqlnet. ora
TNS-03505: unable to resolve name
The reason is that there is a space in front of the Coordination cebdsp. After deleting the space, run: tnsping cebdsp to get:
C: \ Users \ zyxuc> tnsping cebdsp
TNS Ping Utility for 32-bit Windows: Version 10.2.0.1.0-Production on 30-1
18:41:35 2012
Copyright (c) 1997,200 5, Oracle. All rights reserved.
Used parameter files:
D: \ oracle \ product \ 10.2.0 \ db_1 \ network \ admin \ sqlnet. ora
Alias resolved using TNSNAMES Adapter
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP) (HOST = 192.168
1.101) (PORT = 1521) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = cebds
)))
OK (30 ms)
Run sqlplus cebdsp/cebdsp @ cebdsp to test whether the database can be connected to the cebdsp database:
C: \ Users \ zyxuc> sqlplus cebdsp/cebdsp @ cebdsp
SP2-1503: Unable to initialize Oracle call interface
SP2-0152: ORACLE does not work
Finally, permission issues were discovered. I used a non-Administrator user and did not have the permission. Just change it to the Administrator user.
From hbuxzy's column