<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Microsoft JDBC Driver Team Blog : Features</title><link>http://blogs.msdn.com/jdbcteam/archive/tags/Features/default.aspx</link><description>Tags: Features</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>SQL Server 2005 JDBC Driver and Database Mirroring</title><link>http://blogs.msdn.com/jdbcteam/archive/2009/01/05/sql-server-2005-jdbc-driver-and-database-mirroring.aspx</link><pubDate>Tue, 06 Jan 2009 01:30:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9283823</guid><dc:creator>dpblogs</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.msdn.com/jdbcteam/comments/9283823.aspx</comments><wfw:commentRss>http://blogs.msdn.com/jdbcteam/commentrss.aspx?PostID=9283823</wfw:commentRss><description>&lt;P&gt;We've heard from some customers that they are having difficulty getting Database Mirroring to work with our JDBC driver.&amp;nbsp; Recently, Adam from our counterpart customer service team posted a great blog on this topic.&amp;nbsp; Please refer to his blog regarding a couple of gotchas with the v1.2 driver.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/psssql/archive/2008/12/31/sql-2005-jdbc-driver-and-database-mirroring.aspx" mce_href="http://blogs.msdn.com/psssql/archive/2008/12/31/sql-2005-jdbc-driver-and-database-mirroring.aspx"&gt;http://blogs.msdn.com/psssql/archive/2008/12/31/sql-2005-jdbc-driver-and-database-mirroring.aspx&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Jimmy Wu&lt;BR&gt;SQL Server JDBC Team&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9283823" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/jdbcteam/archive/tags/JDBC/default.aspx">JDBC</category><category domain="http://blogs.msdn.com/jdbcteam/archive/tags/Connectivity/default.aspx">Connectivity</category><category domain="http://blogs.msdn.com/jdbcteam/archive/tags/Troubleshooting/default.aspx">Troubleshooting</category><category domain="http://blogs.msdn.com/jdbcteam/archive/tags/Features/default.aspx">Features</category></item><item><title>SQL Server 2008 feature support survey</title><link>http://blogs.msdn.com/jdbcteam/archive/2008/10/14/sql-server-2008-feature-support-survey.aspx</link><pubDate>Tue, 14 Oct 2008 20:40:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8999864</guid><dc:creator>dpblogs</dc:creator><slash:comments>27</slash:comments><comments>http://blogs.msdn.com/jdbcteam/comments/8999864.aspx</comments><wfw:commentRss>http://blogs.msdn.com/jdbcteam/commentrss.aspx?PostID=8999864</wfw:commentRss><description>&lt;P&gt;Since the release of SQL Server 2008, we have heard from customers looking for a JDBC driver that supports SQL Server 2008.&amp;nbsp; I would like to use this post to ask you, our customers, which features of SQL Server 2008 do you need supported through the JDBC driver.&amp;nbsp; We want to make sure we are delivering features&amp;nbsp;which adds the most value to our customers and your feedback will help us&amp;nbsp;help you.&lt;/P&gt;
&lt;P&gt;Here are some features to get things started:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Date/Time/Datetime2/DatetimeOffset data type&lt;/LI&gt;
&lt;LI&gt;Sparse Columns&lt;/LI&gt;
&lt;LI&gt;Table-Value Parameters&lt;/LI&gt;
&lt;LI&gt;T-SQL MERGE command&lt;/LI&gt;
&lt;LI&gt;Filestream data type&lt;/LI&gt;
&lt;LI&gt;Spatial data type&lt;/LI&gt;
&lt;LI&gt;HierarchyID data type&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;Please add any you don't see on the list.&amp;nbsp; If there are multiple features you need, please rank them in order of priority.&lt;/P&gt;
&lt;P&gt;Thanks,&lt;BR&gt;Jimmy Wu&lt;BR&gt;SQL Server JDBC Team&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8999864" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/jdbcteam/archive/tags/Features/default.aspx">Features</category><category domain="http://blogs.msdn.com/jdbcteam/archive/tags/SQL+Server+2008/default.aspx">SQL Server 2008</category></item><item><title>Working with SQL Server 2008 Filestream using v1.2 JDBC driver</title><link>http://blogs.msdn.com/jdbcteam/archive/2008/10/03/working-with-sql-server-2008-filestream-using-v1-2-jdbc-driver.aspx</link><pubDate>Sat, 04 Oct 2008 03:44:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8976050</guid><dc:creator>dpblogs</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/jdbcteam/comments/8976050.aspx</comments><wfw:commentRss>http://blogs.msdn.com/jdbcteam/commentrss.aspx?PostID=8976050</wfw:commentRss><description>&lt;P&gt;In the previous post &lt;A href="http://blogs.msdn.com/jdbcteam/archive/2008/09/28/working-with-sql-server-2008-date-time-data-types-using-v1-2-jdbc-driver.aspx" mce_href="http://blogs.msdn.com/jdbcteam/archive/2008/09/28/working-with-sql-server-2008-date-time-data-types-using-v1-2-jdbc-driver.aspx"&gt;"Working with SQL Server 2008 Date/Time Data Types using v1.2 JDBC driver"&lt;/A&gt;,I talked about how the current JDBC driver can interop with the new Date/Time/DateTime2/DatetimeOffset data types.&amp;nbsp; This time around, I will describe how to interop with SQL Server 2008 Filestream.&lt;/P&gt;
&lt;P&gt;Please refer to &lt;A href="http://msdn.microsoft.com/en-us/library/bb895234.aspx" mce_href="http://msdn.microsoft.com/en-us/library/bb895234.aspx"&gt;"SQL Server 2008 Books Online"&lt;/A&gt; for detailed information about Filestream.&lt;/P&gt;
&lt;P&gt;To demostrate how the v1.2 driver can retrieve a resultset containing a filestream column, I used the following T-SQL query to create&amp;nbsp;the test database and&amp;nbsp;table:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;CREATE DATABASE Archive&lt;BR&gt;ON&lt;BR&gt;PRIMARY ( NAME = Arch1,&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; FILENAME = 'c:\data\archdat1.mdf'),&lt;BR&gt;FILEGROUP FileStreamGroup1 CONTAINS FILESTREAM( NAME = Arch3,&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; FILENAME = 'c:\data\filestream1')&lt;BR&gt;LOG ON&amp;nbsp; ( NAME = Archlog1,&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; FILENAME = 'c:\data\archlog1.ldf')&lt;BR&gt;GO&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;CREATE TABLE foo&lt;BR&gt;(&lt;BR&gt;&amp;nbsp;&amp;nbsp; id int NOT NULL PRIMARY KEY,&lt;BR&gt;&amp;nbsp;&amp;nbsp; Photo varbinary(max) FILESTREAM NULL,&lt;BR&gt;&amp;nbsp;&amp;nbsp; MyRowGuidColumn uniqueidentifier NOT NULL ROWGUIDCOL&lt;BR&gt;&amp;nbsp;&amp;nbsp; UNIQUE DEFAULT NEWID()&lt;BR&gt;)&lt;BR&gt;GO&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Let's&amp;nbsp;assume that the table&amp;nbsp;has already been populated with some data.&amp;nbsp; Here is the code snippet that I used to retrieve the column values:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;strCmd = "select * from foo";&lt;BR&gt;rs = stmt.executeQuery(strCmd);&lt;BR&gt;if (rs.next())&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ResultSetMetaData rsmd = rs.getMetaData();&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (null != rsmd)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; String x = rsmd.getColumnTypeName(2);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; String name = rsmd.getColumnName(2);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.out.println("Column " + name + " is data type: " + x);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; int i = rsmd.getColumnType(2);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; switch (i)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; case (java.sql.Types.LONGVARBINARY):&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.out.println("Column is of JDBC type LONGVARBINARY.");&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; InputStream bStream = rs.getBinaryStream(2);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; byte[] y = new byte[1024];&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (null != bStream)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // write the retrieved filestream data as a file.&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.out.println("Write the filestream data out as a file.");&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FileOutputStream fs = new FileOutputStream("c:\\myFile");&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; int read = bStream.read(y);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; while (read != -1)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; fs.write(y);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;fs.flush();&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; read = bStream.read(y);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fs.close();&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; break;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; default:&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; throw new Exception("Unexpected data type found: " + String.valueOf(i) + ". Expected LONGVARBINARY.");&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // now, update the data with a new file content.&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.out.print("Now, let's update the filestream data.");&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;FileInputStream iStream = new FileInputStream("c:\\testFile.xml");&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; rs.updateBinaryStream(2, iStream, -1);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; rs.updateRow();&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; iStream.close();&lt;BR&gt;}&lt;BR&gt;rs.close();&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;When executed as a console application, you'll get the following output:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;Column Photo is data type: varbinary&lt;BR&gt;Column is of JDBC type LONGVARBINARY.&lt;BR&gt;Write the filestream data out as a file.&lt;BR&gt;Now, let's update the filestream data.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;As you've probably already noticed, SQL Server 2008 Filestream is&amp;nbsp;simply a LONGVARBINARY&amp;nbsp;to the v1.2 JDBC driver.&amp;nbsp; This means you can operate on a Filestream like any other LONGVARBINARY, though&amp;nbsp;I recommend that you stick with binaryStream to minize the amount of buffering the driver has to do.&lt;/P&gt;
&lt;P&gt;Jimmy Wu&lt;BR&gt;SQL Server JDBC Team&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8976050" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/jdbcteam/archive/tags/JDBC/default.aspx">JDBC</category><category domain="http://blogs.msdn.com/jdbcteam/archive/tags/Features/default.aspx">Features</category></item><item><title>What is adaptive response buffering and why should I use it?</title><link>http://blogs.msdn.com/jdbcteam/archive/2007/05/02/what-is-adaptive-response-buffering-and-why-should-i-use-it.aspx</link><pubDate>Wed, 02 May 2007 21:01:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2381485</guid><dc:creator>dpblogs</dc:creator><slash:comments>17</slash:comments><comments>http://blogs.msdn.com/jdbcteam/comments/2381485.aspx</comments><wfw:commentRss>http://blogs.msdn.com/jdbcteam/commentrss.aspx?PostID=2381485</wfw:commentRss><description>&lt;P&gt;Do you currently use selectMethod=cursor to&amp;nbsp;work around OOM errors with very large result sets?&amp;nbsp; Do you find that the driver seems to consume quite&amp;nbsp;a lot of memory for forward only read only result sets?&amp;nbsp; Does it seem like it takes a long time to return from Statement.executeQuery for simple SELECT statements that return many rows?&amp;nbsp; 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?&amp;nbsp; If you answered 'yes' to any of these questions, then you'll want to use adaptive response buffering.&lt;/P&gt;
&lt;P&gt;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.&amp;nbsp; With adaptive buffering,&amp;nbsp;the driver retrieves statement execution results from SQL Server as the application needs them, rather than&amp;nbsp;all at once.&amp;nbsp; The driver also discards results as soon as the application can no longer access them.&lt;/P&gt;
&lt;P&gt;By default, adaptive response buffering is turned off so that the v1.2 driver is&amp;nbsp;100% backward compatible&amp;nbsp;with the v1.0 and v1.1 drivers.&amp;nbsp; To use adaptive response buffering, you should&amp;nbsp;add "responseBuffering=adaptive" to your connection URL or use the DataSource method SQLServerDataSource.setResponseBuffering("adaptive").&amp;nbsp; 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").&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Ok, but what does adaptive response buffering do?&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;First, it helps to understand what full buffering (the default, backward-compatible behavior) does.&amp;nbsp; For large results, full buffering trades off use of increased&amp;nbsp;application memory usage and longer perceived statement execution latency against reduced lock contention in&amp;nbsp;SQL Server.&amp;nbsp; 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.&amp;nbsp; But to do that, it must buffer all of the rows in memory.&lt;/P&gt;
&lt;P&gt;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.&amp;nbsp; Adaptive response buffering allows you to process those rows through a&amp;nbsp;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.&amp;nbsp; With adaptive response buffering, the driver reads row data&amp;nbsp;from the database&amp;nbsp;as the application traverses the result set.&lt;/P&gt;
&lt;P&gt;Now let's say that some of the&amp;nbsp;selected column values are&amp;nbsp;large -- really large -- like a 600MB LOB.&amp;nbsp; Buffering&amp;nbsp;the&amp;nbsp;LOB may be infeasible.&amp;nbsp;&amp;nbsp;Random access to the LOB value&amp;nbsp;through the Blob/Clob interfaces currently requires&amp;nbsp;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.&amp;nbsp; With adaptive buffering, accessing LOB data through a stream requires only a small fixed amount of memory.&amp;nbsp; The only restriction is that with adaptive buffering,&amp;nbsp;the LOB&amp;nbsp;value can be streamed out only once.&amp;nbsp; 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.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;What about large CallableStatement OUT parameters?&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;The JDBC CallableStatement interface does not include&amp;nbsp;getBinaryStream, getCharacterStream or getAsciiStream methods.&amp;nbsp; But since&amp;nbsp;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.&amp;nbsp;&amp;nbsp;Any CallableStatement instance returned by the v1.2 driver can be downcast to a SQLServerCallableStatement instance to allow use of these methods.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;How the application accesses data is important&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;How much benefit an application gets from&amp;nbsp;adaptive response buffering is&amp;nbsp;determined not by the size or type of the data accessed,&amp;nbsp;but by how the application accesses the data.&amp;nbsp; For example, putting&amp;nbsp;a large binary column&amp;nbsp;after other columns&amp;nbsp;in the select list, and then accessing it using getBinaryStream rather than getBytes, allows the driver to avoid buffering the value.&amp;nbsp; But if the large binary column appears somewhere in the middle of the select list, the application would need to stream it out&amp;nbsp;before accessing the columns that follow it to keep the driver from buffering it.&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope this helps explain the basics of the new adaptive response buffering feature.&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#0000ff&gt;David Olix, SQL Server&lt;BR&gt;&lt;/FONT&gt;&lt;FONT face=Arial&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;&lt;FONT color=#800080&gt;Disclaimer: This posting is provided "AS IS" with no warranties, and confers no rights&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=2381485" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/jdbcteam/archive/tags/Features/default.aspx">Features</category></item></channel></rss>