Get the App
SLTechnology News&Howtos  ›  Database  › 

How to use Oracle Instant Cl for PL/SQL

Shulou Source: shulou.com Published: 2022-05-31 14:42:12 10月04日 Update

This article mainly shows you "PL/SQL how to use Oracle Instant Cl", the content is easy to understand, clear, hope to help you solve your doubts, the following let the editor lead you to study and learn "PL/SQL how to use Oracle Instant Cl" this article.

1. Download Oracle Instanct Client (Oracle Instant client)

Log on to the official Oracle website and download the Oralce instant client. You can see the clients of different systems, choose the corresponding version according to your needs, download it, and extract it to a certain path. Such as "D:\ Program Files\ instantclient_12_1".

two。 Configure Oracle Instanct Client environment variables

2.1 in the system environment variables, add the following environment variables

# locale variable of Oracle (National Language Support)

NLS_lANG=SIMPLIFIED CHINESE_CHINA.ZHS16GBK

# TNS environment variable

TNS_ADMIN=D:\ Program Files\ instantclient_12_1\ ADMIN

# Oracle Instant installation directory (appended in PATH path)

PATH=...;D:\ Program Files\ instantclient_12_1

2.2 create a tnsnames.ora database connection file

Under the "D:\ Program Files\ instantclient_12_1\ ADMIN" path, create a tnsnames.ora file and add database connection configuration information in the following format:

FAVBLOG-TST = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.1.100) (PORT = 1521)) (CONNECT_DATA = (SID = favccxx) (SERVER = DEDICATED)) FAVBLOG-DEV = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.1.101) (PORT = 1521)) (CONNECT_DATA = (SID = orcl) (SERVER = DEDICATED)

3. Configure PL/SQL

Open PL/SQL and select "Tools"-> "Perference"-> "Connection", as shown in the following figure.

Enter the installation path for Oracle Instant Client in Oracle Home (optional).

In OCI library, enter the path to the oci.ddl in the 32-bit Oracle Instant Client (required, 32-bit).

4. Use PL/SQL

Restart PL/SQL, in the main object window, you can see the "Objects" component in the list on the left, where you can switch the administrator account, or you can view the table you have connected to in the TABLES menu. Then you can use PL/SLQ.

The above is all the content of the article "how PL/SQL uses Oracle Instant Cl". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Tags: Variables environment path content customer client article configuration data database file system learning help input selection different next information official Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Huawei MariaDB MySQL OPPO Reno Linux