Note:
- This tutorial requires access to Oracle Cloud. To sign up for a free account, see Get started with Oracle Cloud Infrastructure Free Tier.
- It uses example values for Oracle Cloud Infrastructure credentials, tenancy, and compartments. When completing your lab, substitute these values with ones specific to your cloud environment.
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.
- Install MSSQL server and keep login and database user details handy.
- Install Oracle SQL Developer. Extract the zip that you received and launch the SQL Developer Tool.
- 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
-
After launching SQL developer, click Tools.
-
Select Preferences.
-
Expand Database.
-
Select Third party JDBC Driver.
-
Click Add Entry and select the jar file as shown in the following image.
-
Cross check if TCP/IP port is enabled on the MSSQL Server.
-
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.
-
Launch the New Database Connection wizard by clicking on the + icon as shown in the following image.
-
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.
After you have successfully connected to MSSQL Server using SQL Developer, you can open the query window and execute commands.
Related Links
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.
Connect to Microsoft SQL Server database on Oracle Cloud Infrastructure using Oracle SQL Developer
F85281-01
August 2023
Copyright © 2023, Oracle and/or its affiliates.