Developer Suite连接数据库的问题,劳驾高手指点!
电脑里面同时装了OraHome92和DevSuiteHome2,前者的sql*plus能访问,后者的则不行。输入scott/tiger登陆后者时,我输入了"主机字符串"号以后,报错:
ORA-12154: TNS:无法解析指定的连接标识符******在网上找了很长时间都找不到合适的对策,其中有人建议:
1.打开OC4J listner, 然后在dos命令中输入'lsnrctl start listener',报错如下:
Copyright (c) 1991, 2002, Oracle Corporation. All rights reserved.启动tnslsnr:请稍候...Service OracleOraHome92TNSListener already running.
TNS-12560: TNS: 协议适配器错误
TNS-00530: 协议适配器错误
32-bit Windows Error: 1056: Unknown error
*********************************************************************** 2.国外网站上人家的建议
ORA-12154: TNS:could not resolve the connect identifier specified
Cause: A connection to a database or other service was requested using a connect identifier, and the connect identifier specified could not be resolved into a connect descriptor using one of the naming methods configured. For example, if the type of connect identifier used was a net service name then the net service name could not be found in a naming method repository, or the repository could not be located or reached.Action: - If you are using local naming (TNSNAMES.ORA file):- Make sure that "TNSNAMES" is listed as one of the values of the NAMES.DIRECTORY_PATH parameter in the Oracle Net profile (SQLNET.ORA)
我:肯定!
- Verify that a TNSNAMES.ORA file exists and is in the proper directory and is accessible.
我:肯定!
- Check that the net service name used as the connect identifier exists in the TNSNAMES.ORA file.
我的tnsnames.ora,附在下面。
- Make sure there are no syntax errors anywhere in the TNSNAMES.ORA file. Look for unmatched parentheses or stray characters. Errors in a TNSNAMES.ORA file may make it unusable.
同上,好像都没用什么错误 - If you are using directory naming:- Verify that "LDAP" is listed as one of the values of the NAMES.DIRETORY_PATH parameter in the Oracle Net profile (SQLNET.ORA).- Verify that the LDAP directory server is up and that it is accessible.- Verify that the net service name or database name used as the connect identifier is configured in the directory.- Verify that the default context being used is correct by specifying a fully qualified net service name or a full LDAP DN as the connect identifier- If you are using easy connect naming:- Verify that "EZCONNECT" is listed as one of the values of the NAMES.DIRETORY_PATH parameter in the Oracle Net profile (SQLNET.ORA).- Make sure the host, port and service name specified are correct.- Try enclosing the connect identifier in quote s. See the Oracle Net Services Administrators Guide or the Oracle operating system specific guide for more information on naming.
有些地方看不懂,请各位高手指点
我的tnsnames.ora 如下:
# TNSNAMES.ORA Network Configuration File: C:\oracle\ora92\network\admin\tnsnames.ora
# Generated by Oracle configuration tools.ORA9DB =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 5422D5ABCF9343C)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = ora9db)
)
)INST1_HTTP =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 5422D5ABCF9343C)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = SHARED)
(SERVICE_NAME = MODOSE)
(PRESENTATION = http://HRService)
)
)EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
)
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
)
)
电脑里面同时装了OraHome92和DevSuiteHome2,前者的sql*plus能访问,后者的则不行。输入scott/tiger登陆后者时,我输入了"主机字符串"号以后,报错:
ORA-12154: TNS:无法解析指定的连接标识符******在网上找了很长时间都找不到合适的对策,其中有人建议:
1.打开OC4J listner, 然后在dos命令中输入'lsnrctl start listener',报错如下:
Copyright (c) 1991, 2002, Oracle Corporation. All rights reserved.启动tnslsnr:请稍候...Service OracleOraHome92TNSListener already running.
TNS-12560: TNS: 协议适配器错误
TNS-00530: 协议适配器错误
32-bit Windows Error: 1056: Unknown error
*********************************************************************** 2.国外网站上人家的建议
ORA-12154: TNS:could not resolve the connect identifier specified
Cause: A connection to a database or other service was requested using a connect identifier, and the connect identifier specified could not be resolved into a connect descriptor using one of the naming methods configured. For example, if the type of connect identifier used was a net service name then the net service name could not be found in a naming method repository, or the repository could not be located or reached.Action: - If you are using local naming (TNSNAMES.ORA file):- Make sure that "TNSNAMES" is listed as one of the values of the NAMES.DIRECTORY_PATH parameter in the Oracle Net profile (SQLNET.ORA)
我:肯定!
- Verify that a TNSNAMES.ORA file exists and is in the proper directory and is accessible.
我:肯定!
- Check that the net service name used as the connect identifier exists in the TNSNAMES.ORA file.
我的tnsnames.ora,附在下面。
- Make sure there are no syntax errors anywhere in the TNSNAMES.ORA file. Look for unmatched parentheses or stray characters. Errors in a TNSNAMES.ORA file may make it unusable.
同上,好像都没用什么错误 - If you are using directory naming:- Verify that "LDAP" is listed as one of the values of the NAMES.DIRETORY_PATH parameter in the Oracle Net profile (SQLNET.ORA).- Verify that the LDAP directory server is up and that it is accessible.- Verify that the net service name or database name used as the connect identifier is configured in the directory.- Verify that the default context being used is correct by specifying a fully qualified net service name or a full LDAP DN as the connect identifier- If you are using easy connect naming:- Verify that "EZCONNECT" is listed as one of the values of the NAMES.DIRETORY_PATH parameter in the Oracle Net profile (SQLNET.ORA).- Make sure the host, port and service name specified are correct.- Try enclosing the connect identifier in quote s. See the Oracle Net Services Administrators Guide or the Oracle operating system specific guide for more information on naming.
有些地方看不懂,请各位高手指点
我的tnsnames.ora 如下:
# TNSNAMES.ORA Network Configuration File: C:\oracle\ora92\network\admin\tnsnames.ora
# Generated by Oracle configuration tools.ORA9DB =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 5422D5ABCF9343C)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = ora9db)
)
)INST1_HTTP =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 5422D5ABCF9343C)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = SHARED)
(SERVICE_NAME = MODOSE)
(PRESENTATION = http://HRService)
)
)EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
)
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
)
)
sqlplus user/pwd@sid