<?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 : JDBC</title><link>http://blogs.msdn.com/jdbcteam/archive/tags/JDBC/default.aspx</link><description>Tags: JDBC</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>v2.0 January 2009 Community Technology Preview Released</title><link>http://blogs.msdn.com/jdbcteam/archive/2009/01/26/v2-0-january-2009-customer-technology-preview-released.aspx</link><pubDate>Tue, 27 Jan 2009 04:24:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9376624</guid><dc:creator>dpblogs</dc:creator><slash:comments>8</slash:comments><comments>http://blogs.msdn.com/jdbcteam/comments/9376624.aspx</comments><wfw:commentRss>http://blogs.msdn.com/jdbcteam/commentrss.aspx?PostID=9376624</wfw:commentRss><description>&lt;P&gt;The SQL Server JDBC team is happy to announce the release&amp;nbsp;of the&amp;nbsp;January 2009 community technology preview.&amp;nbsp; This beta release&amp;nbsp;is feature complete, which includes, but not limited to, JDBC 4.0 SQLXML data type; National Character set; driver autoloading; new metadata methods; and enhanced tracing.&amp;nbsp; You can download the beta release at &lt;A href="http://msdn.microsoft.com/data/jdbc" mce_href="http://msdn.microsoft.com/data/jdbc"&gt;&lt;FONT color=#0072bc&gt;http://msdn.microsoft.com/data/jdbc&lt;/FONT&gt;&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=9376624" 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/General/default.aspx">General</category><category domain="http://blogs.msdn.com/jdbcteam/archive/tags/Announcement/default.aspx">Announcement</category></item><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>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>The driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption.</title><link>http://blogs.msdn.com/jdbcteam/archive/2008/09/09/the-driver-could-not-establish-a-secure-connection-to-sql-server-by-using-secure-sockets-layer-ssl-encryption.aspx</link><pubDate>Wed, 10 Sep 2008 03:26:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8938263</guid><dc:creator>dpblogs</dc:creator><slash:comments>4</slash:comments><comments>http://blogs.msdn.com/jdbcteam/comments/8938263.aspx</comments><wfw:commentRss>http://blogs.msdn.com/jdbcteam/commentrss.aspx?PostID=8938263</wfw:commentRss><description>&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;B&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;What is SSL and why is my JDBC driver using it?&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face=Calibri size=3&gt;The v1.2 JDBC driver uses SSL (Secure Sockets Layer) to encrypt connections to SQL Server for improved security.&amp;nbsp; Where it can, the v1.2 driver ALWAYS uses SSL to encrypt the login to SQL Server.&amp;nbsp; For integrated auth connections, SSL provides an added layer of security.&amp;nbsp; For SQL auth, where the user name and password would otherwise be sent in the clear, SSL provides an essential layer of security.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;B&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;I trust that my network is secure without SSL...&amp;nbsp; How do I turn off SSL encryption?&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face=Calibri size=3&gt;You can control whether a connection encrypts all data to and from the server after login using the ‘encrypt’ connection property.&amp;nbsp; However, where it can, the v1.2 driver ALWAYS uses SSL to encrypt the login to SQL Server.&amp;nbsp; You cannot disable SSL encryption of the SQL Server login.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;B&gt;&lt;FONT face=Calibri size=3&gt;Ok, but I upgraded to v1.2 and now I can’t connect!&amp;nbsp; Why am I getting the error “The driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption. Error: …”?&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face=Calibri size=3&gt;Odds are good that your Java SSL setup is messed up somehow.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face=Calibri size=3&gt;SSL in Java is provided through the Java Secure Socket Extension (JSSE).&amp;nbsp; Its reference guide (for J2SE 5) is here: &lt;/FONT&gt;&lt;A href="http://java.sun.com/j2se/1.5.0/docs/guide/security/jsse/JSSERefGuide.html" mce_href="http://java.sun.com/j2se/1.5.0/docs/guide/security/jsse/JSSERefGuide.html"&gt;&lt;FONT face=Calibri color=#0000ff size=3&gt;http://java.sun.com/j2se/1.5.0/docs/guide/security/jsse/JSSERefGuide.html&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Calibri size=3&gt; .&amp;nbsp; A key aspect of JSSE is its pluggable provider model. Typically, JRE vendors supply JSSE provider implementations.&amp;nbsp; There are at least two main JSSE providers available out there and they do not necessary work well together.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face=Calibri size=3&gt;For SSL to work at all, it is absolutely necessary to have the JSSE providers configured correctly for the JRE you are using.&amp;nbsp; There are two steps to this:&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoListParagraph style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1"&gt;&lt;SPAN style="mso-fareast-font-family: Calibri; mso-bidi-font-family: Calibri"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT face=Calibri size=3&gt;1)&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;FONT face=Calibri size=3&gt;Look at the java.security file in your JRE installation (typically found in the jre\lib\security directory).&amp;nbsp; The installed security providers are listed in that file as security.provider.x=… where ‘x’ is the priority used.&amp;nbsp; For Sun JRE installations, the first priority provider should be Sun’s.&amp;nbsp; E.g.: you should have the line “security.provider.1=sun.security.provider.Sun” in that file.&amp;nbsp; For other JRE's, please refer to the JRE's documentation regarding their&amp;nbsp;default provider name.&amp;nbsp; We recommend when using the IBM JRE to specify the "com.ibm.jsse.IBMJSSEProvider" as the first security provider to use.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoListParagraph style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1"&gt;&lt;SPAN style="mso-fareast-font-family: Calibri; mso-bidi-font-family: Calibri"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT face=Calibri size=3&gt;2)&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;FONT face=Calibri size=3&gt;Next, make sure that the classpath points to the correct JAR files (in the jre\lib directory) for use with those providers.&amp;nbsp; For Sun, the classpath should include jsse.jar.&amp;nbsp; For IBM,&amp;nbsp; should include ibmjsse.jar.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face=Calibri size=3&gt;If either the classpath or the java.security file is not correct, SSL will not work.&amp;nbsp; Not just with SQL Server, but with anything else either.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;B&gt;&lt;FONT face=Calibri size=3&gt;SSL works for other apps, just not with JDBC.&amp;nbsp; And I’ve verified that the classpath is correct… Check certificates&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face=Calibri size=3&gt;If you are going to configure SQL Server to use a server certificate, then that certificate needs (or the certificate of one of its trusted issuing authorities) needs to be present in Java’s certificate store.&amp;nbsp; If the certificate isn’t there, chances are that your JSSE provider will give you a nice descriptive, if sometimes cryptic, error.&amp;nbsp; Configuring the client for use with SSL is covered in our docs here &lt;/FONT&gt;&lt;A href="http://msdn2.microsoft.com/en-us/library/bb879943.aspx" mce_href="http://msdn2.microsoft.com/en-us/library/bb879943.aspx"&gt;&lt;FONT face=Calibri color=#0000ff size=3&gt;http://msdn2.microsoft.com/en-us/library/bb879943.aspx&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Calibri size=3&gt; .&amp;nbsp; Some certificates are quite large and trip up older&amp;nbsp;JSSE providers.&amp;nbsp; Of course there may be other VMs out there with similar problems,&amp;nbsp;but we are not able to verify all of them. &amp;nbsp;A smaller certificate may help in this case.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;B&gt;&lt;FONT face=Calibri size=3&gt;Not a configuration problem or a certificate problem.&amp;nbsp; Now what.&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face=Calibri size=3&gt;When contacting Microsoft to help us&amp;nbsp;be effective, we need to be armed with the following info:&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoListParagraph style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l1 level1 lfo2"&gt;&lt;SPAN style="mso-fareast-font-family: Calibri; mso-bidi-font-family: Calibri"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT face=Calibri size=3&gt;1)&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;FONT face=Calibri size=3&gt;The &lt;U&gt;complete&lt;/U&gt; text of the error message.&amp;nbsp; I.e. including the part after “Error: …” above.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoListParagraph style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l1 level1 lfo2"&gt;&lt;SPAN style="mso-fareast-font-family: Calibri; mso-bidi-font-family: Calibri"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT face=Calibri size=3&gt;2)&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;FONT face=Calibri size=3&gt;A stack trace (if available).&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoListParagraph style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l1 level1 lfo2"&gt;&lt;SPAN style="mso-fareast-font-family: Calibri; mso-bidi-font-family: Calibri"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT face=Calibri size=3&gt;3)&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;FONT face=Calibri size=3&gt;A &lt;U&gt;complete&lt;/U&gt; log (if available) containing FINEST TDS-level traces leading up to the error.&amp;nbsp; In particular, the following loggers should be enabled in the logging properties:&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 1in"&gt;&lt;FONT face=Calibri size=3&gt;com.microsoft.sqlserver.jdbc.TDSChannel.level = FINEST&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 1in"&gt;&lt;FONT face=Calibri size=3&gt;com.microsoft.sqlserver.jdbc.TDSReader.level = FINEST&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 1in"&gt;&lt;FONT face=Calibri size=3&gt;com.microsoft.sqlserver.jdbc.TDSWriter.level = FINEST&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 1in"&gt;&lt;FONT face=Calibri size=3&gt;com.microsoft.sqlserver.jdbc.TDS.DATA.level = FINEST&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face=Calibri size=3&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; Generating the log file with the XMLFormatter is preferred over SimpleFormatter, as it gives us more info.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoListParagraph style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l1 level1 lfo2"&gt;&lt;SPAN style="mso-fareast-font-family: Calibri; mso-bidi-font-family: Calibri"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT face=Calibri size=3&gt;4)&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;FONT face=Calibri size=3&gt;The java.security file that was used.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoListParagraph style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l1 level1 lfo2"&gt;&lt;SPAN style="mso-fareast-font-family: Calibri; mso-bidi-font-family: Calibri"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT face=Calibri size=3&gt;5)&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;FONT face=Calibri size=3&gt;Vendor and version of the JRE used.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoListParagraph style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l1 level1 lfo2"&gt;&lt;SPAN style="mso-fareast-font-family: Calibri; mso-bidi-font-family: Calibri"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT face=Calibri size=3&gt;6)&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;FONT face=Calibri size=3&gt;SQL Server version&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoListParagraph style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l1 level1 lfo2"&gt;&lt;SPAN style="mso-fareast-font-family: Calibri; mso-bidi-font-family: Calibri"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT face=Calibri size=3&gt;7)&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;FONT face=Calibri size=3&gt;The connection string/connection properties used.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;B&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face=Calibri size=3&gt;David Olix &amp;amp; Jimmy Wu&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face=Calibri size=3&gt;SQL Server JDBC Team&lt;/FONT&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8938263" 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></item><item><title>SQL Server JDBC driver v2.0 beta is now available</title><link>http://blogs.msdn.com/jdbcteam/archive/2008/07/23/sql-server-jdbc-driver-v2-0-beta-is-now-available.aspx</link><pubDate>Wed, 23 Jul 2008 21:48:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8767550</guid><dc:creator>dpblogs</dc:creator><slash:comments>14</slash:comments><comments>http://blogs.msdn.com/jdbcteam/comments/8767550.aspx</comments><wfw:commentRss>http://blogs.msdn.com/jdbcteam/commentrss.aspx?PostID=8767550</wfw:commentRss><description>&lt;P&gt;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.&amp;nbsp; 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.&lt;/P&gt;
&lt;P&gt;The beta driver is available at &lt;A href="http://msdn.microsoft.com/data/jdbc" mce_href="http://msdn.microsoft.com/data/jdbc"&gt;http://msdn.microsoft.com/data/jdbc&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;We welcome all feedback as we continue to improve this driver for the community.&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=8767550" 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/General/default.aspx">General</category><category domain="http://blogs.msdn.com/jdbcteam/archive/tags/Announcement/default.aspx">Announcement</category></item></channel></rss>