Two methods to connect Oracle to Oracle using PL/SQL without installing the Oracle client

Source: Internet
Author: User

Method 1:

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 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, 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)
the configuration is 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.

Finally, you only need to double-click the batch processing, and then enter the account and password.


Method 2:


A few days ago, I sent an article about using PL/SQL to connect to Oracle without installing the Oracle client. He told me that he had already used another better green version of Oracle client, and no complicated configurations are required.
I compared myArticleThe client is relatively large, about 30 m. The settings are complex, but they should be stable. The bag provided by the bus flying is a little more than 3 m. It should be made by a senior man after being extracted for 10 m.

Green version Oracle client download (provided by bus flying friendship): Oracle client

Let's talk about which one is useful !!!

Note:

During use, you only need to copy to any directory, but the default directory is "C: \ ora90 ".

To change the default settings, modify the default "ORACLE_HOME" in the file "Oracle9i. Reg"

Change the related paths to the actual oracle path.

This green installation method is also suitable when the operating system is re-installed. If your Oracle is installed on a non-system disk, you can use the obsolete installation directory and use the modified "Oracle9i. reg. Very convenient. I have already tried it.

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.