Note:

Connect to Microsoft SQL Server database on Oracle Cloud Infrastructure using Oracle SQL Developer

Introduction

Oracle Cloud Infrastructure (OCI) is a set of complementary cloud services that enable you to build and run a range of applications and services in a highly available hosted environment.

Oracle SQL Developer is a free, integrated development environment that simplifies the development and management of Oracle Database in both traditional and Cloud deployments.

You can connect Microsoft SQL Server database on OCI using Oracle SQL Developer and execute queries.

Objective

Connect to MSSQL server in OCI using Oracle SQL Developer and execute queries in the query window.

Prerequisites

An understanding of Autonomous Database and Database Actions Page.

  1. Install MSSQL server and keep login and database user details handy.
  2. Install Oracle SQL Developer. Extract the zip that you received and launch the SQL Developer Tool.
  3. In order to add an utility in SQL Developer, download the jTDS - SQL server JDBC driver. Once you have the jTDS driver installed on your system, extract and save it in the same location.

Task 1: Connect to MSSQL server in OCI using Oracle SQL Developer

  1. After launching SQL developer, click Tools.

    Setup 1

  2. Select Preferences.

  3. Expand Database.

  4. Select Third party JDBC Driver.

  5. Click Add Entry and select the jar file as shown in the following image.

    Setup 2

  6. Cross check if TCP/IP port is enabled on the MSSQL Server.

    Setup 3

  7. Important: Copy ntlmauth.dll from the jtds folder location: \jtds-1.3.1-dist\x86\SSO to the SQL Developer folder location: sqldeveloper\jdk\jre\bin.

    Note: If you skip Step 7, you might get an error while listing the database or connecting to the MSSQL server database.

  8. Launch the New Database Connection wizard by clicking on the + icon as shown in the following image.

    Setup 4

  9. In the New / Select Database Connection window, provide the following details.

    a. Select Database Type as SQLServer.

    b. Hostname value is taken as localhost in sample environment.

    c. Default port number for MSSQL server is 1433.

    d. Click Retrieve database to fetch database details.

    e. Click Test and make sure Status: Success is displayed as indicated by g in the image.

    f. Click Connect to connect to the session.

    g. Test connection success message is displayed.

    Setup 5

After you have successfully connected to MSSQL Server using SQL Developer, you can open the query window and execute commands.

Setup 6

Acknowledgments

Author - Mukund Bhashkar (Senior Cloud Solutions Engineer at Oracle)

More Learning Resources

Explore other labs on docs.oracle.com/learn or access more free learning content on the Oracle Learning YouTube channel. Additionally, visit education.oracle.com/learning-explorer to become an Oracle Learning Explorer.

For product documentation, visit Oracle Help Center.