. NET+EF Connection Oracle 10, 11 development, ODAC installation configuration and use of detailed

Source: Internet
Author: User
Tags oracle developer

Oracle Data Access Component (ODAC) Full name: Oracle Database Access Components

Pros: Because Microsoft will deprecated System.Data.OracleClient.dll in. NET Framework4, and in terms of access efficiency and speed, System.Data.OracleClient.dll compared to Oracle.DataAccess.dll, Microsoft does not have the advantage of Oracle-provided class libraries, so I gave up the use of years of System.Data.OracleClient.dll, replaced by Odp.net.

1. Installation of ODAC

Server side: 0racle10g,11g All right

Client: oracle11g, I downloaded ODAC 11.2 Release 5 and Oracle Developer Tools for Visual Studio (11.2.0.3.20), oracle10g can be installed, but there is a lack of custom Vs2003 and vs2005, so I chose to use the oracle11g version ODAC 11.2 Release 5 and Oracle Developer Tools for Visual Studio (11.2.0.3 .), http://www.oracle.com/technetwork/topics/dotnet/utilsoft-086879.html

2. Setting of environment variables

(1) The installation directory of the new ORACLE_HOME:ODAC (similar to ~app\administrator\product\. 1.0\client_1, my installation directory here is G:\app\Administrator\product\ 11.2.0\client_2)

Note: This item is empty on the Oracle server side, otherwise the monitoring service cannot start, Plsql Developer Connection exception.

(2) New ld_library_path:%oracle_home% (If Linux)

(3) New tns_admin:%oracle_home% (here is the listening settings, should be the Tnsnames.ora directory, I set the G:\oracle\product\10.2.0\db_1\NETWORK\ADMIN, Of course, you can also copy the configured Tnsnames.ora files to the%oracle_home% directory.)

(4) Append to the front of path: %oracle_home% (automatically appended after installing ODAC)

(5) If plsql Developer cannot connect to Oracle, set the Oracle home directory name for plsql Developer :

Tools, Preferences

Establishing a connection to Oracle in 3.vs2010

In the VS menu bar, click View-Server Explorer, select the data connection in the Server Explorer panel, right-add the connection

Click the Change Data Source button, select Oracle database, data provider, select Oracle Date Provider for.net in the pop-up change data source box.

In the data Source Name drop-down list box select the data source name, this name is configured in Tnsnames.ora, enter the username password, click OK to establish vs with Oracle connection.

Finally, you can use the tools here to manipulate the Oracle database, including complex custom object classes. See "Pro odp.net for Oracle database11g" chapter 14th odt.net Tool Basics

Note: Environment variable settings

1. Add OracleClient and Oracleclient/bin to the PATH environment variable

2. Add tns_admin environment variable refers to the path where Daotnsnames.ora

. NET+EF Connection Oracle 10, 11 development, ODAC installation configuration and use of detailed

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.