If Oracle is not installed, you can use PL/SQL to access a remote ORACLE database.

Source: Internet
Author: User

Oracle client installation without using PL/SQL to connect to Oracle everyone knows that using PL/SQL to connect to Oracle requires installing the Oracle client software. Have you ever wondered whether to directly connect to Oracle without installing the Oracle client?

 

ExploitationOracleProvidedInstant Client package


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:
Yourdatabasename =
(Description =
(Address_list =
(Address = (Protocol = TCP) (host = yourhostip) (Port = 1521 ))
)
(CONNECT_DATA =
(SERVICE_NAME = yoursid)
)
)

 

For example:

# Tnsnames. ora network configuration file: C: "oracle" ora90 "network" admin "tnsnames. ora

# Generated by Oracle configuration tools.

 

Lilo =

(Description =

(Address_list =

(Address = (Protocol = TCP) (host = 10.33.220.157) (Port = 1521 ))

)

(CONNECT_DATA =

(SERVICE_NAME = lilo)

)

)

 

Extproc_connection_data =

(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 = C: "oracleclient" OCI. dll, ORACLE_HOME = C: "oracleclient.
According to your actual configuration, C: "oracleclient is actually the path of the downloaded package.

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:
Set nls_lang = simplified chinese_china.zhs16gbk
Plsqldev.exe
This character set refers to the server-side character set.
----

Permanent character set:
Set nls_lang = simplified chinese_china.zhs16cgb231280
Set nls_lang = simplified chinese_china.zhs16gbk
Set nls_lang = simplified chinese_china.utf8

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.