Bagikan melalui


Welcome to the SQL Server JDBC blog

Unsure of what to specify in the connection URL? Having trouble configuring the driver for Integrated Authentication? Confused about some behavior with the Microsoft SQL Server JDBC driver? Then, this is the blog site for you.

The SQL Server JDBC team maintains this blog.  The team is responsible for all things regarding JDBC with SQL Server.  We hope to use this blog to proactively provide answers to many of the re-occuring issues that we see our customers face.  We will also use this blog to provide some insight into features in planning for future releases.

Hopefully you will find this useful.

SQL Server JDBC team
Disclaimer: This posting is provided "AS IS" with no warranties, and confers no rights

Comments

  • Anonymous
    April 24, 2007
    Glad to see this. I would like to use JPA (Java Persistence API from Hibernate) with SQL Server Express edition. Wondering if you guys can provide any information with regard to this. Thanks.

  • Anonymous
    May 09, 2007
    We are a hibernate ceritified driver. YOu should use SQLServerDialect in the configuration see: http://www.hibernate.org/hib_docs/v3/reference/en/html/session-configuration.html Let me know if there is anything specific you want to know. Thanks Mugunthan

  • Anonymous
    June 25, 2007
    I have a password protected database. How can I connect to it via JDBC? In what connection parameter I must send database password?

  • Anonymous
    June 25, 2007
    Hi, Before we can answer your question, we need to know which SQL Server Edition you are using. Could you please clarify? Thanks! Yesim [MSFT]

  • Anonymous
    September 12, 2007
    The comment has been removed

  • Anonymous
    September 24, 2007
    Hello. I'm developing my application in Sun Java Studio Creator and Sun AppServer 8.2. I have this application that uploads pdf files to the database. With SQLServer 2000 it works, but now I'm using the same application to upload files to SQLServer 2005 and it doesn't work. Is there any property or something else that I must set in the database in order to do this? Thanks in advance. Eric.

  • Anonymous
    September 24, 2007
    Sorry, I forgot to mention in my previous post that I'm using the latest JDBC driver (sqljdbc.jar v1.2.2727).

  • Anonymous
    October 04, 2007
    Hello Steve, The issue I believe you are hitting is your Context is not complete.  I've seen this done one of two ways:

  1.  Grab the environment first, and then grab the datasource // Grab the Environment first object = ctx.lookup("java:comp/env"); // Now grab the DataSource DataSource ds = (DataSource)ctx.lookup("jdbc/orpsMirror");
  2. Grab the DataSource from the get go // Grab the DataSource with the full path from the Environment DataSource ds = (DataSource)ctx.lookup("java:comp/env/jdbc/orpsMirror"); I believe yours was failing because it was just looking for an element called "jdbc" which didn't exist. Hope that helps! Thanks, Adam [MSFT]
  • Anonymous
    October 04, 2007
    Correction to the first code segment I posted.  It should be: // Grab the Environment first Context envCtx = (Context)ctx.lookup("java:comp/env"); // Now grab the DataSource DataSource ds = (DataSource)envCtx.lookup("jdbc/orpsMirror");

  • Anonymous
    October 26, 2007
    Hi,   We are evaluating JDBC v1.2 and found out there is different with getBytes Method (SQLServerResultSet) call getBytes Method (SQLServerResultSet) this is output when I tried two drivers: using JDBC v1.1 Timestamp from DB is: 2007-10-26 12:45:45.9 byte array is: 0 is -45 1 is -103 2 is 0 3 is 0 4 is -38 5 is 82 6 is -46 7 is 0 using JDBC v1.2 Timestamp from DB is: 2007-10-26 12:44:42.04 0 is 0 1 is 0 2 is -103 3 is -45 4 is 0 5 is -46 6 is 8 7 is 4 you can see first 4 elements values have been changed (with different order).  can someone provide more information about this? Thanks. --Tony

  • Anonymous
    February 07, 2008
    Hola actualice el sqljdbc 1.1 por la vesion 1.2 y al ejecutar cualquier consulta me da este error com.microsoft.sqlserver.jdbc.SQLServerException: La instrucción no devolvió un conjunto de resultados. Si me pudieran ayudar con esto... Gracias

  • Anonymous
    February 07, 2008
    Can you provide a sample that is failing? Thx ¿Puede usted proporcionar una muestra que falla?

  • Anonymous
    February 14, 2008
    I'm using Tomcat 5.5, J2SDK 1.4 and I want to access my db at MS SQL Server 2000. I'm getting error as "Following error/exception occured - java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Unsupported method: ResultSet.isAfterLast at" Also Following error/exception occured - java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Unsupported method: ResultSet.setFetchDirection at Any help???

  • Anonymous
    February 27, 2008
    Can you try the SQL 2005 JDBC Driver, this supports SQL 2000 server as well.

  • Anonymous
    April 09, 2008
    Hi Everyone, Does anyone know if it is possible through JDBC connection to have the loginto  SQL server automatically authenticate through AD(Active Directory - windows login, instead of entering a user name and password.) similar to single sign on. If possbile, how? Can anyone direct me to any documentations, etc? Thanks

  • Anonymous
    April 15, 2008
    I have the same question as Diana above.  Does anybody have a response for this?   Diana,  were you able to get an answer outside this blog?

  • Anonymous
    April 20, 2008
    i am having an issue while using JDBC driver to connect to MSSQL2000 server http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=3199367&SiteID=1

  • Anonymous
    May 01, 2008
    I'm trying to connect with integrated security using the 2005 JDBC driver. Here is the error message:  Error creating JDBC Connection to RLID. (Error: This driver is not configured for integrated authentication.)  I've installed sqljdbc_auth.dll in my Eclipse folder, and in the windows/system32 folder.  I don't have any problems connecting with Windows Authentication using SQL Management Studio.  Intermittently, the connection will succeed even after throwing the error message.

  • Anonymous
    July 01, 2008
    I am trying to  connect Sun Application Server 8 to MS SQL 2005.  I can currently connect to SQL 2000 just fine and I am wondering if there are any differences that need to be taken into account -- Class Names, Resource Types, etc. thx

  • Anonymous
    July 01, 2008
    I am trying to  connect Sun Application Server 8 to MS SQL 2005.  I can currently connect to SQL 2000 just fine and I am wondering if there are any differences that need to be taken into account -- Class Names, Resource Types, etc. thx


(Sorry I forgot this) I am currently getting this error when trying to Ping using a connection pool: Operation 'pingConnectionPool' failed in 'resources' Config Mbean. Target exception message: Connection could not be allocated because: Network error IOException: Connection refused: no further information

  • Anonymous
    July 01, 2008
    The comment has been removed

  • Anonymous
    July 24, 2008
    The comment has been removed

  • Anonymous
    July 24, 2008
    The comment has been removed

  • Anonymous
    July 24, 2008
    FROM T-SQL: C:UsersRoger Blackmar>osql -U jboss Password: [SQL Native Client]Named Pipes Provider: Could not open a connection to SQL Server [2]. [SQL Native Client]Login timeout expired [SQL Native Client]An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections.

  • Anonymous
    July 24, 2008
    FROM Eclipse: com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP connection to the host  has failed. java.net.ConnectException: Connection refused: connect at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(Unknown Source) at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(Unknown Source) at com.microsoft.sqlserver.jdbc.SQLServerConnection.loginWithoutFailover(Unknown Source) at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(Unknown Source) at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(Unknown Source) at org.eclipse.datatools.connectivity.drivers.jdbc.JDBCConnection.createConnection(JDBCConnection.java:89) at org.eclipse.datatools.connectivity.DriverConnectionBase.internalCreateConnection(DriverConnectionBase.java:104) at org.eclipse.datatools.connectivity.DriverConnectionBase.open(DriverConnectionBase.java:53) at org.eclipse.datatools.enablement.msft.internal.sqlserver.connection.JDBCSQLServerConnectionFactory.createConnection(JDBCSQLServerConnectionFactory.java:27) at org.eclipse.datatools.connectivity.internal.ConnectionFactoryProvider.createConnection(ConnectionFactoryProvider.java:83) at org.eclipse.datatools.connectivity.internal.ConnectionProfile.createConnection(ConnectionProfile.java:355) at org.eclipse.datatools.connectivity.ui.PingJob.createTestConnection(PingJob.java:76) at org.eclipse.datatools.connectivity.ui.PingJob.run(PingJob.java:59) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

  • Anonymous
    July 24, 2008
    It is not getting to the authentication handshake it is refusing the connection, outright. Management Studio connects immediately without a problem.

  • Anonymous
    July 24, 2008
    The comment has been removed

  • Anonymous
    July 24, 2008
    The comment has been removed

  • Anonymous
    September 01, 2008
    The comment has been removed

  • Anonymous
    September 02, 2008
    if u got any solution plz reply me my id EMAIL ME:-raj1112@oneindia.in

  • Anonymous
    September 17, 2008
    I use JSQLConnection to connect to sqlserver2000 with this code:


String connectionURL; connectionURL = "jdbc:JSQLConnect://COMPUTER1/database=ee/user=hadi/password=hadi"; Class.forName("com.jnetdirect.jsql.JSQLDriver"); Connection connection = DriverManager.getConnection(connectionURL);

but i recieved an exeption:


description The server encountered an internal error () that prevented it from fulfilling this request. exception org.apache.jasper.JasperException: Exception in JSP: /ExampleJSP.jsp:73 70: 71: // Make the DBMS connection 72: 73: Connection connection = DriverManager.getConnection(connectionURL); 74: 75: // Make the statement 76: root cause javax.servlet.ServletException: com.jnetdirect.jsql.JSQLException: Failed Logon:com.jnetdirect.jsql.JSQLException: TCP/IP connection failed to host:COMPUTER1 java.net.ConnectException: Connection refused: connect url:jdbc:JSQLConnect://COMPUTER1/database=ee/user=hadi/password=hadi


if my username or password or servername is incorrect how can i find them in my data base. I use tomcat5.5

  • Anonymous
    September 18, 2008
    The comment has been removed

  • Anonymous
    October 28, 2008
    pls i just came across this site and I am trying to connect to sql server 2k5 developer edition from cold fusion and i kep having this error Connection verification failed for data source: AdventureWorks com.microsoft.sqlserver.jdbc.SQLServerException: Login failed for user 'ColdFusionLogin'. The user is not associated with a trusted SQL Server connection. The root cause was that: com.microsoft.sqlserver.jdbc.SQLServerException: Login failed for user 'ColdFusionLogin'. The user is not associated with a trusted SQL Server connection.

  • Anonymous
    October 28, 2008
    The comment has been removed

  • Anonymous
    October 28, 2008
    The comment has been removed

  • Anonymous
    November 04, 2008
    I can successfully use the integrated security feature to connect to my MSSQL 2005 database via a generic class, but if i attempt to use the same connection code the connection fails. When running the generic class it passes in the user credentials(the ones I pass into the function) just fine by when I attempt to use the same code in Tomcat it tries to use the Account on the server that running tomcat. Is there any way to force the jdbc driver to use the credentials supplied instead of the servers credentials.

  • Anonymous
    November 04, 2008
    There is no way currently in the driver to provide Windows credentials to authenticate the user to SQL Server. Is not possible for you to run the Tomcat instance under a Windows user who has access to SQLServer?

  • Anonymous
    November 04, 2008
    Thank you for the quick response That would be possible but that makes things odd on a security standpoint. I will give you my scenario. I am a software developer in an organization large enough that I do not have to manage the Tomcat Server or MSSQL Server. The DBAs are asking that we use AD authentication instead of the SQL authentication to access the SQL server.To make this happen I need to use the integerated security feature of the JDBC driver. This works but leads to this issue.  The Tomcat Instance would need to be able to run multiple application all of which would need to use the MSSQL database. Security would not want us to use the same service account to access all the databases; which, if we ran the tomcat instance as the ad user with the ability to connect to mssql it would use the same ad user for all connections. Thanks for pointing this out to me. Is there any MS documentation on not being able to provide the windows credentials so I can show my server admins / security / manager. Thanks again.

  • Anonymous
    November 16, 2008
    Hi, My application used JDBC driver to validate the MS SQL server login. ->Currently it uses SQL Server Authentication ->I wanted to have my applicataion use Windows Authentication. Hence, added IntegratedSecurity=true to the connection URL. ->But DriverManager.getConnection(args[1],pro) errors like this [MyApplication][SQLServer JDBC Driver][SQLServer]Login failed for user'(null)'. Reason: Not associated with a trusted SQL Server connection. Thanks in advance Sudeep.

  • Anonymous
    November 17, 2008
    Greetings, How to test whether my sql std 2005 server can be connected thru SSL? Every connection is working but connecting thru jdbc fails with "Connection string: jdbc:sqlserver://serverbameuser/pwd. com.microsoft.sqlserver.jdbc.sqlserverexception driver could not establish a secure connection to sql server using ssl. TDS proto stream is not valid. JDBC 1.2 installed. TIA Carlos

  • Anonymous
    November 19, 2008
    Sudeep your issue may be that the computer/server that your are running the jdbc application on and the computer/server that the MSSQL server is on are on different domains. I ran into the same issue when the client and server were not on the same server.

  • Anonymous
    November 19, 2008
    Sorry "I ran into the same issue when the client and server were not on the same DOMAIN"

  • Anonymous
    December 07, 2008
    Hello.  I'm running SQL Server 2005 and have a named instance.  I have enabled TCP/IP for the instance, and in IPall it lists a dynamic port of 1522.  That's fine, but I don't know what to list for the host.  Username and password are separate properies.  My script for the connection is: <property name="url" value="jdbc:sqlserver://Localhost:1522;databaseName=TestDB;"/> Instead of Localhost, do I enable IP1 in Confirguration Manager and use the IP Address from that?  Do I use the computer name?  Instance name?  I'm just not sure how to define the host. Thanks very much, schubash

  • Anonymous
    January 29, 2009
    hi everyone, Can i Use database as a Microsoft Access in hernate. if any body know please help me what that approch Thnaks sud

  • Anonymous
    February 04, 2009
    I saw that there is a way to embed a failover address into a connection string as shown below: "Data Source=SQLAINST1;Failover Partner=SQLBINST1;Initial Catalog=DBMTest;Integrated Security=True" Can I do this for a connection from an application running in a Java environment under Tomcat? (Please say yes!!!)

  • Anonymous
    May 20, 2009
    I am trying to connect eclipse (MyEclipse) to sqlserver 2008. Where can I get the connection URL information? Thanks

  • Anonymous
    May 20, 2009
    Hey Mark, We have a documentation that should help you with this: http://msdn.microsoft.com/en-us/library/ms378672.aspx --Tres London [SQL Server]

  • Anonymous
    May 29, 2009
    Hi, I am using Pentaho right now installed to a local computer and would want to create a data source that connects to a remote MS SQL server but I can't. I always get this error: "Connection attempt failed: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Login failed for user 'admin'. " I am using the following: driverClassName="com.microsoft.jdbc.sqlserver.SQLServerDriver" url="jdbc:sqlserver://s02-db01;databaseName=scorecard" Admin user is already an administrator both in the local computer and in the server. I am not an expert in java so I am not sure on how to resolve this. Please help. Thanks for all the help.

  • Anonymous
    May 29, 2009
    Hi, I am using Pentaho right now installed to a local computer and would want to create a data source that connects to a remote MS SQL server but I can't. I always get this error: "Connection attempt failed: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Login failed for user 'admin'. " I am using the following: driverClassName="com.microsoft.jdbc.sqlserver.SQLServerDriver" url="jdbc:sqlserver://s02-db01;databaseName=scorecard" Admin user is already an administrator both in the local computer and in the server. I am not an expert in java so I am not sure on how to resolve this. Please help. Thanks for all the help.

  • Anonymous
    May 29, 2009
    Hi, I am using Pentaho right now installed to a local computer and would want to create a data source that connects to a remote MS SQL server but I can't. I always get this error: "Connection attempt failed: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Login failed for user 'admin'. " I am using the following: driverClassName="com.microsoft.jdbc.sqlserver.SQLServerDriver" url="jdbc:sqlserver://s02-db01;databaseName=scorecard" Admin user is already an administrator both in the local computer and in the server. I am not an expert in java so I am not sure on how to resolve this. Please help. Thanks for all the help.

  • Anonymous
    May 29, 2009
    Is the admin user the same user in the remote machine and the local machine? Have you tried using our 2005 driver?

  • Anonymous
    May 29, 2009
    Yep. they're the same user. I haven't tried the 2005 driver. The MS SQL Server I am connecting to is 2000 SP3. I'm guessing the problem could be in the security network - it might be blocking my connection but I don't know how to check this further. =(

  • Anonymous
    June 03, 2009
    The comment has been removed

  • Anonymous
    June 08, 2009
    it took me ages to resolve this! but glad i did. my SQL Server 2000 authentication mode is set to Windows Authentication mode. JDBC Driver does not support Windows NT authentication so instead, I set authentication mode to Mixed Mode and used the sa account.

  • Anonymous
    October 14, 2009
    Hi, i'm using JDBC to connect to SQL Server 2005 locally using integrated security. it's getting failed with the following error code Error: 17806, Severity: 20, State: 2. Logon       SSPI handshake failed with error code 0x8009030c while establishing a connection with integrated security; the connection has been closed. [CLIENT: 127.0.0.1] Logon       Error: 18452, Severity: 14, State: 1. Logon       Login failed for user ''. The user is not associated with a trusted SQL Server connection. [CLIENT: 127.0.0.1] But i'm able to coneect successfully using 127.0.0.1. the connection is failing only when i give localhost. Connection URL: jdbc:sqlserver://LOCALHOST:1433;DatabaseName=master;integratedSecurity=true

  • Anonymous
    October 16, 2009
    We need little more information on this, this blog post can help you in determining the root cause of this issue http://blogs.msdn.com/sql_protocols/archive/2006/02/21/536201.aspx

  • Anonymous
    November 25, 2009
    mi consulta es la siguiente: estoy utilizando el jdbc 1.2 para sql server 2005, junto con JPA de toplink con procedimientos almacenados pero me da la siguiente excepcion: Internal Exception: com.microsoft.sqlserver.jdbc.SQLServerException: La instrucción no devolvió un conjunto de resultados. esta excepcion solo me da en procedimientos que utilizan como parametros los tipo de datos fecha. alguien sabe cual puede ser mi falla?. muchas gracias

  • Anonymous
    January 18, 2010
    Hi, I'm trying to make a java application that connects to an SQL database (2008 Express). [code] Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); con = DriverManager.getConnection("jdbc:odbc:OnlineTutorials"); [/code] This returns this error: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified What's wrong? Thanks!

  • Anonymous
    January 19, 2010
    Did you make sure that the onlineTutorials datasource is registered via the odbc administrator. Also, the preferred way to access sqlserver is via our driver not the jdbc odbc bridge. http://msdn.microsoft.com/en-us/library/ms378526.aspx

  • Anonymous
    January 20, 2010
    The comment has been removed

  • Anonymous
    March 04, 2010
    I am getting Error - com.microsoft.sqlserver.jdbc.SQLServerException: The driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption. Error: "SQL Server returned an incomplete response. The connection has been closed." when trying to use the Microsoft SQL Server JDBC Driver 2.0 or 3.0 with JRE 1.6.0. I am using sqljdbc4.jar with JRE 1.6.0. Connection to the same database works fine when using JRE 1.5.0 and sqljdbc.jar. Any clues?

  • Anonymous
    March 05, 2010
    Hi Indranil and Seshasai, Assuming that the only thing you change is the JRE and the driver JAR being used, if you are able to connect with one JRE, but not the other, that usually points to some problem with the JRE installation. What JRE vendor and version are you using?  Check the output from: System.out.println(System.getProperty("java.version")); System.out.println(System.getProperty("java.vendor")); If you have multiple JRE's installed, verify that you are using the one that you intend to by checking its installation directory.  Check the output from: System.out.println(System.getProperty("java.home")); In the 1.6.0 JRE installation, look for the lib/security/java.security file and compare it to the same file from the working 1.5.0 JRE installation.  What are the differences between the files? Regards, --David Olix [SQL Server]

  • Anonymous
    April 07, 2010
    Hello using a esri portal application that is causing me the following error message: "Cannot create JDBC driver of class 'com.microsoft.sqlserver.jdbc.SQLServerDriver' for connect URL 'jbdc:sqlserver://BMH9K1SSQLEXPRESS:1433;databaseName=geoportal931' " Operating system XP, tomcat6 with SQLEXPRESS 2005. With the latest sqljdbc.jar ver2 put into C:Program FilesApache Software FoundationTomcat 6.0confcatalinalib. The log files are telling me there is a issue with JDBC. See below: "Caused by: java.sql.SQLException: No suitable driver at java.sql.DriverManager.getDriver(Unknown Source) at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1143) ... 37 more" 08/04/2010 8:54:27 AM com.esri.gpt.framework.sql.DatabaseReference testConnection SEVERE: Connection test failed. org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class 'com.microsoft.sqlserver.jdbc.SQLServerDriver' for connect URL 'jbdc:sqlserver://BMH9K1SSQLEXPRESS:1433;databaseName=geoportal931' at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1150) at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880) at com.esri.gpt.framework.sql.DatabaseReference.openJndiConnection(DatabaseReference.java:269) at com.esri.gpt.framework.sql.DatabaseReference.openConnection(DatabaseReference.java:223) at com.esri.gpt.framework.sql.DatabaseReference.testConnection(DatabaseReference.java:303) at com.esri.gpt.framework.sql.DatabaseReferences.add(DatabaseReferences.java:79) at com.esri.gpt.framework.context.ApplicationConfigurationLoader.loadDatabase(ApplicationConfigurationLoader.java:374) at com.esri.gpt.framework.context.ApplicationConfigurationLoader.load(ApplicationConfigurationLoader.java:116) at com.esri.gpt.framework.context.ApplicationContext.loadConfiguration(ApplicationContext.java:71) at com.esri.gpt.framework.context.ApplicationContext.getInstance(ApplicationContext.java:57) at com.esri.gpt.framework.context.InitializationServlet.init(InitializationServlet.java:50) at javax.servlet.GenericServlet.init(GenericServlet.java:212) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1161) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:981) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4042) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4348) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525) at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:626) at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:553) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:488) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053) at org.apache.catalina.core.StandardHost.start(StandardHost.java:719) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) at org.apache.catalina.core.StandardService.start(StandardService.java:516) at org.apache.catalina.core.StandardServer.start(StandardServer.java:710) at org.apache.catalina.startup.Catalina.start(Catalina.java:566) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413) Caused by: java.sql.SQLException: No suitable driver at java.sql.DriverManager.getDriver(Unknown Source) at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1143) ... 37 more The script to make the connection is in a XML which must call java in the application somehow. The XML is below. Would anyone happen to notice some syntax errors? geoportal.xml that calls web application.. <Context docBase="geoportal" path="/geoportal" debug="0" reloadable="true" crossContext="true">          <Resource name="jdbc/gpt" auth="Container" type="javax.sql.DataSource"                 driverClassName="com.microsoft.sqlserver.jdbc.SQLServerDriver"                 url="jbdc:sqlserver://BMH9K1SSQLEXPRESS:1433;databaseName=geoportal931" username="geoportal931" password="geoportal931pwd"                 maxActive="20"                 maxIdle="10"                 maxWait="-1" />         </Context> Thanks in advance

  • Anonymous
    April 08, 2010
    Thank you for using Microsoft SQL Server JDBC driver. This kind of question is best suited for our Data Access Forum (http://social.msdn.microsoft.com/Forums/en-US/sqldataaccess/threads) where various team members as well users can reply or if you would like to get help from our CSS then you can contact them at: http://support.microsoft.com/select/?LN=en-us&target=assistance&x=5&y=9 Thanks Amina

  • Anonymous
    October 22, 2010
    I am getting the following error while connecting to ms sql server 2005. i am using eclipse ide. can u provide me with detailed steps about how to connect to mssql server 2005 in a java project. java.lang.ClassNotFoundException: com.microsoft.jdbc.sqlserver.SQLServerDriver at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClassInternal(Unknown Source) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at Connect.getConnection(Connect.java:24) at Connect.displayDbProperties(Connect.java:42) at Connect.main(Connect.java:78) Error Trace in getConnection() : com.microsoft.jdbc.sqlserver.SQLServerDriver Error: No active Connection

  • Anonymous
    December 16, 2010
    HI, when i connect ms sql2005 with sun application server i'm getting the error as  " Operation 'pingConnectionPool' failed in 'resources' Config Mbean. Target exception message: Connection could not be allocated because: The TCP/IP connection to the host PC, port 1433 has failed. Error: Connection refused: no further information. Please verify the connection properties and check that a SQL Server instance is running on the host and accepting TCP/IP connections at the port, and that no firewall is blocking TCP connections to the port."

  • Anonymous
    January 08, 2011
    Hi, when i am trying to connect eclipse with SQL Server 2005, i am getting following Error java.sql.SQLException: No suitable driver found for com.microsoft.sqlserver.jdbc.SQLServerDriver in Class.forName syntax.. any help will be great..

  • Anonymous
    May 12, 2011
    hi, i am coding in eclipse to access a database on the sql server. i have used the jdbc plugin -sqljdbc_3.0 and sql server 2008 R2. i am not able to get the connection right. it saya that there was a communication error: SQL Exception: com.mysql.jdbc.CommunicationsException: Communications link failure due to underlying exception: can anyone please help me out?

  • Anonymous
    October 17, 2011
    Hi there, Are there any known issues when using jdbc drivers to connect to 64 bit Windows 2008 R2 / SQL Server 2008 R2 failover clusters?

  • Anonymous
    October 25, 2011
    The comment has been removed

  • Anonymous
    November 29, 2011
    @Shahrooz Sabet Can you post your question on the Data access forums so they will reach a wider audience? social.msdn.microsoft.com/.../threads

  • Anonymous
    December 05, 2011
    The comment has been removed

  • Anonymous
    January 12, 2012
    @freemarket (Henry) Try posting your question on the forums to reach a broader audience. social.msdn.microsoft.com/.../threads

  • Anonymous
    May 14, 2013
    Kindly check this link for my question stackoverflow.com/.../getting-connection-reset-by-peer-exception-toplink. The problem is why i am getting this only for first time and then again things starts work normally. No Reset peer exception after second time. Thanks

  • Anonymous
    June 27, 2013
    Hi friends    I M Getting Error while creating the connection with Microsoft Sql server 2008 R2. In Place of Driver Jar ,i useing " jtds-1.2.4.jar " but i can't able to create connection Error is  = Connection can not be created with the metadata using the given metadata properties Please help me

  • Anonymous
    September 05, 2013
    necesito conector jdbc para sql server 2005 de eclipse

  • Anonymous
    March 16, 2014
    I am trying to install Informatica 9.5.1 on a personal Win7 machine where I have pre-installed SQLExpress.  I am at a stage of the install where it ttys to connect to my sql server and cannot because it cannot connect.  My investigation has lead me to a great tool (JDBCTest tool at community.informatica.com/.../jdbctest).  This tool allows one to check the viability of a connection to various vendor databases (sqlserver, oracle...) and if failed connection gives reason.  Well, I tried many variants but all came back with "getConnection() Failed: Message: No suitable driver found for jdbc:informatica:sqlserver://localhost;Instance=SQLEXPRESS;DatabaseName=INFA_REPO Vendor: 0 State:  0800" So, my conclusion...since my SQLExpress is working just fine is that it has something to do with the sqljdbc...jar but I really don't understand enough in this area to take next steps...any guidance would be appreciated.

  • Anonymous
    August 07, 2014
    Hello Team, What JDBC drivers version can be used  for MS SQL server 7 ? Also please share the download link for the same. Regards Praveen

  • Anonymous
    September 08, 2014
    How can I connect to JDBC data source in SSIS

  • Anonymous
    December 03, 2014
    I really want to know what my jdbc mysql url is?

  • Anonymous
    May 11, 2015
    I am getting Error - com.microsoft.sqlserver.jdbc.SQLServerException: The driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption. Error: "SQL Server returned an incomplete response. The connection has been closed." I am using Java 1.7 trying to connect to SQL Server 2012. Any thoughts?

  • Anonymous
    September 13, 2015
    Hi How do we solve this issue "com.microsoft.sqlserver.jdbc.SQLServerException: Socket closed"                at com.microsoft.sqlserver.jdbc.SQLServerConnection.terminate(SQLServerConnection.java:1668)                at com.microsoft.sqlserver.jdbc.SQLServerConnection.terminate(SQLServerConnection.java:1655)                at com.microsoft.sqlserver.jdbc.TDSChannel.read(IOBuffer.java:1789)                at com.microsoft.sqlserver.jdbc.TDSReader.readPacket(IOBuffer.java:4838)                at com.microsoft.sqlserver.jdbc.TDSCommand.startResponse(IOBuffer.java:6150)                at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doExecutePreparedStatement(SQLServerPreparedStatement.java:402)                at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement$PrepStmtExecCmd.doExecute(SQLServerPreparedStatement.java:350)                at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:5696)                at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:1716)                at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLServerStatement.java:180)                at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLServerStatement.java:155)

  • Anonymous
    November 03, 2015
    The comment has been removed

  • Anonymous
    November 11, 2015
    The comment has been removed

  • Anonymous
    September 06, 2016
    If you encounter connection issues from your Java application and SQL Server that are related to SSL, first check the Windows Server system event log if it contains SCHANNEL errors or warnings. If you see such entries you can test if SCHANNEL is misconfigured by first exporting the current registry key and then delete the complete[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL]key. Restart the computer and check if the JDBC connection works. If the connection works, ask your IT department, if they set these keys via group policy or if they use tools that configure SCHANNEL.

  • Anonymous
    September 28, 2016
    I am accessing sql server using sql jdbc 4.0 jar. Its working fine for 95 times out of 100. But for remaining 5 times I am getting error as:The driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption. Error: "SQL Server returned an incomplete response. The connection has been closed.".This is not frequent error. we are using java 1.6_22.Can you please help me in resolving this issue?Thanks

  • Anonymous
    October 07, 2016
    Hi to everybody someone can help me?I have a problem with my java process, i just have to install the next patchs in a windows server 2008 R2:KB3179573KB3164033KB3161958KB2687499KB3177725KB3178034KB3168965KB3172605KB3161949KB3161561KB3170455KB3159398KB2596615Before the installtion the java process was executed without any problem but now i have the next exception:Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: The driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption. Error: "SQL Server returned an incomplete response. The connection has been closed.". at com.microsoft.sqlserver.jdbc.SQLServerConnection.terminate(SQLServerConnection.java:1368) at com.microsoft.sqlserver.jdbc.TDSChannel.enableSSL(IOBuffer.java:1412) at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(SQLServerConnection.java:1058) at com.microsoft.sqlserver.jdbc.SQLServerConnection.login(SQLServerConnection.java:833) at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(SQLServerConnection.java:716) at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(SQLServerDriver.java:841) at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38) at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:582) at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:1158) at org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:106) at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:1044) at org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:111) at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:77)Sometimes the process are executed without errors. JDK 6 u45 was grow up to JDK 7 u51 and the problem persist.SQL server 2008 R2 SP3 I hope you can help me.Best regards.

    • Anonymous
      December 14, 2016
      Hi,Did you resolved the issue? We are also facing the same problem. please let me know the details. Thanks for your help.