
Open Sourcing the Microsoft JDBC Driver and Maven Support - carey
https://blogs.msdn.microsoft.com/jdbcteam/2016/11/17/open-source-jdbc-maven/
======
sehrope
Finally!

Having dealt with _many_ database drivers over the years, I can say first hand
that closed source drivers are the bane of my existence. The only thing worse
than running into a deep-in-the-stack bug in a database driver is one that you
can't correct, let alone debug properly.

Regardless of your views on closed source software on the server side of
things, it's a disservice to your customers to not have open source client
side drivers. The secret sauce is always on the server side so it doesn't buy
you anything. At best there's (very poor) argument for security through
obscurity or you're doing something silly like hiding server side features
behind client side feature flags.

Plus the more tech savvy of your users will directly contribute back to
improve the driver. This is both for fixing existing bugs and adding features
to support existing database server features. In this particular case, I've
got a laundry list of things I'd like corrected / added / improved in the SQL
Server JDBC driver. Had it been open sourced a few years back, I would have
already done them myself.

Unless there's a legal restriction for not doing so, like say not owning the
original source, there's no good reason not to open source the client side of
things.

~~~
douche
> the bane of my existence

This reminds me far too much of the .NET DB2 drivers. What a steaming pile,
not to mention having to navigate the labyrinth of the IBM download site to
even find it in the first place.

~~~
snuxoll
You know what's worse? DB2 for iSeries. Pisses me off to no end that pulling
JTOpen from Maven is crazy easy, but if you want to access your data from any
other language prepare to shell out thousands of dollars for "DB2 Connect"
(per server!) because it's totally incomprehensible that even though you've
already payed through the nose for IBM i that you shouldn't be charged for
accessing the data anywhere else.

~~~
koolba
Usually plays out something like this:

"Hi $BIG_COMPANY, we'd like to expand our usage of $SOFTWARE that we've
already got a $BIG_MONEY license for. Where can we get client drivers for a
new app that will use it?"

"Hi $CUSTOMER, that's great news. Send us a check for $MORE_MONEY and we'd be
happy to help."

"Hi $BIG_COMPANY, to clarify, we're already paying $BIG_MONEY for a license
for the server and we'd like to expand our usage of it. That means in the
longer term we'd be more entrenched into using it and would likely renew your
contract."

"Hi $CUSTOMER, that's great news. Send us a check for $MORE_MONEY and we'd be
happy to help."

------
ysleepy
Yay... Isnt everyone using jTDS anyway because it is reliably faster?

[https://social.msdn.microsoft.com/Forums/en-
US/36e7b9cf-5bc5...](https://social.msdn.microsoft.com/Forums/en-
US/36e7b9cf-5bc5-445d-874c-1d6f8e819b63/ms-jdbc-driver-performance-
observations-versus-jtds?forum=sqldataaccess)

[http://stackoverflow.com/questions/7848213/why-is-jtds-
faste...](http://stackoverflow.com/questions/7848213/why-is-jtds-faster-than-
microsoft-jdbc-driver)

Edit: seems like they fixed their abysmal performance after 5years in jan
2016; see stackoverflow comment.

~~~
starnixgod
The jTDS project is dying, there has not been a new release in over 3 years
despite some pretty significant bugs.

[https://sourceforge.net/p/jtds/discussion/129584/thread/050f...](https://sourceforge.net/p/jtds/discussion/129584/thread/050f9892/)

~~~
ysleepy
Yeah, maybe we'll switch as well now.

But I just cant stand the loving hype for MS here. They gave out such horrible
and dog slow drivers to their paying customers that people reverse engineered
the protocol and wrote their own. And it still performs very well.

Now that MS publishes this codebase (which should have been standard, or at
least best, practice), they get showered with love.

Like an abusive relationship where one is happy and extatic if the abuser is
reasonably nice for a day.

~~~
jarjoura
You don't need to reverse engineer the protocol. TDS is an open spec on their
website.

~~~
ysleepy
SQL Server TDS spec was published in 2008, when jTDS was in version 1.2 and
already feature complete and stable.

------
farnulfo
Static code analysis with SonarQUBE :
[https://sonarqube.com/dashboard/index?id=com.microsoft.sqlse...](https://sonarqube.com/dashboard/index?id=com.microsoft.sqlserver%3Amssql-
jdbc)

------
hugi
Yay! Just… Yay!

Now it's your turn, Oracle.

~~~
pionar
> Now it's your turn, Oracle.

That'll never happen. They're too busy trying to make the open source projects
they inherited from Sun (MySQL, Java) closed source again.

~~~
Akonkagva
Doing good job there. MySql dead. Java bloated in politics...

~~~
monknomo
Java started out bloated in politics, so I don't know if it is fair to blame
Oracle for that.

Still not totally happy with their direction on Java

------
0xmohit
Nice. Microsoft seems to be open-sourcing a fair bit of stuff lately.

However, unlike their other repos there are a couple of things that strike
out. The code isn't even consistently formatted. There are parts that make you
say ouch.

~~~
josteink
Sounds like a simple PR to issue and get approved for free internet open-
source points? :)

------
maaaats
How did people use this before if it wasn't in the Maven Central Repo?

I know it's _possible_ to not use mvn, just wondering what people did in cases
like this where a possibly major component in the stack was unavailable. Most
big stuff in Java can be found in mvn, and if not we often end up using an
alternative. But that's not so easy for a driver.

~~~
jayd16
Run a company maven repo. Make an internal maven plugin with what you need and
add it to the company repo.

~~~
eropple
Or just have a bash script that installs it to the local Maven repository
first.

Not recommended, but plenty of folks do it.

------
userbinator
Microsoft has been open-sourcing a lot lately, but it seems to be mostly
"peripheral" software...

 _The JDBC driver can be used to connect to SQL anywhere. Use it to connect to
SQL Server (on-prem or in the cloud), Azure SQL Database, and Azure SQL Data
Warehouse._

...associated with the use of their commercial products.

~~~
vishbar
> Microsoft has been open-sourcing a lot lately, but it seems to be mostly
> "peripheral" software...

How is .NET Core peripheral software? If anything it enables developers with
C# codebases to move _away_ from Microsoft's commercial products.

~~~
erikbye
And they've open sourced a lot more than just .NET Core.

[https://github.com/Microsoft/dotnet](https://github.com/Microsoft/dotnet)

~~~
WorldMaker
[http://microsoft.github.io](http://microsoft.github.io) is a metasite with
links to most of the Microsoft GitHub organizations and repositories. You can
spend days flipping through all of it.

~~~
abiox
the carousel on top has four pips but three items. my ocd is at critical
levels right now. (possibly something got filtered since i'm at work)

~~~
erikbye
Here’s another overview:

[https://opensource.microsoft.com/](https://opensource.microsoft.com/)

------
haddr
Oh, this driver was really troublesome!

I remember we had once revert to java 6, because we couldn't get connectivity
in Java 7 with SQL Server through their JDBC Driver... It took days to figure
it out...

------
SloopJon
This is really cool. I'd like to see a lot more in the test directory, though.
Can any MSFTies here describe how this is tested?

------
Akonkagva
wooohoo... 20 years later

------
cobookman
First off kudos to microsoft for open sourcing their JDBC driver.

I would have figured microsoft would have used a linter to fix style issues
with their code before Open Sourcing. E.x:
[https://github.com/Microsoft/mssql-
jdbc/blob/master/src/main...](https://github.com/Microsoft/mssql-
jdbc/blob/master/src/main/java/com/microsoft/sqlserver/jdbc/SQLServerColumnEncryptionJavaKeyStoreProvider.java#L81)

Anyone know if microsoft is going to specify their java style guide.

~~~
romanovcode
Microsoft is a tech company just like many others. You can nitpick all you
want but all companies have imperfect code and it is normal.

~~~
cobookman
Sure. I don't fault them. Just curious that Microsoft doesn't force a linter
on devs. At google we generally force style guide compliance.

~~~
romanovcode
My guess is that this code is pretty old.

