9

I am using oracle sql developer to manage my oracle database. I recently added third party database jdbc drivers to be able to connect to my new MySQL and SQL Server installations. I need help with the right settings for the SQL Server connection i.e UserName, Host Name, Port including formats

2 Answers 2

11

I followed these instructions to add the jTDS Java library to Oracle SQL Developer. Basically it's about downloading the jTDS zip, unzipping it in some place you can reach later and then add the jTDS.jar as a JDBC third party driver in SQL Developer ((In the main menu) Tools > Preferences > (On the tree menu in the new window) Database > Third party JDBC drivers > Click on 'Add entry')

I was then able to use my credentials to connect to a SQL Server instance/database using the following connection details. I'm currently using Oracle Developer 4.0.1.14.

Oracle SQL Developer - SQL Server Connection

The default port for SQL Server instance is 1433, however your SQL Server instance may be running on a non default port. The following site has different methods to determine the port.

http://www.mssqltips.com/sqlservertip/2495/identify-sql-server-tcp-ip-port-being-used/

6
  • How would I connect to a SQL Server that is a named instance? For example, my jTDS connection string elsewhere would be: MYHOSTNAME:1433/MYPRODDB;instance=MYINSTANCE Dec 10, 2014 at 3:52
  • 1
    You determine the port of the named instance and use that instead of the default 1433. The actually name of the named instance is not used within the connection from SQL Developer.
    – hooinator
    Dec 11, 2014 at 21:38
  • How I could connect to a local instance? Like start a new database from scrath Feb 27, 2015 at 12:51
  • Connecting to a local instance would have the same requirements as a remote instance. Specify the local IP/hostname and the SQL Server port number. As for starting a new database, I'm assuming you're referring to creating a new database. You can login to SQL Server as the sa account with the master database and create a database using the "create database" statement.
    – hooinator
    Feb 27, 2015 at 16:58
  • @hooinator It's now the year 2020... Is this driver from 2013 still the correct route? All google searches related to accessing SQL Server from Oracle SQL Developer still seem to refer/link back to this driver which was last updated in 2013. Latest version here 1.3.1: sourceforge.net/projects/jtds/files/jtds/1.3.1 Jul 31, 2020 at 15:35
9

For a named instance, under port use "1433;instance=INSTANCENAME". Adjust port number accordingly.

2
  • 1
    This is sooooo underappreciated answer! There is no documentation at all regarding this feature of port input field... Apr 5, 2017 at 11:12
  • There has been a detailed description of use of the connection strings (at least to MS SQL) since the beginning of the year for the latest JDBC Driver. I have not looked for older versions....learn.microsoft.com/en-us/sql/connect/jdbc/…
    – htm11h
    Apr 11, 2017 at 15:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.