Jeff Longland

Relax, don't worry – have a home brew!

Connecting to SQL Server from SQL Developer on a Mac

leave a comment »

I just spent a couple of hours trying to get SQL Developer (4.0.0.13) to authenticate to SQL Server 2012 using Windows authentication from OS X (Mavericks). Although SQL Developer prompts for a domain and whether you want to use Windows authentication, it appears to ignore those settings on OS X. Hopefully this is useful to someone else in the future. Here’s what worked for me, after reading this fellow’s instructions and stackoverflow.

1. Edit the SQL Developer connections file: /Users/<username>/.sqldeveloper/system4.0.0.13.80/o.jdeveloper.db.connection.12.1.3.0.41.131202.1730/connections.xml
2. Modify the JDBC connection string to pass useNTLMv2=true and domain=<domain>

<StringRefAddr addrType=”customUrl”>
<Contents>jdbc:jtds:sqlserver://<hostname>:<port>;useNTLMv2=true;domain=<domain></Contents>
</StringRefAddr>

3. Save the file and start SQL Developer. You should be able to connect.

Similarly for Pentaho Data Integration (e.g. spoon), you need to pass the same params to the driver:

  • Connection Type: MS SQL Server (not the Native driver)
  • Under Options, create parameters for useNTLMv2 and domain.
Advertisements

Written by jlongland

May 25, 2015 at 3:27 pm

Posted in Uncategorized

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: