[Oracle] Use SQL Developer to connect to Oracle database

Preface

SQL Developer is a free database development tool officially launched by Oracle. It provides rich database development functions, including the function of connecting to Oracle database.

In this article, we will explain in detail how to use SQL Developer to connect to the Oracle database from many aspects.

1. Preparation work

Before connecting to the Oracle database, you need to do some preparations, including installing SQL Developer and Oracle database.

1. Install SQL Developer

The SQL Developer official website provides multiple versions for download, and you can choose to download according to your own operating system version. After the download is complete, unzip and run sqldeveloper.exe to start SQL Developer.

2. Install Oracle database

Before connecting to the Oracle database, you need to install the Oracle database first. Oracle provides multiple versions of the database, including Enterprise Edition, Standard Edition, and Developer Edition. When installing the Oracle database, you should select a database version that matches your SQL Developer version.

2. Connect to Oracle database

After installing SQL Developer and Oracle database, let's explain how to connect to Oracle database.

1. Open SQL Developer

After installing SQL Developer, double-click sqldeveloper.exe to open SQL Developer.

2. Connect to the database

Click the "New Connection" button on the SQL Developer toolbar to open the new connection window. In this window, you need to fill in the relevant information for connecting to the database, including user name, password, host name, port number, service name, etc. After filling in the relevant information, you can click the Test Connection button to test.

3. Access the database

After the connection is successful, you can see the relevant information of the database in the left navigation bar. The database can be accessed through SQL Worksheet or other SQL development functions.

3. SQL development functions

SQL Developer provides a wealth of SQL development functions, including SQL Worksheet, object browser, database management, etc.

1、SQL Worksheet

SQL Worksheet is the most commonly used function in SQL Developer, through which SQL statements can be executed. In SQL Worksheet, you can write SQL statements and execute them directly. After execution, you can view the results, including query results, execution plan, etc.

-- 查询所有表 
SELECT table_name FROM user_tables;


-- 查询表结构
DESC user_tables;

2. Object browser

Object Browser can view all objects in the database, including tables, views, procedures, etc. You can view and manage objects in the database through this function.

3. Database management

The database management function can manage and maintain the database, including backup, restore, performance monitoring, etc.

4. Summary

It is very simple to use SQL Developer to connect to the Oracle database. You only need to install SQL Developer and the Oracle database, and then connect to the database through the connection function provided by SQL Developer. At the same time, SQL Developer provides rich SQL development functions, which can facilitate developers to develop and manage databases.

Guess you like

Origin blog.csdn.net/u011397981/article/details/132912281