plsql does not use oracle client to use oracle

(1) Download and unzip Unzip
the downloaded file instantclient-basic-win32-11.2.0.1.0, and place the unzipped folder instantclient_11_2 under C:\Program Files
(2) Environment variable settings
Configure environment variables, right-click "My Computer"-"Properties"-"Advanced"-"Environment Variables"-"System Variables", add the following content:
    1) Variable name: ORACLE_HOME
       Variable value: C:\Program Files\instantclient_10_2
   2) Variable name: TNS_ADMIN
       Variable value: C:\Program Files\instantclient_10_2
   3) Variable name: NLS_LANG
       Variable value: SIMPLIFIED CHINESE_CHINA.ZHS16GBK
   4) Modify the Path variable and add C:\Program Files\instantclient_10_2
(3) Add the network configuration file
in C:\ Add a network configuration file to Program Files\instantclient_10_2\NETWORK\ADMIN (manually added by NETWORK\ADMIN), create a new text file, name it tnsnames.ora (note that the extension is .ora, not txt), and write the following content:

# tnsnames.ora Network Configuration File: C:\Program Files\instantclient_11_2\NETWORK\ADMIN\tnsnames.ora
# Generated by Oracle configuration tools.

LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = prm1)(PORT = 1521))
     )
   )

SID_LIST_LISTENER =      
(SID_LIST =      
(SID_DESC =      
(GLOBAL_DBNAME = ora11g)      
(ORACLE_HOME = /oracle/app/product/11g/db)      
(SID_NAME = ora11g)
      )  
    )


ORCL =
   (DESCRIPTION =
     (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.1)(PORT = 1521))
     (CONNECT_DATA =
       (SERVER = DEDICATED)
       (SERVICE_NAME = orcl)
     )
   )
     The red font part is my personal settings, the ORACLE database server IP is 192.168.1.1, and the database service name is orcl.

(4) Open PLSQL Developer without logging in, click "Tools > Preferences":

    1) Configure "Oracle Home Directory Name" as the instantclient folder extracted in the third step

    2) Configure "OCI Library" as the one in the above directory oci.dll

(5) Log in to PLSQL Developer:

Enter the database user name, password, instance name (eg: 192.168.1.1:1521/orcl), select the connection type, and then it's OK! ! !

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326986763&siteId=291194637