给你点错误信息:12545, 00000, "Connect failed because target host or object does not exist"
// *Cause: The address specified is not valid, or the program being
// connected to does not exist.
// *Action: Ensure the ADDRESS parameters have been entered correctly; the
// most likely incorrect parameter is the node name. Ensure that the
// executable for the server exists (perhaps "oracle" is missing.)
// If the protocol is TCP/IP, edit the TNSNAMES.ORA file to change the
// host name to a numeric IP address and try again.
// *Cause: The address specified is not valid, or the program being
// connected to does not exist.
// *Action: Ensure the ADDRESS parameters have been entered correctly; the
// most likely incorrect parameter is the node name. Ensure that the
// executable for the server exists (perhaps "oracle" is missing.)
// If the protocol is TCP/IP, edit the TNSNAMES.ORA file to change the
// host name to a numeric IP address and try again.
02 15:19:42(c) Copyright 1997 Oracle Corporation. All rights reserved.Attempting to contact (ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.240)(PORT=1521))
OK (40 msec)
正确格式示例:# TNSNAMES.ORA Network Configuration File: C:\Oracle\Ora81\network\admin\tnsnames.ora
# Generated by Oracle configuration tools.SUN =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.240)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = ora)
)
)EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
)
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
)
)ORA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = chenbf)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = ora)
)
)
# TNSNAMES.ORA Network Configuration File: D:\Oracle\Ora81\network\admin\tnsnames.ora
# Generated by Oracle configuration tools.S1240.huawei.com =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.103.210)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = test)
)
)
init.ora中有没有remote_os_authent=false
有的话,cut掉最后一个办法,察看log文件,希望能够找到失败的原因
还不行就把trace打开,再连接,然后用traceassistant分析trace文件,也许可以找到原因。