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?
In fact, I always wanted to do this, because this client is so annoying !!! Not only will JDK be installed, but it will also put itself at the beginning of the environment variable, which will cause a lot of trouble.
In fact, I have asked many people before, but they all said that the Oracle client must be installed... until yesterday, the following methods were accidentally discovered:
You only need to download oneCallThe instant client package can be installed without any need to decompress the package. It is very convenient and can be used even if the system is reinstalled.
: Http://www.oracle.com/technology/software/tech/oci/instantclient/htdocs/winsoft.html
Download this,Instant Client package-Basic Package. Decompress the package to any directory, create a network folder under the directory, and create the admin folder under the folder, and then create the tnsnames. ora file. The content is as follows:
oracledata =
(description =
(address_list =
(address = (Protocol = TCP) (host = yourhostip) (Port = 1521)
(CONNECT_DATA =
(SERVICE_NAME = yoursid)
)
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 = c: \ oracleclient \ OCI. dll, ORACLE_HOME = c: \ oracleclient.
According to your actual configuration, it is actually the path of the downloaded package. Another problem is that you need to set a character set so that the queried data will not be garbled. Write a batch of pldev. BAT and put it in the PL installation directory. The content is as follows:
Set nls_lang = simplified chinese_china.zhs16gbk
Plsqldev.exe
This character set refers to the server-side character set. Please configure it according to the actual situation.
at last, double-click this batch, enter your account and password !!