none
Accessing SQL Server 10.00.1600 using JDBC

    Question

  • Hi!

    After browsing and reading a bunch of related messages/pages, I'm not able yet to conclude if I'm trying something impossible or I'm doing something wrong!

    Here the environment:

    1. Mac Pro running Mac OS X 10.6.8 and Java as...

    Ricardo-Rodriguezs-Mac-Pro:~ rrodriguez$ java -version
    java version "1.6.0_37"
    Java(TM) SE Runtime Environment (build 1.6.0_37-b06-434-10M3909)
    Java HotSpot(TM) 64-Bit Server VM (build 20.12-b01-434, mixed mode)
    Ricardo-Rodriguezs-Mac-Pro:~ rrodriguez$

    2. Remote MS SQL Server 10.00.1600

    3. I can access this SQL Server database without a glitch by using Navicat Premium and configuring a connection with Windows Authentication.

    4. I'm trying to get a connection by using a JDBC driver from R and RazorSQL. Authentication fails.

    5. This is the error message I get when trying to connect from R...

    > drv <- JDBC("com.microsoft.sqlserver.jdbc.SQLServerDriver", "/etc/enu/sqljdbc_2.0/sqljdbc4.jar")
    > conn <- dbConnect(drv, "jdbc:sqlserver://69.114.1.244;integratedSecurity=true", "rrodfera", "shakira69")
    Error in .jcall(drv@jdrv, "Ljava/sql/Connection;", "connect", as.character(url)[1],  : 
      com.microsoft.sqlserver.jdbc.SQLServerException: This driver is not configured for integrated authentication. ClientConnectionId:b62ebeb1-d6b3-47a0-8136-b86b352b4e41

    PLEASE, must I be able to connect to a SQL Server database from a Mac OS X box running any flavor or JDBC driver? If yes, please, could you point me in the right direction? Where could I get information about the syntax and the versión I must use? I've also browsed the documentation attached with the driver I'm trying, but I'm not able to find if I must be able or not to connect in my environment!

    Thank you so much for your help!

    Ricardo

    Thursday, October 25, 2012 11:01 AM

Answers

  • Thanks, Iric! The problem was solved thanks to some colleagues out there and RazorSQL! It gives me the clues to construct the right chain. Please, follow this link to Thusitha Mabotuwana's Blog

    http://tinyurl.com/9kjfxac

    I've a user in the windows domain used by SQL Server and I can now access the database from R without a glitch!

    Please, accept my apologies for not posting before this solution here!

    Thanks for your help!

    Ricardo

    Monday, October 29, 2012 11:37 AM

All replies

  • Hi Ricardo,

    In latest Microsoft JDBC Driver 4.0 for SQL Server download page: http://www.microsoft.com/en-us/download/details.aspx?id=11774

    We can see that the supported OS are: Linux, Unix, Windows 7, Windows Server 2008 R2, Windows Vista, the list above is an example of some of the supported operating systems. The JDBC driver is designed to work on any operating system that supports the use of a Java Virtual Machine (JVM). However, only Sun Solaris, SUSE Linux, and Windows operating systems have been tested.

    I would like suggest you to check following items:

    1. The SQL Server database should be configured to accept TCP/IP connections. Many SQL Server installations are set up to only allow shared memory or named pipe access. You can setup the TCP/IP option using a tool like the SQL Server Configuration manager. Under Network Configuration there should be an option for Protocols. One of those protocols is TCP/IP . Make sure to enable TCP/IP.

    2. If the user connecting to the database does not have a valid user id and password for the windows domain used by SQL Server, mixed mode authentation would need to be enabled on the SQL Server instance, and an administrator would need to create a SQL Server user id and password for the user connecting to the instance.

    Thanks,


    Iric Wen

    TechNet Community Support

    Monday, October 29, 2012 6:07 AM
  • Thanks, Iric! The problem was solved thanks to some colleagues out there and RazorSQL! It gives me the clues to construct the right chain. Please, follow this link to Thusitha Mabotuwana's Blog

    http://tinyurl.com/9kjfxac

    I've a user in the windows domain used by SQL Server and I can now access the database from R without a glitch!

    Please, accept my apologies for not posting before this solution here!

    Thanks for your help!

    Ricardo

    Monday, October 29, 2012 11:37 AM