How to install the Oracle ODBC driver without installing an Oracle client

Source: Internet
Author: User
Tags odbc zip oracle database

Recently done a project, through VC ODBC access to Oracle database, on my computer can run normally, not running on other computers, because there is no Oracle ODBC driver, unable to configure Oracle data source. Most of the blog posts on the Web are installed with Oracle clients to solve. I think it is a small program, there is no need to install the client bar, referring to the online blog and visited the Oracle Web site, so this article.

1. Download ODBC driver

Need to download two things

Instantclient-basiclite-nt-12.1.0.1.0.zip

Instantclient-odbc-nt-12.1.0.1.0.zip

URL: http://www.oracle.com/technetwork/cn/topics/winsoft-095945-zhs.html

Due to time lapse, the version number will be updated and the URL will change. So we can Baidu Oracle instantclient basiclite keywords, and then search results to see the official Oracle website, download. You need to agree to the agreement and is an Oracle registered user, user registration is free.

2, unzip the two files to the same folder

A, extract the two files separately

B, uncompressed after the two folders have instantclient_12_1 directory, the ODBC Instantclient_12_1 directory content copied to the basicclient under the instantclient_12_1 inside

C, in order to make the catalog neat introduction, will basicclient under the Instantclient_12_1 directory copy to D:\Program Files\instantclient_12_1

3, the Oracle database on the computer network directory copy to the Instantclient_12_1 directory, my Oracle server computer network in D:\oraclexe\app\oracle\product\ 11.2.0\server this position.

This column more highlights: http://www.bianceng.cnhttp://www.bianceng.cn/database/Oracle/

4, modify the Network\admin\tnsnames.ora file, replace the host name with an IP address. In the following example, 10.17.176.138 was previously the hostname of the computer on which the Oracle database resides. The host name may not be connected properly, so replace it with an IP address.

XE =

(DESCRIPTION =

(address = (PROTOCOL = TCP) (HOST = 10.17.176.138) (PORT = 1521))

(Connect_data =

(SERVER = dedicated)

(service_name = XE)

)

)

5, add environment variable tns_admin, variable value point to ADMIN directory, my configuration is D:\Program files\instantclient_12_1\network\admin

6, double-click the Instantclient_12_1 directory to complete the installation of Odbc_install.exe. Note: The Doc box appears when you install it, and you may not be able to determine if it is properly installed. In fact you can cmd into the Instantclient_12_1 directory, and. \odbc_install.exe manual Installation.

8. Configure the data source and test

To not affect the test, first shut down the firewall on the computer where the Oracle database resides, or allow the exception TCP 1521 port. Configure client computers, Control Panel-> data source-> user dsn-> Add select Oracle in INSTANTCLIENT_12_1,TNS Service name Select database name, my name is XE, point test Connection, if the prompt is successful, OK.

9, prevent garbled

On the computer where the database is installed (my ORACLE is installed on Windows), look at the Nls_lang value under Hkey_local_machine/software/oracle/key_xxx, where xxx is ... , I also cannot say clearly, should be the database name.

Add the environment variable Nls_lang on the client computer, and the value is the Nls_lang value obtained on the above. The Nls_lang of my server is simplified Chinese_china. Zhs16gbk

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.