Frequently Asked Questions for SQL Server JDBC DriverIntroductionThis article provides answers to the top 20 most frequently asked questions about the Microsoft SQL Server JDBC Driver. For detailed documentation, see the Microsoft SQL Server JDBC Driver Documentation. The questions you will find answers to in this document are: - Can the Microsoft JDBC Driver connect to SQL Server 2000?
- Will I be able to connect to SQL Server 2008 by using the Microsoft SQL Server 2005 JDBC Driver?
- Is the Microsoft SQL Server 2005 JDBC Driver free?
- Can I redistribute the Microsoft SQL Server JDBC Driver?
- Can I use Microsoft SQL Server JDBC Driver to access Microsoft SQL Server from a Linux computer?
- Does the Microsoft JDBC Driver support Secure Sockets Layer (SSL) encryption?
- Which authentication types are supported by the Microsoft SQL Server JDBC Driver?
- Does the Microsoft SQL Server JDBC Driver provide any authentication support for Windows?
- Does the Microsoft SQL Server JDBC Driver support Internet Protocol version 6 (IPv6) addresses?
- What is adaptive buffering?
- When should I use adaptive buffering?
- When should I use responseBuffering=adaptive instead of selectMethod=cursor?
- Can I use adaptive buffering and selectMethod=cursor at the same time?
- Does the Microsoft SQL Server JDBC Driver support connection pooling?
- Does the Microsoft SQL Server JDBC Driver provide its own connection pooling implementation?
- What kind of support is available for the Microsoft JDBC Driver from Microsoft?
- Is the Microsoft SQL Server JDBC Driver certified for use with any third-party application servers?
- Did Microsoft write the Microsoft SQL Server 2005 JDBC Driver or is it licensed like the Microsoft SQL Server 2000 JDBC Driver?
- How do I enable tracing?
- Will there be a new JDBC Driver version for Microsoft SQL Server 2008? If so, what code changes (if any) will I have to make to convert from the Microsoft SQL Server 2005 JDBC Driver version 1.2 to the Microsoft SQL Server 2008 JDBC Driver?
Questions and Answers- Q: Can the Microsoft JDBC Driver connect to SQL Server 2000?
A: The Microsoft SQL Server 2005 JDBC Driver versions 1.0, 1.1, and 1.2 can connect to Microsoft SQL Server 2000 and SQL Server 2005 from any Java application, application server, or Java-enabled applet. - Q: Will I be able to connect to SQL Server 2008 by using the Microsoft SQL Server 2005 JDBC Driver?
A: The Microsoft SQL Server 2005 JDBC Driver version 1.2 supports connecting to SQL Server 2008, SQL Server 2005, and SQL Server 2000. Earlier Microsoft JDBC Drivers, such as versions 1.0 and 1.1, can connect to SQL Server 2000 and 2005 versions only. Note that the Microsoft SQL Server 2005 JDBC Driver version 1.2 can connect to SQL Server 2008 but does not support the new data types or other features that are new in SQL Server 2008. - Q: Is the Microsoft SQL Server 2005 JDBC Driver free?
A: The Microsoft SQL Server 2005 JDBC Driver is available to users of all Microsoft SQL Server SKUs at no additional charge. - Q: Can I redistribute the Microsoft SQL Server JDBC Driver?
A: The Microsoft SQL Server JDBC Driver is freely redistributable under a separate Redistribution License that requires registration. For more information, see Register for Microsoft SQL Server 2005 JDBC Driver Redistribution Rights. - Q: Can I use Microsoft SQL Server JDBC Driver to access Microsoft SQL Server from a Linux computer?
A: The Microsoft SQL Server JDBC Driver is designed to work on any operating system that supports the use of a Java Virtual Machine (JVM). However, only Sun Solaris, Red Hat Linux, and Windows 2000 or later operating systems are officially supported. - Q: Does the Microsoft JDBC Driver support Secure Sockets Layer (SSL) encryption?
A: The Microsoft SQL Server 2005 JDBC Driver version 1.2 or later supports Secure Sockets Layer (SSL) encryption. For more information, see Using SSL Encryption. - Q: Which authentication types are supported by the Microsoft SQL Server JDBC Driver?
A: The Microsoft SQL Server JDBC Driver supports Windows Integrated Authentication and SQL Server Authentication. - Q: Does the Microsoft SQL Server JDBC Driver provide any authentication support for Windows?
A: The Microsoft SQL Server JDBC driver supports the use of Type 2 integrated authentication on Windows operating systems with both SQL Server 2000 and SQL Server 2005. For more information, see Building the Connection URL. - Q: Does the Microsoft SQL Server JDBC Driver support Internet Protocol version 6 (IPv6) addresses?
A: The Microsoft SQL Server JDBC driver supports the use of IPv6 addresses with the connection properties collection, and with the serverName connection string property. For more information, see Building the Connection URL. - Q: What is adaptive buffering?
A: Adaptive buffering is a new feature of the Microsoft SQL Server 2005 JDBC Driver version 1.2, and is designed to retrieve any kind of large-value data without the overhead of server cursors. The adaptive buffering feature of the Microsoft SQL Server 2005 JDBC Driver version 1.2 provides a new connection string property, responseBuffering=adaptive. For more information, see Using Adaptive Buffering topic and the blog What is adaptive response buffering and why should I use it? - Q: When should I use adaptive buffering?
A: You may want to use adaptive buffering when:
- Your query produces a very large result set. The application can execute a SELECT statement that produces more rows than the application can store in memory. In previous releases, the application had to use a server cursor (selectMethod=cursor) to avoid an OutOfMemoryError. In the Microsoft SQL Server 2005 JDBC Driver version 1.2 release, the application can use adaptive buffering instead. Adaptive buffering provides the ability to do a forward-only read-only pass of an arbitrarily large result set without requiring a server cursor.
- Your query produces very large SQLServerResultSet columns or SQLServerCallableStatement OUT parameter values. The application can retrieve a single value (column or OUT parameter) that is too large to fit entirely in application memory. Adaptive buffering allows the client application to retrieve such a value as a stream by using the getAsciiStream, the getBinaryStream, or the getCharacterStream methods.
For more information, see Using Adaptive Buffering and the blog What is adaptive response buffering and why should I use it?. - Q: When should I use responseBuffering=adaptive instead of selectMethod=cursor?
A: With the Microsoft SQL Server 2005 JDBC Driver version 1.2 or later, you should avoid using selectMethod=cursor for processing very large forward-only, read-only result sets. If your application processes very large forward-only, read-only result sets, you should use the adaptive buffering (responseBuffering=adaptive) instead. The adaptive buffering feature of the Microsoft SQL Server 2005 JDBC Driver version 1.2 allows applications to process very large forward-only, read-only result sets by using only a minimal amount of client-side memory without the overhead of creating, reading, and closing a server cursor. When you set selectMethod=cursor, this impacts all forward-only, read-only result sets produced by that connection. In other words, if your application routinely processes short result sets with a few rows, creating, reading, and closing a server cursor for each result set will end up using more resources on both client-side and server-side. There are some cases that using selectMethod=cursor instead of responseBuffering=adaptive would be more beneficial, such as:
- If your application processes a forward-only, read-only result set slowly, such as reading each row after some user input, using selectMethod=cursor instead of responseBuffering=adaptive might help reduce resource usage by SQL Server.
- If your application processes two or more forward-only, read-only result sets at the same time on the same connection, using selectMethod=cursor instead of responseBuffering=adaptive might help reduce the memory required by the driver while processing these result sets.
In both cases, you need to consider the overhead of creating, reading, and closing the server cursors. For more information, see Using Adaptive Buffering, Understanding Cursor Types, and the blog What is adaptive response buffering and why should I use it?. - Q: Can I use adaptive buffering and selectMethod=cursor at the same time?
A: If you set both selectMethod=cursor and responseBuffering=adaptive for the same connection, the responseBuffering=adaptive setting is generally ignored. In other words, forward-only, read-only result sets produced by this connection will generally use a server cursor. In some cases, the server might choose not to create database server cursors. In this case, adaptive buffering will be used. - Q: Does the Microsoft SQL Server JDBC Driver support connection pooling?
A: The Microsoft SQL Server 2005 JDBC Driver provides support for J2EE connection pooling. The JDBC driver implements the JDBC 3.0 required interfaces to enable the driver to participate in any connection-pooling implementation that is provided by middleware vendors. Middleware such as J2EE application servers frequently provides compliant connection-pooling facilities. The JDBC Driver participates in pooled connections in these environments. For more information, see Using Connection Pooling. - Q: Does the Microsoft SQL Server JDBC Driver provide its own connection pooling implementation?
A: Although the Microsoft SQL Server JDBC driver supports J2EE connection pooling, it does not provide its own pooling implementation. The JDBC Driver relies on third-party Java application servers to manage the connections. - Q: What kind of support is available for the Microsoft JDBC Driver from Microsoft?
A: Full support is available. We may require you to reproduce the issue outside any third-party application servers. If the issue cannot be reproduced outside the hosting J2EE container environment, you will need to involve the related third-party so that we can continue to assist you. In addition, the Microsoft SQL Server JDBC Driver is designed to work on any operating system that supports the use of a Java Virtual Machine (JVM). Only Sun Solaris, Red Hat Linux, and Windows 2000 or later operating systems are officially supported. Support for other JVMs may require reproducing the issue on a supported operating system and JVM. - Q: Is the Microsoft SQL Server JDBC Driver certified for use with any third-party application servers?
A: Although the Microsoft SQL Server JDBC Driver is not certified by any third-party application server vendors, it has been tested against various major application servers including BEA WebLogic, IBM WebSphere, JBoss, and Sun. - Q: Did Microsoft write the Microsoft SQL Server 2005 JDBC Driver or is it licensed like the Microsoft SQL Server 2000 JDBC Driver?
A: Unlike the Microsoft SQL Server 2000 JDBC Driver, the Microsoft SQL Server 2005 JDBC Driver is being actively developed by Microsoft. - Q: How do I enable tracing?
A: The Microsoft SQL Server 2005 JDBC Driver supports the use of tracing (or logging) to help resolve issues and problems with the JDBC Driver when it is used in your application. To enable the use of client-side JAR tracing, the JDBC Driver uses the logging APIs in java.util.logging, which provides a set of classes for creating Logger and LogRecord objects. For more information, see Tracing Driver Operation. For server-side XA tracing, see Data Access Tracing in SQL Server 2005. - Q: Will there be a new JDBC Driver version for Microsoft SQL Server 2008? If so, what code changes (if any) will I have to make to convert from the Microsoft SQL Server 2005 JDBC Driver version 1.2 to the Microsoft SQL Server 2008 JDBC Driver?
A: Microsoft currently plans to release a future version of the Microsoft SQL Server JDBC driver with support for new SQL Server 2008 features. At this time, we cannot comment on what code changes (if any) you will need to make when the product is released. Note that the Microsoft SQL Server 2005 JDBC Driver version 1.2 can connect to SQL Server 2008 but does not support the new data types or other features that are new in SQL Server 2008.
| |