Oracle Data Provider for .NET, Managed Driver

Oracle Data Provider for  .NET, Managed Driver


Installation Guide, Quick Start, and Release Notes

Release 11.2.0.3.50 Beta

September 2012
Copyright (c) Oracle Corporation 2012

This document provides information that supplements the Oracle Data Provider for .NET (ODP.NET) Production documentation.

TABLE OF CONTENTS

 

QUICK START

1. Download ODP.NET, Managed Driver .zip file to a directory for staging the install.
2. Unzip the download to expand its contents into the target directory.
3. Run configure.bat to GAC and configure machine.config for ODP.NET, Managed Driver.
4. Create a new Visual Studio 2010 console application project for C#.
5. Add Oracle.ManagedDataAccess.dll as a reference to the project.
6. Replace the contents of Program.cs with the following C# code. Notice that the namespace of ODP.NET, Managed Driver (Oracle.ManagedDataAccess.*) is different from the namespace of ODP.NET, Unmanaged Driver (Oracle.DataAccess.*).

// C#using System;using Oracle.ManagedDataAccess.Client;using Oracle.ManagedDataAccess.Types;namespace Connect{  class Program  {    static void Main(string[] args)    {      try      {        // Please replace the connection string attribute settings        string constr = "user id=scott;password=tiger;data source=oracle";        OracleConnection con = new OracleConnection(constr);        con.Open();        Console.WriteLine("Connected to Oracle Database {0}", con.ServerVersion);        con.Dispose();        Console.WriteLine("Press RETURN to exit.");        Console.ReadLine();      }      catch (Exception ex)      {        Console.WriteLine("Error : {0}", ex);      }    }  }}

7. Modify the "user id", "password", and "data source" connection string attributes appropriately.
8. Copy over the sqlnet.ora and tnsnames.ora (which contains the definition of the alias used by the "data source" attribute setting) to the location of the .exe. For example, if the application has "...;data source=oracle;..." in the connection string, then 'oracle' needs to be defined, in a tnsnames.ora. If you do not have these files, modify the tnsnames.ora supplied in the .zip and copy the tnsnames.ora and sqlnet.ora to the location of the .exe. Note that there are other ways to define data source aliases. See the  Configuration and Setup section below for more details. If you do not wish to copy the .ora files, then you can configure the application config file as in the following example. Please modify the path appropriately to where the .ora files are located.
<configuration>  <oracle.manageddataaccess.client>    <version number="*">      <settings>        <setting name="TNS_ADMIN" value="C:\oracle\network\admin"/>      </settings>    </version>  </oracle.manageddataaccess.client></configuration>
To make this a machine-wide setting, the machine.config file can be configured.
9. Build your ODP.NET application and run.
10. If you are able to connect, you are on your way to develop and run other ODP.NET, Managed Driver projects!
11. If you're not able to connect to the Oracle Database, please have a look at the  Oracle Network Managegement Documentation.
12. Run unconfigure.bat to remove ODP.NET, Managed Driver from the GAC and remove its configuration entries from the machine.config.

Note: ODP.NET, Managed Driver has the same exact application programming interfaces (APIs) as ODP.NET, Unmanaged Driver. However, the Managed Driver's APIs are a subset of the Unmanaged Driver's APIs. Refer to the  Differences Between ODP.NET, Managed Driver and ODP.NET, Unmanaged Driver section for more details. 

Note: ODP.NET, Managed Driver is not supported to work with Oracle Developer Tools for .NET (ODT.NET).

 

SYSTEM REQUIREMENTS

ODP.NET, Managed Driver requires the following:

  • Microsoft Windows operating system
    • 32-bit: Windows 7 (Professional, Enterprise, Ultimate editions), Windows Server 2008
    • x64: Windows 7 (Professional, Enterprise, Ultimate editions), Windows Server 2008 R2 and Windows Server 2008 (all editions, except HPC)
  • Microsoft .NET Framework 4
  • Access to an Oracle Database Server (Oracle Database 10g Release 2 or higher)

ODP.NET, Managed Driver is built with AnyCPU. It runs on either 32-bit or 64-bit (x64) Windows.

 

CONFIGURATION AND SETUP

Installation Files

The zip file contains the following files:

  • FileDescription
    Oracle.ManagedDataAccess.dllPlatform-independent (AnyCPU), fully-managed ADO.NET provider
    x64\Oracle.ManagedDataAccessDTC.dllPlatform-dependent (x64 only), Managed Assembly for Distributed Transaction support.
    x86\Oracle.ManagedDataAccessDTC.dllPlatform-dependent (x86 only), Managed Assembly for Distributed Transaction support.
    x64\OraProvCfg.exePlatform-dependent (x64 only) utility to configure/unconfigure ODP.NET, Managed and Unmanaged Drivers on x64 platforms
    x86\OraProvCfg.exePlatform-dependent (x86 only) utility to configure/unconfigure ODP.NET, Managed and Unmanaged Drivers on x86 platforms and on WOW (Windows on Windows)
    configure64.batBatch file to place ODP.NET, Managed Driver into the GAC and add configuration entries into the machine.config on 64-bit OS. [XCopy install only]
    configure32.batBatch file to place ODP.NET, Managed Driver into the GAC and add configuration entries into the machine.config on 32-bit OS and on WOW. [XCopy install only]
    unconfigure64.batBatch file to remove ODP.NET, Managed Driver from the GAC and remove configuration entries from machine.config on 64-bit OS. [XCopy install only]
    unconfigure32.batBatch file to remove ODP.NET, Managed Driver from the GAC and remove configuration entries from machine.config on 32-bit OS and on WOW. [XCopy install only]
    tnsnames.oraA sample configuration file that defines data source aliases. [XCopy install only]
    sqlnet.oraA sample configuration file that configures network related settings. [XCopy install only]
    Oracle.ManagedDataAccess.Client.Configuration.Section.xsdAn XML schema file that defines the configuration section for ODP.NET, Managed Driver.

    Notes: 
  • Oracle.ManagedDataAccessDTC.dll is only needed if the application uses distributed transactions.
  • If Distributed Transactions are used by the ODP.NET, Managed Driver application, the appropriate Oracle.ManagedDataAccessDTC.dll (x64 or x86) will be loaded. However, the required Oracle.ManagedDataAccessDTC.dll needs to be either in the GAC or in the same directory as the .exe for it to be loaded by Oracle.ManagedDataAccess.dll.
  • Oracle.ManagedDataAccessDTC.dll must not be referenced by the application.
  • On a 64-bit OS, only the x64 version of Oracle.ManagedDataAccessDTC.dll is placed into the GAC upon the completion of an OUI install or an invocation of the XCopy configure.bat.

Configuration File Format

The ODP.NET, Managed Driver configuration file section name is <oracle.manageddataaccess.client> as compared to <oracle.dataaccess.client> in ODP.NET, Unmanaged Driver. A typical .NET config that uses ODP.NET, Managed Driver has some or all of the following subsections nested within a <version> subsection under <oracle.manageddataaccess.client> section. Note the tag names are case sensitive, while the attribute names are case insensitive.

<?xml version="1.0" encoding="utf-8" ?><configuration>  <oracle.manageddataaccess.client>    <version number="*">      <dataSources>   	...	...      </dataSources>      <settings>        ...	...      </settings>      <implicitRefCursor>	...	...      </implicitRefCursor>      <edmMappings>	...	...      <edmMappings>    </version>    <version number="4.112.3.50">      <dataSources>	...	...      </dataSources>      <settings>	...	...      </settings>      <implicitRefCursor>	...	...      </implicitRefCursor>      <edmMappings>	...	...      <edmMappings>    </version>  </oracle.manageddataaccess.client></configuration>

'version' Section
All the information required by an application should be grouped under the 'version' subsections. Each <version number=”X”> section contains parameters applicable for version X of the ODP.NET, Managed Driver. For example, <version number="4.112.3.50"> section parameters will be applicable only for those applications using ODP.NET, Managed Driver assembly 4.112.3.50.

There can also be a generic section with X = “*” (i.e. <version number="*">). This section's parameters are applicable for all ODP.NET, Managed Driver versions. Parameters in the version specific section take precedence over the generic section's parameters. Below is an example. 
<oracle.manageddataaccess.client>  <version number="*">     <settings>	<setting name="TraceOption" value="1"/>	<setting name="PerformanceCounters" value="0" />     </settings>  </version>  <version number="4.112.3.50">     <settings>	<setting name="PerformanceCounters" value="4095" />     </settings>  </version></oracle.manageddataaccess.client>
An application referencing ODP.NET, Managed Driver 4.112.3.50 has the following values set:
TraceOption = 1
PerformanceCounters = 4095

All other versions will have the following values set:
TraceOption = 1
PerformanceCounters = 0

'dataSources' Section
This section can appear only under a <version> section. The mapping between the different data source aliases and corresponding data descriptors should appear in this section. Below is an example. 
<dataSources>  <dataSource alias="inst1" descriptor="(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=sales-server)......)))"/>  <dataSource alias="inst2" descriptor="(DESCRIPTION= ......)))"/></dataSources>

The following precedence order is followed to resolve the data source alias specified in the 'Data Source' attribute in the connection string. NOTE: app/web.config setting takes precedence over machine.config. 

1. data source alias in the 'dataSources' section under <oracle.manageddataaccess.client> section in the .NET config file.
2. data source alias in the tnsnames.ora file at the location specified by 'TNS_ADMIN' in the .NET config file.
3. data source alias in the tnsnames.ora file present in the same directory as the .exe.
4. data source alias in the tnsnames.ora file present at %TNS_ADMIN% (where %TNS_ADMIN% is an environment variable setting).
5. data source alias in the tnsnames.ora file present at %ORACLE_HOME%\network\admin (where %ORACLE_HOME% is an environment variable setting).


NOTE: The "data source" connection string attribute can alternatively be set to a full descriptor or EZ Connect syntax rather than a data source alias, which need to be resolved using the above precedence rule. 

The following keywords are supported within the descriptor setting: 

1. ADDRESS_LIST (Note: Failover supported)
2. DESCRIPTION_LIST (Note: Failover supported; Address_list load balancing not supported)
3. DESCRIPTION
4. ADDRESS
5. PROTOCOL (Note: "tcp" and "tcps" are supported)
6. HOST (Note: <hostname>, <IPv6 literal>, and <IPv4 literal> are supported)
7. PORT
8. IP (Note: "loopback" is supported)
9. SDU (Note: 256 to 65536 are supported)
10. TRANSPORT_CONNECT_TIMEOUT (Note: overrides tcp.connect_timeout)
11. SECURITY: SSL_VERSION (Note: overrides sqlnet.ora:ssl_version)

Note: SSL is only supported via method MCS and as a transport.
Note: Only NTS authentication is supported. RADIUS and Kerberos authentication are not supported.
Note: Only SQL*Net and Easy Connect naming are supported. There is no LDAP/Active Directory support.
Note: No bequeath ('beq') support. Default address is instead TCP loopback with port 1521 and Oracle service name is obtained from environment or configruation file via the "ORACLE_SID" setting. 

Requirements for connecting to a local database WITHOUT specifying "data source" connection string attribute: 

1. The listener must be up and running.
2. ORACLE_SID must be configured appropriately through the configuration file or the environment.

NOTE: When "data source" connection string attribute is not specified, protocol defaults to 'tcp' and port defaults to '1521'. 

'settings' section
This section can appear only under a <version> section. Any ODP.NET, Managed Driver specific settings should appear in this section. Below is an example. 
<settings>  <setting name="TraceLevel" value="7" />  <setting name="TraceOption" value="1"/>  <setting name="TNS_ADMIN" value="C:\oracle\network\admin"/></settings>
Below is a list of ODP.NET, Managed Driver configuration settings that are supported: 

1. FetchSize
2. DbNotificationPort
3. DemandOraclePermission
4. MaxStatementCacheSize
5. MetaDataXml
6. PerformanceCounters
7. SelfTuning
8. StatementCacheSize
9. TNS_ADMIN : Location where tnsnames.ora and/or sqlnet.ora are located.
10. TraceFileLocation : Trace file destination location. This is different from ODP.NET, Unmanaged Driver, which supports TraceFileName.
11. TraceLevel : 1 = public APIs; 2 = private APIs; 4 = network APIs/data. These values can be ORed. To enable everything, set TraceLevel to 7. Errors will always be traced.
12. TraceOption
13. NODELAY
14. ORACLE_SID
15. TCP.CONNECT_TIMEOUT
16. SSL_VERSION
17. WALLET_LOCATION : Only "METHOD" supported is MCS
18. SQLNET.AUTHENTICATION_SERVICES : Only supported values are NTS and null/empty/not-specified.

For more information on these settings, reference  ODP.NET Developer's Guide and  Oracle Database Net Services Reference 

'implicitRefCursor' section
This section can appear only under a <version> section. Any information about REF CURSOR parameters that need to be bound implicitly should appear in this section. Below is an example. 
<implicitRefCursor>  <storedProcedure schema="USERREFCUR" name="TestProc1">    <refCursor name="Param3">     <bindInfo mode="Output"/>      <metadata columnOrdinal="0" columnName="DEPTNO" baseColumnName="DEPTNO" baseSchemaName="USERREFCUR" baseTableName="DEPT" nativeDataType="number" providerType="Int32" dataType="System.Int16" columnSize="2" allowDBNull="true" />     <metadata columnOrdinal="1" columnName="DNAME" baseColumnName="DNAME" baseSchemaName="USERREFCUR" baseTableName="DEPT" nativeDataType="varchar2" providerDBType="String" columnSize="30" />    </refCursor>    <refCursor name="param2">      <bindInfo mode="Output"/>      <metadata columnOrdinal="0" columnName="EMPNO" baseColumnName="EMPNO" baseSchemaName="USERREFCUR" baseTableName="EMP" nativeDataType="number" providerType="Int32" dataType="System.Int16" columnSize="4" allowDBNull="false" />    </refCursor>   </storedProcedure>   <!--Next stored procedure information-->   <storedProcedure name=”TestProc2”>		...		...   </storedProcedure></implicitRefCursor>

'distributedTransaction' section
This section can appear only under a <version> section. Any information about distributed transactions should appear in this section. Below is an example. 
<distributedTransaction>  <setting  name="recoveryerviceHost" value="my-pc" />  <setting name="recoveryservicePort" value="2040" /></distributedTransaction>
The RecoveryServiceHost attribute specifies the host machine name that has a running recovery service. The RecoveryServicePort attribute specifies the port that the recovery service is listening on. The port specified in the managed provider section need to match the port configured with the OraMTS Recovery Service. By default, RecoveryServiceHost is set to the name of the local host if none is specified. By default, RecoveryServicePort is set to 2030, if none is specified. 


'edmMappings' section
This section can appear only under a <version> section. Any information related to EDM mappings should appear in this section. Below is an example. 
<edmMappings>  <edmMapping dataType="number">    <add name="bool" precision="1"/>    <add name="byte" precision="2" />    <add name="int16" precision="5" />  </edmMapping></edmMappings>

 

DIFFERENCES BETWEEN ODP.NET, MANAGED DRIVER AND ODP.NET, UNMANAGED DRIVER

Features Not Supported in ODP.NET, Managed Driver

  • NamespaceClasses / Enumerations / InterfacesUnsupported Method / Property / Event
    Oracle.ManagedDataAccess.ClientFailoverEvent enumerationAll
    Oracle.ManagedDataAccess.ClientFailoverReturnCode enumerationAll
    Oracle.ManagedDataAccess.ClientFailoverType enumerationAll
    Oracle.ManagedDataAccess.ClientOracleAQAgent classAll
    Oracle.ManagedDataAccess.ClientOracleAQDequeueuMode enumerationAll
    Oracle.ManagedDataAccess.ClientOracleAQDequeueOptions classAll
    Oracle.ManagedDataAccess.ClientOracleAQEnqueueOptions classAll
    Oracle.ManagedDataAccess.ClientOracleAQMessage classAll
    Oracle.ManagedDataAccess.ClientOracleAQMessageAvailableEventArgs classAll
    Oracle.ManagedDataAccess.ClientOracleAQMessageAvailableEventHandler classAll
    Oracle.ManagedDataAccess.ClientOracleAQMessageDeliveryMode enumerationAll
    Oracle.ManagedDataAccess.ClientOracleAQMessageState enumerationAll
    Oracle.ManagedDataAccess.ClientOracleAQMessageType enumerationAll
    Oracle.ManagedDataAccess.ClientOracleAQNavigationMode enumerationAll
    Oracle.ManagedDataAccess.ClientOracleAQNotificationGroupingType enumerationAll
    Oracle.ManagedDataAccess.ClientOracleAQNotificationType enumerationAll
    Oracle.ManagedDataAccess.ClientOracleAQQueue classAll
    Oracle.ManagedDataAccess.ClientOracleAQVisibilityModeAll
    Oracle.ManagedDataAccess.ClientOracleBulkCopyAll
    Oracle.ManagedDataAccess.ClientOracleBulkCopyColumnMapping classAll
    Oracle.ManagedDataAccess.ClientOracleBulkCopyColumnMappingCollection classAll
    Oracle.ManagedDataAccess.ClientOracleBulkCopyOptions classAll
    Oracle.ManagedDataAccess.ClientOracleCommandXmlCommandType property
    Oracle.ManagedDataAccess.ClientOracleCommandXmlQueryProperties property
    Oracle.ManagedDataAccess.ClientOracleCommandXmlSaveProperties property
    Oracle.ManagedDataAccess.ClientOracleConnectionFlushCache() method
    Oracle.ManagedDataAccess.ClientOracleConnectionFailover event
    Oracle.ManagedDataAccess.ClientOracleConnectionConnectionType property
    Oracle.ManagedDataAccess.ClientOracleConnectionType enumerationAll
    Oracle.ManagedDataAccess.ClientOracleDBShutdownMode enumerationAll
    Oracle.ManagedDataAccess.ClientOracleDBStartupMode enumerationAll
    Oracle.ManagedDataAccess.ClientOracleDataReaderGetOracleRef() method
    Oracle.ManagedDataAccess.ClientOracleDataReaderGetOracleBlobForUpdate() method
    Oracle.ManagedDataAccess.ClientOracleDataReaderGetOracleClobForUpdate() method
    Oracle.ManagedDataAccess.ClientOracleDataReaderGetOracleXmlType() method
    Oracle.ManagedDataAccess.ClientOracleDataAdapterSafeMapping property
    Oracle.ManagedDataAccess.ClientOracleDatabaseAll
    Oracle.ManagedDataAccess.ClientOracleDbType enumerationArray
    Oracle.ManagedDataAccess.ClientOracleDbType enumerationObject
    Oracle.ManagedDataAccess.ClientOracleDbType enumerationRef
    Oracle.ManagedDataAccess.ClientOracleFailoverEventArgs classAll
    Oracle.ManagedDataAccess.ClientOracleFailoverEventHandler classAll
    Oracle.ManagedDataAccess.ClientOracleGlobalization classClientCharacterSet property
    Oracle.ManagedDataAccess.ClientOracleGlobalization classGetClientInfo() method
    Oracle.ManagedDataAccess.ClientOracleGlobalization classGetThreadInfo() method
    Oracle.ManagedDataAccess.ClientOracleGlobalization classSetThreadInfo() method
    Oracle.ManagedDataAccess.ClientOracleNotificationRequest classGroupingInterval property
    Oracle.ManagedDataAccess.ClientOracleNotificationRequest classGroupingNotificationEnabled property
    Oracle.ManagedDataAccess.ClientOracleNotificationRequest classGroupingType property
    Oracle.ManagedDataAccess.ClientOracleRowsCopiedEventArgs classAll
    Oracle.ManagedDataAccess.ClientOracleRowsCopiedEventHandler classAll
    Oracle.ManagedDataAccess.ClientOracleXmlCommandType enumerationAll
    Oracle.ManagedDataAccess.ClientOracleXmlQueryProperties classAll
    Oracle.ManagedDataAccess.ClientOracleXmlSaveProperties classAll
    Oracle.ManagedDataAccess.TypesIOracleArrayTypeFactory interfaceAll
    Oracle.ManagedDataAccess.TypesIOracleCustomType interfaceAll
    Oracle.ManagedDataAccess.TypesIOracleCustomTypeFactory interfaceAll
    Oracle.ManagedDataAccess.TypesOracleArrayMappingAttribute classAll
    Oracle.ManagedDataAccess.TypesOracleCustomTypeMappingAttribute classAll
    Oracle.ManagedDataAccess.TypesOracleObjectMappingAttribute classAll
    Oracle.ManagedDataAccess.TypesOracleRef classAll
    Oracle.ManagedDataAccess.TypesOracleTimestampTZ structOracleTimeStampTZ(DateTime dt, string timeZone) constructor. This constructor is supported but the timeZone must be an hour offset.
    Oracle.ManagedDataAccess.TypesOracleUdt classAll
    Oracle.ManagedDataAccess.TypesOracleUdtFetchOption enumerationAll
    Oracle.ManagedDataAccess.TypesOracleUdtStatus enumerationAll
    Oracle.ManagedDataAccess.TypesOracleXmlStream classAll
    Oracle.ManagedDataAccess.TypesOracleXmlType classAll

Other Differences between ODP.NET, Managed Driver and ODP.NET, Unmanaged Driver

  • Feature CategoryDifference compared to ODP.NET, Unmanaged Driver
    ConfigurationConfiguration file format is different. See Configuration File Format section above.
    Configuration'Oracle.ManagedDataAccess.Client.Configuration.Section.xsd' file, shipped with ODP.NET, Managed Driver enables intellisense when modifying/updating .NET configuration file.
    ConfigurationRegistry-based confguration is not supported
    ConfigurationHA & RLB notifications Oracle Notification Service (ONS). Thus, to use HA or RLB, configure database and client to use ONS, rather than AQ. Note that change notification will continue to use AQ.
    Configuration ParameterEdition is not supported.
    Configuration ParameterCheckConStatus is not supported.
    Configuration ParameterDllPath is not supported.
    Configuration ParameterSatementCacheWithUdts is not supported.
    Configuration ParameterThreadPoolMaxSize is not supported.
    Configuration ParameterTraceFileName has been replaced by TraceFileLocation.
    Configuration ParameterUdtCacheSize is not supported.
    Configuration ParameterUDT Mapping is not supported.
    Connection StringContext Connection is not supported.
    Connection StringEnlist=dynamic will behave the same as Enlist=false.
    Connection StringPromotable Transaction setting will be ignored. It will always be set to "promotable" and always support promotions.
    Connection StringStatement Cache Purge is not supported.
    ConnectivityConnection to Oracle Times Ten Database is not supported
    Performance MonitorNumberOfStatisConnections performance counter is not supported.
    Performance MonitorPerformance monitor category name is "ODP.NET, Managed Driver"
    Provider TypesProvider Types accept (via constructors) and generate (via ToString() methods) only culture-invariant strings
    TracingTrace file name format is: <process_name>_PID_<process_id>_DATE_<date>_TIME_<time>.trc.
    TracingDyanmic tracing is enabled by changing the TraceLevel setting in the app/web/machine.config. NOTE: For ASP.NET applications, doing so will recycle the appdomain.
    TracingAn eventlog entry is generated indicating where the trace file is created or if ODP.NET, Managed Driver had issues creating one.

 

TIPS, LIMITATIONS AND KNOWN ISSUES

1. Updating multiple long columns in multiple rows with data > 4k does not work with this release of ODP.NET, Managed Driver. [Bug 14304263]

2. OracleConnection object's OpenWithNewPassword() method invocation will result in an ORA-1017 error [Bug 14311412]

 

ENTITY FRAMEWORK RELATED TIPS, LIMITATIONS AND KNOWN ISSUES

1. Interval Day to Second and Interval Year to Month column values cannot be compared to literals in a WHERE clause of a LINQ to Entities or an Entity SQL query.

2. LINQ to Entities and Entity SQL (ESQL) queries that require the usage of SQL APPLY in the generated queries will cause SQL syntax error(s) if the Oracle Database being used does not support APPLY. In such cases, the inner exception message will indicate that APPLY is not supported by the database.

3. ODP.NET does not currently support wildcards that accept character ranges for the LIKE operator in Entity SQL (i.e. [] and [^]). [Bug 11683837]

4. ODP.NET does not support Code First or the DbContext APIs.

5. Executing LINQ or ESQL query against tables with one or more column names that are close to or equal to the maximum length of identifiers (30 bytes) may encounter "ORA-00972: identifier is too long" error, due to the usage of alias identifier(s) in the generated SQL that exceed the limit.

6. An "ORA-00932: inconsistent datatypes: expected - got NCLOB" error will be encountered when trying to bind a string that is equal to or greater than 2,000 characters in length to an XMLType column or parameter. [Bug 12630958]

7. An "ORA-00932 : inconsistent datatypes" error can be encountered if a string of 2,000 or more characters, or a byte array with 4,000 bytes or more in length, is bound in a WHERE clause of a LINQ/ESQL query. The same error can be encountered if an entity property that maps to a BLOB, CLOB, NCLOB, LONG, LONG RAW, XMLTYPE column is used in a WHERE clause of a LINQ/ESQL query.

8. An "Arithmetic operation resulted in an overflow" exception can be encountered when fetching numeric values that have more precision than what the .NET type can support. In such cases, the LINQ or ESQL query can "cast" the the value to a particular .NET or EDM type to limit the precision and avoid the exception. This approach can be useful if the LINQ/ESQL query has computed/calculated columns which will store up to 38 precision in Oracle, which cannot be represented as .NET decimal unless the value is casted. 

9. Oracle Database treats NULLs and empty strings the same. When executing string related operations on NULLS or empty strings, the result will be NULL. When comparing strings with NULLs, use the equals operator (i.e. "x == NULL") in the LINQ query, which will in turn use the "IS NULL" condition in the generated SQL that will appropriately detect NULL-ness.

10. If an exception message of "The store provider factory type 'Oracle.ManagedDataAccess.Client.OracleClientFactory' does not implement the IServiceProvider interface." is encountered when executing an Entity Framework application with ODP.NET, the machine.config requires and entry for ODP.NET under the section. To resolve this issue by adding an entry in the machine.config, reinstall ODAC.

转自:http://www.oracle.com/technetwork/database/windows/downloads/odpmbetainstall-1696475.html?ssSourceSiteId=otncn  

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值