Do not install Oracle How to connect a database (ODBC driver)

Source: Internet
Author: User

Preface:

Recently, using R to develop a data analysis system, you need to connect to the Oracle database to obtain data, but do not want to get a few data to install an oracle, so you want to directly find an Oracle ODBC driver, eliminate the hassle of installing the Oracle client. The following is a record of the installation process, we hope to be helpful.


Text: Download:

First, we need to download two drivers:
instantclient-odbc-win32-11.2.0.1.0 and instantclient-basiclite-win32-11.2.0.1.0.
Address: http://www.oracle.com/technetwork/cn/topics/winsoft-095945-zhs.html

Because the download of Oracle products generally need to register first, so I put the network directly on the disk, if it is too registered trouble friends can download from here: ODBC driver, extract password: j9yr
(If the Baidu cloud disk failure, there are micro-disk: ODBC driver), extract password: P0GG


Installation: Step One: Unzip

First extract basiclite, and then the ODBC inside the files extracted to basiclite that path (do not make the wrong order!). )。 Such as:


Step Two:

Copy the network folder located on the Oracle database to the Instantclient_11_2 directory you just extracted. (can also be taken from any computer equipped with Oracle)

The computer next to me is equipped with Oracle, and its network folder is G:\app\John\product\11.2.0\dbhome_1


Step Three:

To modify a Network\admin\tnsnames.ora file: Add the following lines of code at the end of the document

ORCL81 =  (DESCRIPTION =    (ADDRESS = (PROTOCOL = TCP)(HOST = 100.100.100.100)(PORT = 1521))    (CONNECT_DATA =      (SERVER = DEDICATED)      (SERVICE_NAME = orcl)    )  )

Note: Change the 100.100.100.100 to the IP where you want to connect the database, and ORCL81 and ORCL can be changed. Special attention do not miss the parentheses or more space or something, this code is very strict, it is possible because a space and the connection is not successful. This code in Tnsnames.ora General also have, can copy paste directly, then modify IP.


Step Four:

Add the environment variable tns_admin, and the path to the ADMIN directory. Such as:


Step Five:

Running the odbc_install.exe in the Instantclient_11_2 directory, a DOS window will appear flashing past.


Step Six:

Go ahead and configure the data source!

Open ODBC Data Source Administrator, System DNS, add, pop up the Create New Data Source window, select Oracle in Instantclient_11_2 to start the new data source!



Reprint please indicate the source, thank you! (Original link: http://blog.csdn.net/bone_ace/article/details/47628725)

Do not install Oracle How to connect a database (ODBC driver)

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.