Oracle client installation and configuration

It is often necessary to connect to the Oracle database during development. The general scenario is that the Oracle database is on a remote server, and the local computer is accessed through plsql developer.

This requires plsql developer to be installed locally, but is this enough? This is not possible. plsql developer cannot directly access and operate the Oracle database on the server, and it needs to be transferred through the Oracle client in the middle. Here is how to install and configure plsql developer and Oracle client.

1. Install Oracle client Oracle instant client
Take instan tclien t_11_2 as an example.
  • First download instantclient_11_2 from the Internet , decompress it and put it in the root directory of the D drive.
  • Add D: \instantclient_11_2 to the system environment variable Path .
  • Check if there is a tnsnames.ora file in the D:\instantclient_11_2\network\ADMIN directory, if not, create one. The contents of tnsnames.ora are as follows:

orcl36 =

  (DESCRIPTION =

    (ADDRESS_LIST =

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

    )

    (CONNECT_DATA =

      (SERVICE_NAME = orcl)

    )

  )

  • This is a connection string setting, which represents the server IP and database name of the database to be connected. The red part needs to be set by yourself. orc36 is a connection name defined by itself, which can be set arbitrarily. After setting, when using plsql developer, you don't need to write IP and database name when logging in, just select orcl36 directly as below, it will go to tnsnames.ora file to find orcl36 settings, extract IP and database name to log in. Multiple database settings can be written in the nsnames.ora file, and multiple database options can be selected when logging in, which is very convenient.
 
  • Then copy the green free-to-install version of plsql developer to the root directory of the D drive, and click Run to use it normally.
 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324592978&siteId=291194637