Get the App
SLTechnology News&Howtos  ›  Database  › 

Connect to an oracle 11g remote database using instantclient_11_2 and PL/SQL Developer toolkits

Shulou Source: shulou.com Published: 2022-06-01 09:06:25 11月15日 Update

1. Go to the Oracle website to download Instant Client:

Http://www.oracle.com/technology/global/cn/software/tech/oci/instantclient/index.html

Choose different versions of Instant Client according to your operating system

Download back is a compressed file, the decompressed folder is called: D:/instantclient_11_2. Just put it in your favorite directory. For example: D:/instantclient_11_2

two。 Create a new directory network under the D:/instantclient_11_2 directory, a new admin directory under the network directory, and a new file tnsnames.ora under the admin directory. Use a text editor to open and write the following:

MWDB=

(DESCRIPTION =

(ADDRESS_LIST =

(ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.0.58) (PORT = 1521))

)

(CONNECT_DATA =

(SERVICE_NAME = MWDB)

)

)

The first × × block: represents the local hostname that defines the remote server

Second × × block: remote database instance name

3. Add an environment variable named TNS_ADMIN, whose value is the path where the tnsnames.ora file is located. For example, my local computer is: D:/instantclient_11_2/network/admin

4. Set the language of ORACLE, add the environment variable NLS_LANG, and the value is SIMPLIFIED CHINESE_CHINA.ZHS16GBK

If you don't know the ORACLE language of the remote database, you can ssh or telnet to the remote machine, enter it in the command interface, and use the command line to connect to the database.

Select * from nls_instance_parameters

View the value of NLS_LANGUAGE

NLS_LANGUAGE

NLS_TERRITORY

5. Download and install the PL.SQL.Developer configuration application

Configure tools- > preferences- > connection

Oracle Home

D:/instantclient_11_2

OCI library

D:/instantclient_11_2/oci.dll

PL/SQL Developer in Chinese is

Tools-- > preferences-- > connections

Oracle home directory

D:/instantclient_11_2

OCI library

D:/instantclient_11_2/oci.dll

6. Close PL/SQL Developer and restart Developer.

The hostname will appear in the PL/SQL Developer list. Enter the user name and password to log in to the remote oracle 11g database.

Tags: Directory data database file host variable command environment language input configuration tool different clear operating system content instance password is Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Linux NVidia vpn Microsoft Shulou Tech Info