Oracle Database

How to Connect to Oracle Database 21c Using SQL Developer?

Oracle database is a widely used database around the globe due to its efficiency and scalability. The latest releases such as Oracle database 19c and Oracle database 21c are hosted on the cloud with additional features that make them multi-model databases. If users already have the latest Oracle database 21c and want to connect to it using any GUI tool. Oracle provides SQL Developer, a free GUI tool to connect to the Oracle database and manage it.

This post will provide a procedural guide to connect to the local Oracle database 21c using SQL Developer.

How to Connect to Local Oracle Database 21c Using SQL Developer?

To connect the local Oracle database 21c in Windows, follow the steps given below:

Step 1: Open SQL Developer from Start Menu

Search and open SQL Developer from the Start menu:

Step 2: Make a New Connection

To make a new connection, open the drop-down list by clicking on the “+” icon and click on the “New Database Connection” option:

Step 3: Provide the Local Oracle Database Details

A new prompt window is open, type the “Name” of the connection. Provide your local Oracle database “Username” and “Password” and leave the details of “Connection Type” as the default:

If users want to change the color of the connection name to make it look good in SQL Developer “Oracle Connections” list. To do so, open the “Color” drop-down list and select the desired color:

Step 4: Select the Role for Connection

SQL Developer also gives the choice of selecting the role, with whose privilege you want to connect with the database. To select any specific role, open the drop-down list of “Role” and select the role. For this post, the role will stay as “default”:

Step 5: Test the Connection

Once you are done with the setting of the database connection, click on the “Test” button to check the “Status” of the database connection:

Step 6: Connect to Local Oracle Database 21c

When the “Status” will change to “Success,” click on the “Connect” button:

The local Oracle database 21c has been connected. Then, the “SQL worksheet” will open automatically:

Once the local Oracle database 21c is connected, let us verify if the database is connected successfully or not.

Step 7: Commands to Verify Oracle Database is Connected

To show the list of all user tables from your Oracle database 21c, execute this command:

SELECT TABLE_NAME FROM user_tables;

The output depicts a list of all user tables from the local Oracle database 21c.

Run the command provided below to see the version of the connected Oracle database:

SELECT * FROM PRODUCT_COMPONENT_VERSION;

The output has provided the version details “21.0.0.0.0” of the local Oracle database 21c.

Conclusion

To connect to the local Oracle database 21c using SQL Developer, open the “+” drop-down list and click on the “New Database Connection” option in SQL Developer. A new prompt will open, provide your database username and password, and give a name for this connection. Click on the “Test” button and when “Status” will change to “Success,” click on the “Connect” button.

About the author

Nimrah Ch

I’m a technical writer with a Bachelor's in Software Engineering and Certification in Cyber Security. Through my research and writing, I strive to provide readers with in-depth, informative articles that can help them make informed decisions about their technological needs.