As we all know, to connect to Oracle using PL/SQL, you need to install the Oracle client software. Have you ever wondered whether to directly connect to Oracle without installing the Oracle client?
You only need to download a software named Instant Client package in Oracle. This software does not need to be installed. You only need to decompress the package and can use it easily, even if the system is reinstalled, it can still be used.
: Http://www.oracle.com/technology/software/tech/oci/instantclient/htdocs/winsoft.html
Download the Instant Client package-Basic Package. Decompress the package to any directory, create a network folder under the directory, create an admin folder under the folder, and create a tnsnames. ora file in the Admin directory. The content is as follows:
Orcl =
(Description =
(Address_list =
(Address = (Protocol = TCP) (host = 192.168.1.1) (Port = 1521 ))
)
(CONNECT_DATA =
(SERVICE_NAME = orcl )
)
)
For example:
Lilo =
Extproc_connection_data =
According to your actual configuration, F: \ oracleclient is actually the path of the downloaded package.
Set nls_lang = simplified chinese_china.zhs16gbk
Plsqldev.exe
This character set refers to the server-side character set.
--
Set nls_lang = simplified chinese_china.zhs16cgb231280
Set nls_lang = simplified chinese_china.zhs16gbk
Set nls_lang = simplified chinese_china.utf8
# Tnsnames. ora network configuration file: C: \ oracle \ ora90 \ Network \ admin \ tnsnames. ora
# Generated by Oracle configuration tools.
(Description =
(Address_list =
(Address = (Protocol = TCP) (host = 192.168.36.1) (Port = 1521 ))
)
(CONNECT_DATA =
(SERVICE_NAME = sname)
)
)
(Description =
(Address_list =
(Address = (Protocol = IPC) (Key = extproc0 ))
)
(CONNECT_DATA =
(SID = plsextproc)
(Presentation = Ro)
)
)
Here, you can configure it based on your actual situation. Then open PL/SQL and set OCI library and ORACLE_HOME in perference. My settings are OCI library = F: \ oracleclient \ OCI. dll, ORACLE_HOME = F: \ oracleclient.
The configuration is basically complete, and a bat batch is done to solve the character set garbled:
Write a batch of PLSQL. BAT and place it in the installation directory of plsqldeveloper. The content is as follows:
Permanent character set:
Set nls_lang = simplified chinese_china.zhs16cgb231280
Set nls_lang = simplified chinese_china.zhs16gbk
Set nls_lang = simplified chinese_china.utf8
Note:
Instantclient-basic-win32-11.1.0.6.0.zip-this is a version that supports Oracle 9i and above (excluding Oracle9i)
Instantclient-basic-win32-10.2.0.1.zip-This supports Oracle8i and Oracle9i.