简体   繁体   English

连接到sql server 2008企业版时出错

[英]getting an error while connecting to sql server 2008 enterprise edition

i am trying to connect with sql server 2008 using java connection string but i am getting following error 我正在尝试使用java连接字符串与sql server 2008连接,但出现以下错误

jdbc:sqlserver://127.0.0.1:1434;DatabaseNameconnect?autoReconnect=true com.microsoft.sqlserver.jdbc.SQLServerException: The server version is not supported. jdbc:sqlserver://127.0.0.1:1434; DatabaseNameconnect?autoReconnect = true com.microsoft.sqlserver.jdbc.SQLServerException:不支持服务器版本。 The target server must be SQL Server 2000 or later. 目标服务器必须是SQL Server 2000或更高版本。 com.microsoft.sqlserver.jdbc.SQLServerException: The server version is not supported. com.microsoft.sqlserver.jdbc.SQLServerException:不支持服务器版本。 The target server must be SQL Server 2000 or later. 目标服务器必须是SQL Server 2000或更高版本。 at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(Unknown Source) at com.microsoft.sqlserver.jdbc.DBComms.Prelogin(Unknown Source) at com.microsoft.sqlserver.jdbc.DBComms.(Unknown Source) at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(Unknown Source) at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(Unknown Source) at java.sql.DriverManager.getConnection(DriverManager.java:582) at java.sql.DriverManager.getConnection(DriverManager.java:185) at com.dnb.discovery.connection.ConnectionBean.makeMsSqlConnection(ConnectionBean.java:56) at com.dnb.discovery.factory.MssqlDAOFactory.(MssqlDAOFactory.java:18) at com.dnb.discovery.dao.mssqldao.MssqlCompanyDAO.(MssqlCompanyDAO.java:8) at com.dnb.discovery.relevance.Relevance.(Relevance.java:26) at com.dnb.discovery.dao.SolrDAO.readDataFromSolr(SolrDAO.java:189) at com.dnb.discovery.searchservice.SearchService.buyerTextSearchAnonymous(SearchService.java:124) at sun.reflect.NativeMethodAccessorImpl.invoke0(Nat 在com.microsoft.sqlserver.jdbc.DBComms.Prelogin(未知源)在com.microsoft.sqlserver.jdbc.DBComms.Prelogin(未知源)在com.microsoft.sqlserver.jdbc.DBComms.com(com。 microsoft.sqlserver.jdbc.SQLServerConnection.connect(未知源)位于com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(未知源)位于java.sql.DriverManager.getConnection(DriverManager.java:582) com.dnb.discovery.connection.ConnectionBean.makeMsSqlConnection(.com.dnb.discovery.factory.MssqlDAOFactory。(MssqlDAOFactory.java:18)处的.getConnection(DriverManager.java:185) .discovery.dao.mssqldao.MssqlCompanyDAO。(MssqlCompanyDAO.java:8)位于com.dnb.discovery.relevance.Relevance。(Relevance.java:26)位于com.dnb.discovery.dao。 :189),位于com.dnb.discovery.searchservice.SearchService.buyerTextSearchAnonymous(SearchService.java:124),位于sun.reflect.NativeMethodAccessorImpl.invoke0(Nat ive Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.sun.xml.internal.ws.api.server.InstanceResolver$1.invoke(InstanceResolver.java:210) at com.sun.xml.internal.ws.server.InvokerTube$2.invoke(InvokerTube.java:132) at com.sun.xml.internal.ws.server.sei.EndpointMethodHandler.invoke(EndpointMethodHandler.java:241) at com.sun.xml.internal.ws.server.sei.SEIInvokerTube.processRequest(SEIInvokerTube.java:74) at com.sun.xml.internal.ws.api.pipe.Fiber.__doRun(Fiber.java:581) at com.sun.xml.internal.ws.api.pipe.Fiber._doRun(Fiber.java:540) at com.sun.xml.internal.ws.api.pipe.Fiber.doRun(Fiber.java:525) at com.sun.xml.internal.ws.api.pipe.Fiber.runSync(Fiber.java:422) at com.sun.xml.internal.ws.server.WSEndpointImpl$2.process(WSEndpointImpl.java:226) at com.sun.xml.internal.ws.transport.http.HttpAdapter$HttpTool ive方法),位于sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39),位于java.lang.reflect.Method.invoke(Method.java:597)处,sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)在com.sun.xml.internal.ws.api.server.InstanceResolver $ 1.invoke(InstanceResolver.java:210)在com.sun.xml.internal.ws.server.InvokerTube $ 2.invoke(InvokerTube.java:132)在com.sun.xml.internal.ws.server.sei.EndpointMethodHandler.invoke(EndpointMethodHandler.java:241)处com.sun.xml.internal.ws.server.sei.SEIInvokerTube.processRequest(SEIInvokerTube.java:74)在com.sun.xml.internal.ws.api.pipe.Fiber .__ doRun(Fiber.java:581)处com.sun.xml.internal.ws.api.pipe.Fiber._doRun(Fiber.java:540)在com.sun.xml.internal.ws.api.pipe.Fiber.doRun(Fiber.java:525)在com.sun.xml.internal.ws.api.pipe.Fiber.runSync(Fiber.java:422)在com.sun.xml.internal.ws.server.WSEndpointImpl $ 2.process(WSEndpointImpl.java:226)处com.sun.xml.internal.ws.transport.http.HttpAdapter $ HttpTool kit.handle(HttpAdapter.java:375) at com.sun.xml.internal.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:175) at com.sun.xml.internal.ws.transport.http.server.WSHttpHandler.handleExchange(WSHttpHandler.java:100) at com.sun.xml.internal.ws.transport.http.server.WSHttpHandler.handle(WSHttpHandler.java:77) at com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:65) at sun.net.httpserver.AuthFilter.doFilter(AuthFilter.java:65) at com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:68) at sun.net.httpserver.ServerImpl$Exchange$LinkHandler.handle(ServerImpl.java:555) at com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:65) at sun.net.httpserver.ServerImpl$Exchange.run(ServerImpl.java:527) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:619) kit.handle(HttpAdapter.java:375)位于com.sun.xml.internal.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:175)位于com.sun.xml.internal.ws.transport.http。 com.sun.xml.internal.ws.transport.http.server.WSHttpHandler.handle(WSHttpHandler.java:77)上的server.WSHttpHandler.handleExchange(WSHttpHandler.java:100)在com.sun.net.httpserver.Filter $在sun.net.httpserver.AuthFilter.doFilter(AuthFilter.java:65)在com.sun.net.httpserver.Filter $ Chain.doFilter(Filter.java:68)在Chain.doFilter(Filter.java:65) .net.httpserver.ServerImpl $ Exchange $ LinkHandler.handle(ServerImpl.java:555)位于com.sun.net.httpserver.Filter $ Chain.doFilter(Filter.java:65)位于sun.net.httpserver.ServerImpl $ Exchange Java的.run(ServerImpl.java:527)在java.util.concurrent.ThreadPoolExecutor $ Worker.runTask(ThreadPoolExecutor.java:886)在java.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor.java:908)在java。 lang.Thread.run(Thread.java:619)

i am using following jar for connection 我正在使用以下罐子进行连接

sqljdbc-2005-1.0.jar sqljdbc-2005-1.0.jar

please help 请帮忙

You're using a SQL Server 2005 JDBC driver, but talking to SQL Server 2008. While I would have expected that to work, I suspect the best approach would probably be to update your JDBC driver: 您正在使用SQL Server 2005 JDBC驱动程序,但正在与SQL Server 2008通讯。虽然我希望它能起作用,但我怀疑最好的方法可能是更新JDBC驱动程序:

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM