ORA-12154錯誤分析

xinxinhg發表於2004-12-10
suresh的意見! [@more@]

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---&gt Data Source Name u r Connecting from the front end
CHECK2---&gt Server name to which u r connecting
CHECK3---&gt 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/,如需轉載,請註明出處,否則將追究法律責任。