ORA-12154: TNS:could not resolve the connect identifier specified,请问这是什么错误,我不知道......
listener.ora#listener.oraNetworkConfigurationFile:D:\oracle\product\10.2.0\db_1/NETWO...
listener.ora
# listener.ora Network Configuration File: D:\oracle\product\10.2.0\db_1/NETWORK/ADMIN/\listener.ora# Generated by Oracle configuration tools.
SID_LIST_LISTENER = (SID_LIST = (SID_DESC = (SID_NAME = PLSExtProc) (ORACLE_HOME = d:\oracle\product\10.2.0\db_1) (PROGRAM = extproc) ) )
LISTENER = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = YY-PC)(PORT = 1521)) )
tnsnames.ora
# tnsnames.ora Network Configuration File: D:\oracle\product\10.2.0\db_1/NETWORK/ADMIN/\tnsnames.ora# Generated by Oracle configuration tools.
ORCL = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521)) ) (CONNECT_DATA = (SID = ORCL) (SERVICE_NAME = orcl)
) )
EXTPROC_CONNECTION_DATA = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1)) ) (CONNECT_DATA = (SID = PLSExtProc) (PRESENTATION = RO) ) )
web.config
<connectionStrings>
<add name="DB_ConnectionString" connectionString="Data Source=.\orcl;User ID=yxoa;Password=yxoa;" providerName="System.Data.OracleClient" />
</connectionStrings>
数据库可以登陆 展开
# listener.ora Network Configuration File: D:\oracle\product\10.2.0\db_1/NETWORK/ADMIN/\listener.ora# Generated by Oracle configuration tools.
SID_LIST_LISTENER = (SID_LIST = (SID_DESC = (SID_NAME = PLSExtProc) (ORACLE_HOME = d:\oracle\product\10.2.0\db_1) (PROGRAM = extproc) ) )
LISTENER = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = YY-PC)(PORT = 1521)) )
tnsnames.ora
# tnsnames.ora Network Configuration File: D:\oracle\product\10.2.0\db_1/NETWORK/ADMIN/\tnsnames.ora# Generated by Oracle configuration tools.
ORCL = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521)) ) (CONNECT_DATA = (SID = ORCL) (SERVICE_NAME = orcl)
) )
EXTPROC_CONNECTION_DATA = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1)) ) (CONNECT_DATA = (SID = PLSExtProc) (PRESENTATION = RO) ) )
web.config
<connectionStrings>
<add name="DB_ConnectionString" connectionString="Data Source=.\orcl;User ID=yxoa;Password=yxoa;" providerName="System.Data.OracleClient" />
</connectionStrings>
数据库可以登陆 展开
1个回答
2014-06-05
展开全部
你说的数据哭可以登录是指什么?在你的程序中可以登录还是在sqlplus中可以登录,这分别可能对应不同的问题。请先检查你的配置文件中的有关数据库连接参数是否正确。然后确认应用程序是否可以正常连接数据库,一点一点排查,祝你好运
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询