We are proud to announce the availability of our beta v2.0 driver with support for JDBC 4.0 National Character Set JDBC data types and API methods among others. We have also enhanced our built-in tracing leveraging the Java logger utility by adding method entry and exit traces and better differentiation between the logger levels.
The beta driver is available at http://msdn.microsoft.com/data/jdbc
We welcome all feedback as we continue to improve this driver for the community.
Jimmy Wu
SQL Server JDBC Team
We have heard from customers using WebSphere 6.0 and trying to use the v1.2 JDBC driver that they are encountering the above exception. This problem is primarily due to a name mismatch between our JDBC driver and another vendor's jdbc driver. While the v1.2 JDBC driver is supported by IBM WebSphere 6.1, it is not officially supported on WebSphere 6.0. We recommend customers to upgrade to WebSphere 6.1 or later when possible. If you are unable to upgrade to WebSphere 6.1 or later, one potential workaround is to install the v1.2 JDBC driver in a separate directory and configuring WebSphere to look for the driver in the new directory. We have seen this resolves the issue in a number of cases.
Jimmy Wu
SQL Server JDBC Team
We have heard from a number of customers asking if the SQL Server 2000 JDBC driver will work with SQL Server 2005. Unfortunately, it will not.
If you are looking to migrate an existing SQL Server 2000 JDBC application running on the SQL Server 2000 JDBC driver to SQL Server 2005, we recommend that you download the latest SQL Server 2005 JDBC driver at http://msdn.microsoft.com/data/jdbc and update the existing JDBC application to work with the SS2005 JDBC driver. Once that is working, upgrade the backend SQL Server 2000 to SQL Server 2005. The SQL Server 2005 JDBC driver will work against SQL Server 2000, 2005, as well as the upcoming SQL Server 2008.
Jimmy Wu
SQL Server JDBC Team
The SQL Server JDBC team is running at full speed working on the next JDBC driver for SQL Server. We are looking for people to share in our excitement about the future of data access for SQL Server and to manage the quality of our next deliverables.
Are you passionate about working with data, the powerful query capabilities of T-SQL, the power of Object Oriented programming languages like Java, C#, C++? Are you interested in designing the next set of API’s for data and want to work for a team that’s focused on shipping technologies and having fun?
We are interested in hearing from you. Drop us a line through the team blog or directly to me and we’ll get back to you.
Uwa Agbonile
SQL Server JDBC Team
Uwa.Agbonile@microsoft.com
We recently answered the top 20 most frequently asked questions about the Microsoft SQL Server JDBC Driver.
You can find our FAQ page at http://msdn2.microsoft.com/en-us/data/cc325721.aspx.
Selcin Turkarslan, SQL Server
Many of you have asked us before, "Is the Microsoft SQL Server JDBC driver supported by IBM WebSphere?". Now, we have the answer. In collaboration with the IBM WebSphere team, the SQL Server JDBC team is happy to announce starting with IBM WebSphere 6.1 update 6.1.0.15, our SQL Server JDBC driver v1.2 is officially Tested with IBM® WebSphere® Application Server Software and is listed on IBM website's list of supported JDBC drivers for WebSphere 6.1.
Jimmy Wu
SQL Server JDBC Team
Localized documentation of the SQL Server 2005 JDBC driver v1.2 is now available online on MSDN at http://msdn.microsoft.com/data/jdbc as well as offline in the driver package downloadable at the same MSDN site. This brings the supported languages of the driver to 10.
The supported languages include:
- Chinese (Simplified)
- Chinese (Traditional)
- English
- French
- German
- Italian
- Japanese
- Korean
- Spanish
- Swedish
Jimmy Wu
SQL Server JDBC Team
The Microsoft SQL Server JDBC team would like to use this blog posting as an informal way to gather your feedback on what new features you like to see in our future release. We can not promise that every suggestion will make it into a release, but it will definitely help us prioritize the features that adds the most value to you.
To get things started, is JDBC 4.0 features more important to you than SQL Server 2008 features?
Regards,
SQL Server JDBC team
The Microsoft SQL Server JDBC team is proud to announce the general availability of the v1.2 RTW release. The driver can be found at http://msdn.microsoft.com/data/jdbc. In this release we significantly reduced the driver's memory footprint usage especially when handling large clobs and blobs on multiple active connections. This resulted in performance and scalability improvements, through the use of "responseBuffering=adaptive" connection property. We also introduced SQL Server SSL encryption support.
Jimmy Wu
Microsoft SQL Server
The Microsoft SQL Server JDBC team is proud to announce the availability of our v1.2 CTP2 (beta) release. The driver is downloadable at http://msdn.microsoft.com/data/jdbc. The direct link to the download page is http://www.microsoft.com/downloads/details.aspx?FamilyID=f914793a-6fb4-475f-9537-b8fcb776befd&DisplayLang=en
In this CTP release, we added SSL encryption support to the driver on top of the Adaptive response buffering support available in CTP1.
Jimmy Wu, SQL Server
Disclaimer: This posting is provided "AS IS" with no warranties, and confers no rights
On a Windows platform, when trying to connect to SQL Server using Integrated Authentication, you may see this exception:
com.microsoft.sqlserver.jdbc.SQLServerException: This driver is not configured for integrated authentication.
along with the following trace message:
com.microsoft.sqlserver.jdbc.AuthenticationJNI <clinit>
WARNING: Failed to load the sqljdbc_auth.dll
This generally indicates that the driver can not find the appropriate sqljdbc_auth.dll in the JVM library path. To correct the problem, please use the java.exe -D option to specify the "java.library.path" system property value. You will want to specify the full path to the directory contain the sqljdbc_auth.dll.
For example: java -cp .;"c:\jdbcv1_2\sqljdbc.jar" -Djava.library.path="c:\jdbcv1_2\auth\x86" myApp
Alternatively, you can copy the sqljdbc_auth.dll to a directory in the search path (example: the local directory where you are executing your application).
Note: You may also get the same error message if the application is trying to use the incorrect architecture (x86 VS x64) version of the sqljdbc_auth.dll. Try specifying the directory path to the other architecture.
If you are on a x64 machine running x64 OS, but the JVM you are using is the x86 version, you will need to specify and use the x86 version of the sqljdbc_auth.dll.
Some related information:
If you get the following exception:
java.lang.UnsatisfiedLinkError: GetDNSName
This typically indicates that the application is trying to use the incorrect version (say v1.0 VS v1.1) of the sqljdbc_auth.dll. Make sure the application is using the save version of the sqljdbc.jar and sqljdbc_auth.dll files.
Jimmy Wu, SQL Server
Disclaimer: This posting is provided "AS IS" with no warranties, and confers no rights
If you are seeing this exception while trying to use the SQL Server 2005 JDBC driver, then you will need to update the application.
The class name has changed between the SQL Server 2000 JDBC driver and the SQL Server 2005 JDBC driver. This particular class "com.microsoft.jdbc.sqlserver.SQLServerDriver" is the class name for the SQL Server 2000 JDBC driver. The SQL Server 2005 JDBC driver class name is "com.microsoft.sqlserver.jdbc.SQLServerDriver".
Note the change: from "microsoft.jdbc.sqlserver" to "microsoft.sqlserver.jdbc"
In addition, the SQL Server 2005 JDBC driver has a different URL prefix from the SQL Server 2000 JDBC driver. The SQL Server 2000 JDBC driver uses an URL prefix of "jdbc:microsoft:sqlserver://", while the SQL Server 2005 JDBC driver uses an URL prefix of "jdbc:sqlserver://".
Note the removal of "microsoft" from the URL prefix.
For additional information on all the different Connection string properties, please refer to the following MSDN topic: http://msdn2.microsoft.com/en-us/library/ms378428(SQL.90).aspx
Jimmy Wu, SQL Server
Disclaimer: This posting is provided "AS IS" with no warranties, and confers no rights
The Microsoft SQL Server JDBC team is proud to announce the availability of our v1.2 CTP (beta) release. The driver is downloadable at http://msdn.microsoft.com/data/jdbc. The direct link to the download page is http://www.microsoft.com/downloads/details.aspx?familyid=f914793a-6fb4-475f-9537-b8fcb776befd&displaylang=en
In this release, we have greatly improved the performance and handling of large rowsets; added support for IBM Websphere; introduced a new response buffering model, "adaptive".
Come back soon for more exciting news about this release.
Jimmy Wu, SQL Server
Disclaimer: This posting is provided "AS IS" with no warranties, and confers no rights
Do you currently use selectMethod=cursor to work around OOM errors with very large result sets? Do you find that the driver seems to consume quite a lot of memory for forward only read only result sets? Does it seem like it takes a long time to return from Statement.executeQuery for simple SELECT statements that return many rows? Do you wish you could get that 600MB LOB you streamed into a column back out again without needing loads of memory to avoid an OOM? If you answered 'yes' to any of these questions, then you'll want to use adaptive response buffering.
Adaptive response buffering is a new feature of the v1.2 JDBC driver that allows the driver to reduce memory usage and statement execution latency. With adaptive buffering, the driver retrieves statement execution results from SQL Server as the application needs them, rather than all at once. The driver also discards results as soon as the application can no longer access them.
By default, adaptive response buffering is turned off so that the v1.2 driver is 100% backward compatible with the v1.0 and v1.1 drivers. To use adaptive response buffering, you should add "responseBuffering=adaptive" to your connection URL or use the DataSource method SQLServerDataSource.setResponseBuffering("adaptive"). If you need finer control, at the statement level, you can also downcast any Statement (or PreparedStatement or CallableStatement) instance returned by the driver to a SQLServerStatement and call SQLServerStatement.setResponseBuffering("adaptive").
Ok, but what does adaptive response buffering do?
First, it helps to understand what full buffering (the default, backward-compatible behavior) does. For large results, full buffering trades off use of increased application memory usage and longer perceived statement execution latency against reduced lock contention in SQL Server. For example, by retrieving all the rows of a forward only, read only result set up front, the driver allows the server to relinquish table read locks that may block updates. But to do that, it must buffer all of the rows in memory.
But for very large result sets, a fully-buffered strategy may be infeasible. Let's say you execute a SELECT statement that returns a million rows. Adaptive response buffering allows you to process those rows through a forward only, read only result set, without incurring the overhead of a server cursor (selectMethod=cursor) and without requiring the driver buffer more than one row. With adaptive response buffering, the driver reads row data from the database as the application traverses the result set.
Now let's say that some of the selected column values are large -- really large -- like a 600MB LOB. Buffering the LOB may be infeasible. Random access to the LOB value through the Blob/Clob interfaces currently requires the whole LOB to be buffered, but it is possible to stream the entire LOB value out through an InputStream or Reader obtained through one of the ResultSet methods: getBinaryStream, getCharacterStream, or getAsciiStream. With adaptive buffering, accessing LOB data through a stream requires only a small fixed amount of memory. The only restriction is that with adaptive buffering, the LOB value can be streamed out only once. If your application needs to re-read any portion of the value, it must call the mark method on the InputStream or Reader to start buffering data that is to be re-read after a subsequent call to the reset method.
What about large CallableStatement OUT parameters?
The JDBC CallableStatement interface does not include getBinaryStream, getCharacterStream or getAsciiStream methods. But since accessing LOB values through the Blob/Clob interfaces still require the whole LOB to be buffered, these stream getter methods have been added to the SQLServerCallableStatement class. Any CallableStatement instance returned by the v1.2 driver can be downcast to a SQLServerCallableStatement instance to allow use of these methods.
How the application accesses data is important
How much benefit an application gets from adaptive response buffering is determined not by the size or type of the data accessed, but by how the application accesses the data. For example, putting a large binary column after other columns in the select list, and then accessing it using getBinaryStream rather than getBytes, allows the driver to avoid buffering the value. But if the large binary column appears somewhere in the middle of the select list, the application would need to stream it out before accessing the columns that follow it to keep the driver from buffering it.
I hope this helps explain the basics of the new adaptive response buffering feature.
David Olix, SQL Server
Disclaimer: This posting is provided "AS IS" with no warranties, and confers no rights
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