But only second option can be used on mac and linux machines. Here is nice stackoverflow thread.
Most of the people suggest to use microsoft sql java driver. But there is a case when this will not help – windows domain authentification. In this situation I found the only working solution is to use nice jTDS. It not only solve this problem, but also outperform Microsoft JDBC Driver.
So to use it you have to:
Install rJava. There are a lot of manuals for diffrent OS on the internet.