Home > Database > Mysql Tutorial > body text

java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for

WBOY
Release: 2016-06-07 15:19:06
Original
1097 people have browsed it

protected static String dbClassName = "com.microsoft.jdbc.sqlserver.SQLServerDriver";protected static String dbUrl = "jdbc:microsoft:sqlserver://localhost:1433;"+ "DatabaseName=db_JXC;SelectMethod=Cursor";protected static String dbUser = "

1)首先怀疑是不是sql的sp4补丁没有打,装上补丁之后再用命令telnet 127.0.0.1 1433,发现端口还是没有打开.

发现补丁文件运行之后在查询分析器里面运行

select @@version

Microsoft SQL Server  2000 - 8.00.194 (Intel X86)   Aug  6 2000 00:57:48   Copyright (c) 1988-2000 Microsoft Corporation  Personal Edition on Windows NT 5.1 (Build 2600: Service Pack 3)

2)发现补丁没有打上,需要到补丁解压缩文件下运行setup.bat,才算真正打上补丁了(这个比较烦琐而笨重的补丁)

安装补丁的时候又报了个错

以前进行的程序安装创建了挂起的文件操作。运行程序之前,必须重新起动计算机。”

这个文件倒好解决,去注册表:HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Control/Session Manager中,删除PendingFileRenameOperations,然后重新安装即可。

3)安装完毕运行

select @@version

 Microsoft SQL Server  2000 - 8.00.2039 (Intel X86)   May  3 2005 23:18:38   Copyright (c) 1988-2003 Microsoft Corporation  Personal Edition on Windows NT 5.1 (Build 2600: Service Pack 3)

 安装好象成功了.再试下telnet 127.0.0.1 1433,居然还是不通

4)于是试下netstat -an,看1433端口是否被其他服务使用.

根本没有这个端口启用,于是去查看sqlserver 2000默认的是什么端口

企业管理器->右击数据库服务器->选择属性->在常规选项卡点击网络配置->在启用的协议区域我们选择 TCP/IP ,点击属性按钮->网络协议默认值设置,我在这里看到我的默认端口是:1705

结果出来了,我的sqlserver 2000端口居然不是1443应该是1705

5)再用1705在程序里面试了下,OK了没有问题 

 

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!