直接上代码:
<%!而此时,会报错,提示如下
java.sql.SQLException: Listener refused the connection with the following error:小弟已经进入到D:\oracle\product\10.2.0\db_1\NETWORK\ADMIN\tnsnames.ora目录下,确认了我的文件内容为
# tnsnames.ora Network Configuration File: D:\oracle\product\10.2.0\db_1\network\admin\tnsnames.ora
# Generated by Oracle configuration tools.
YANGYIHO =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = LBDZ-03081718)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = yangyihong)
)
)
EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
)
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
)
)
按照上面内容,localhost:1521:yangyihong这个写法应该没错啊。另外,各种服务也都已经启动了,通过sqlplusw可以正常启动数据库。求大神解救。
Oracle中的<spanstyle="font-family:'WenQuanYiMicroHeiMono','WenQuanYiMicroHei','MicrosoftYaheiMono','MicrosoftYahei',sans-serif;font-size:14px;line-height:22px;background-color:#FFFFFF;">tnsnames.ora文件内<spanstyle="font-family:'WenQuanYiMicroHeiMono','WenQuanYiMicroHei','MicrosoftYaheiMono','MicrosoftYahei',sans-serif;font-size:14px;line-height:22px;background-color:#FFFFFF;">YANGYIHO和你的java的连接的URL中的<spanstyle="font-family:'WenQuanYiMicroHeiMono','WenQuanYiMicroHei','MicrosoftYaheiMono','MicrosoftYahei',sans-serif;font-size:14px;line-height:22px;background-color:#FFFFFF;">yangyihong对不上。谢了!果真是这原因!
<spanstyle="font-family:微软雅黑,Verdana,sans-serif,宋体;font-size:14px;line-height:22px;background-color:#FFFFFF;">jdbc:oracle:thin: <atarget="_blank"rel="nofollow">@<spanstyle="font-family:微软雅黑,Verdana,sans-serif,宋体;font-size:14px;line-height:22px;background-color:#FFFFFF;">YANGYIHO
<spanstyle="font-size:14px;line-height:22px;">或者<atarget="_blank"rel="nofollow">
<spanstyle="font-family:微软雅黑,Verdana,sans-serif,宋体;font-size:14px;line-height:22px;background-color:#FFFFFF;">jdbc:oracle:thin: <atarget="_blank"rel="nofollow">@<spanstyle="font-family:微软雅黑,Verdana,sans-serif,宋体;font-size:14px;line-height:22px;background-color:#FFFFFF;">LBDZ-03081718<spanstyle="font-family:微软雅黑,Verdana,sans-serif,宋体;font-size:14px;line-height:22px;background-color:#FFFFFF;">:1521:<spanstyle="font-family:微软雅黑,Verdana,sans-serif,宋体;font-size:14px;line-height:22px;background-color:#FFFFFF;">yangyihong
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。