试了网上的各种方法都无法解决,求哪位大侠指教!!

zhengzhoucc 2012-05-29 02:08:53
com.microsoft.sqlserver.jdbc.SQLServerException: 用户 'sa' 登录失败。该用户与可信 SQL Server 连接无关联。
at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:197)
at com.microsoft.sqlserver.jdbc.TDSTokenHandler.onEOF(tdsparser.java:246)
at com.microsoft.sqlserver.jdbc.TDSParser.parse(tdsparser.java:83)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.sendLogon(SQLServerConnection.java:2529)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.logon(SQLServerConnection.java:1905)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.access$000(SQLServerConnection.java:41)
at com.microsoft.sqlserver.jdbc.SQLServerConnection$LogonCommand.doExecute(SQLServerConnection.java:1893)
at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:4575)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:1400)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(SQLServerConnection.java:1045)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.login(SQLServerConnection.java:817)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(SQLServerConnection.java:700)
at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(SQLServerDriver.java:842)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at com.qq.server.db.SqlHelper.SqlUpdate(SqlHelper.java:20)
at com.qq.server.model.QqServerUser.SerInsertpersonalinfo(QqServerUser.java:27)
at com.qq.server.model.MyQqServer.<init>(MyQqServer.java:72)
at com.qq.server.view.MyServerFrame.actionPerformed(MyServerFrame.java:48)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$000(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
...全文
86 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
ladybirds2008 2012-05-29
  • 打赏
  • 举报
回复
[Quote=引用 1 楼 的回复:]
打开‘程序’-‘所有程序’-‘Microsoft SQL Server 2005 ’-‘配置工具’-‘SQL Server 配置管理器’,在弹出的窗体中,找到‘SQL Server 2005 网络配置’,把‘MSSQLSERVER的协议’下的“Named Pipes”和“TCP/IP”启动,然后重新启动Microsoft SQL Server 2005就可以了。我之前是这么解决的
[/Quote]一般情况下 是这个问题。。
  • 打赏
  • 举报
回复
先看后台能不能通过sa登录
看下jar包对不对
jar包有2005和2008的
zhengzhoucc 2012-05-29
  • 打赏
  • 举报
回复
不行,这个我早就已经配置好的。还是无法连接[Quote=引用 1 楼 的回复:]

打开‘程序’-‘所有程序’-‘Microsoft SQL Server 2005 ’-‘配置工具’-‘SQL Server 配置管理器’,在弹出的窗体中,找到‘SQL Server 2005 网络配置’,把‘MSSQLSERVER的协议’下的“Named Pipes”和“TCP/IP”启动,然后重新启动Microsoft SQL Server 2005就可以了。我之前是这么解决的
[/Quote]
ck89757 2012-05-29
  • 打赏
  • 举报
回复
打开‘程序’-‘所有程序’-‘Microsoft SQL Server 2005 ’-‘配置工具’-‘SQL Server 配置管理器’,在弹出的窗体中,找到‘SQL Server 2005 网络配置’,把‘MSSQLSERVER的协议’下的“Named Pipes”和“TCP/IP”启动,然后重新启动Microsoft SQL Server 2005就可以了。我之前是这么解决的

58,454

社区成员

发帖
与我相关
我的任务
社区描述
Java Eclipse
社区管理员
  • Eclipse
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧