Do not install ORACLE locally, use PLSQL to access remote databases

ORACLE installation is more troublesome. I needed to use oracle once, but I didn’t want to install an oracle separately for this matter, so I searched online for a way to not install ORACLE, but only use PLSQL to connect to remote ORACLE for use. I found a few articles, not simplifying The steps are less configuration, so I took a blank machine and tested it, and it was successful. The special record is as follows (borrowed most of the steps from others)


1. First download the Instant Client from the Oracle website:

http://www.oracle.com/technetwork/database/features/instant-client/index-097480.html

Choose a different Instant Client version according to your operating system

The download will be a compressed file. The decompressed folder is called: instantclient_12_1. Put it in the directory you like. For example: E:\Program Files\PLSQL Developer\instantclient_12_1
2. Create a new directory NETWORK in the E:\Program Files\PLSQL Developer\instantclient_12_1 directory, create a new ADMIN directory in the NETWORK directory, and create a new file tnsnames.ora in the ADMIN directory,

Open it with a text editor and write the following:

连接名 =
(DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.1 )(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVICE_NAME =
ORCL)    )  
)
The first yellow block: Indicates the local host name that defines the remote server (enter it at will, it will be displayed in the database drop-down list in PLSQL)

The second yellow block: the IP address of the remote database

The third yellow sub-block: remote database instance name


Right click on My Computer and select " Properties " -> " Advanced " -> " Environment Variables " -> " System Variables "
Add the following two variables
TNS_ADMIN    E:\Program Files\PLSQL Developer\instantclient_12_1\network\admin

NLS_LANG    SIMPLIFIED CHINESE_CHINA.ZHS16GBK

5. Download and install PL.SQL.Developer configuration application
configuration tools->preferences->connection

Oracle Home
E:\Program Files\PLSQL Developer\instantclient_12_1

OCI library

E:\Program Files\PLSQL Developer\instantclient_12_1\oci.dll


6. Close PL/SQL Developer and restart Developer.

The host name will appear in the list of PL/SQL Developer, enter the user name and password, you can log in to the remote oracle 11g database.


Guess you like

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