http://www.easywebtech.com/oracle/con_err.html
ORA-12154: TNS:could not resolve service name
First open the tnsnames.ora file and check the settings
eg-
CHECK1 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST =CHECK2)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = CHECK3)
)
)
IN THE ABOVE GIVEN SCRIPT
CHECK1---> Data Source Name u r Connecting from the front end
CHECK2---> Server name to which u r connecting
CHECK3---> Service name/SID of the Data base u r connecting
* - c:> ping CHECK2 (Host ip or name)
if you cannot ping that means the client server network problem. Else
* - c:> telnet CHECK2:1521
if you cannot connect to port ,network problem . Else
* - c:> TNSPING CHECK1
if still the same error
check SQLNET.ORA
Commect other settings and keep only following line and TNSPING.
SQLNET.AUTHENTICATION_SERVICES= (NTS)
If not NTS change to NONE and TNSPING.
If Still not working check whether a Spyware running on your PC.
Run spyware detection tool.
- Do you have multiple Oracle installations on your machines like Oracle client and Developer ?
If so you'll have to set up the tnsnames.ora on both HOMES.
Or else setup the registry.
Add string value TNS_ADMIN to HKEY_LOCAL_MACHINESOFTWAREORACLE
Set the values of TNS_ADMIN to the folder where the tnsnames.ora you set up resides.
Eg. C:oracleora92admin
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/166555/viewspace-783893/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/166555/viewspace-783893/