How to connect to the database without installing Oracle (odbc driver)

Source: Internet
Author: User

How to connect to the database without installing Oracle (odbc driver)
Preface:

Recently, I used R to develop a data analysis system. I need to connect to the Oracle database to obtain data, but I don't want to install an Oracle database to get a few data. So I want to directly find an Oracle odbc driver, this eliminates the trouble of installing the Oracle client. The following is a record of the installation process, which may be helpful to you.

Body: Download:

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

Because Oracle products generally need to be registered before downloading, I directly put them on the online storage. If you have trouble registering, you can download the odbc driver and extract the password: j9yr.
(If Baidu cloud disk becomes invalid, there will be a micro disk: odbc driver, and the extraction password is P0GG)

 

 

 

Installation: Step 1: Extract

Decompress basiclite to obtain an instantclient_11_2 folder. Decompress the files in odbc to the instantclient_11_2 directory (do not make a mistake !). For example:

 

 

 

Step 2:

Copy the NETWORK folder on the Oracle database to the unzipped instantclient_11_2 directory. (It can also be taken from any computer with Oracle installed)

Oracle is installed on my computer next door. Its NETWORK folder is in G: \ app \ John \ product \ 11.2.0 \ dbhome_1.

 

 

 

Step 3:

Modify the 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 100.100.100.100 to the IP address where you want to connect to the database. In addition, you can change ORCL81 and orcl. Note that there are no parentheses or spaces missing. This code is strictly required and may fail to be connected due to an extra space. This code is also available in tnsnames. ora. You can copy and paste it directly, and then modify the IP address.

 

 

 

Step 4:

Add the environment variable TNS_ADMIN. The path points to the ADMIN directory. For example:

 

 

 

Step 5:

RunOdbc_install.exe, A DOS window will pop up ..

 

 

 

Step 6:

All done. Configure the data source!

Choose ODBC data source Manager> System DNS> Add. In the displayed "Create a new data source" window, selectOracle in instantclient_11_2Create a data source!

 

 

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.