Use Oracle Instant Client to package Oracle clients

Source: Internet
Author: User

I made a C # And Oracle system, and it was really troublesome to install an Oracle client on each client. So I searched the internet and checked whether there was a method for not installing the client, oracle has long thought of this problem. He has provided simplified clients of various versions on his website. The client can be connected only with dozens of megabytes of size and simple configuration. Next I will talk about the implementation process.

First, build the following directory structure

 

Download instantclient-basic-win32-10.2.0.3-20061115.zip from the oracle's website. The specific version can be selected based on your server. Decompress the file.

Put these files in the bin directory above and copy oracle from the machine where oracle is installed. key File (required, can be copied from the bin directory of the installed Oracle), also put in the bin directory.

The files sqlnet. ora and tnsnames. ora in the admin folder can be copied from the machine where oracle is installed.

Configure tnsnames. ora as follows:

Oradb =
(Description =
(Address = (Protocol = TCP) (host = 192.168.6.31) (Port = 1521 ))
(CONNECT_DATA =
(Server = dedicated)
(SERVICE_NAME = oradb)
)
)

Change host and SERVICE_NAME to your server address and Instance name.

Edit the Registry file:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE \ SOFTWARE \ oracle]
"ORACLE_HOME" = "D:" \ oracle_client"

[HKEY_LOCAL_MACHINE "SOFTWARE \ oracle \ key_1_lient10g_home1]
"ORACLE_HOME" = "D: \ oracle_client"
"Nls_lang" = "simplified chinese_china.zhs16gbk"

"Oracle_home_key" = "Software \ oracle \ key_1_lient10g_home1"

Import the Registry file to the Registry.

Finally, add the Oracle path: D: \ oracle_client \ bin to the environment variable path;

After the operation is complete, you 'd better restart it to make the settings take effect, so that you can enjoy the joy of connecting to Oracle.

 

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.