Post on 02-Oct-2014
© 2009 Oracle Corporation – Proprietary and Confidential
AGENDA
Presentation – approximately 60 minutes
Q&A Session – approximately 15 minutes
Web attendees can ask questions via Q&A panel
Phone attendees can ask questions via Q&A panel or
phone (operator assisted)
Please hold all phone questions until the end of the presentation
© 2011 Oracle Corporation – Proprietary and Confidential
Q&A panel
type your question here1
Send your question3
Who to ask?2
© 2011 Oracle Corporation – Proprietary and Confidential
your question pop-up here
© 2011 Oracle Corporation – Proprietary and Confidential
ATTENTION – AUDIO INFORMATION
Voice streaming/Audio broadcast is available.
For full audio access join teleconference.
Teleconference Connect details:
1. Conference ID: 73387209
2. International dial in: +44 (0) 1452 562 665
3. List with national toll free numbers is available in note 1328070.1
Note:
You can view this info anytime using WebEx menu:
Communicate > Join Teleconference
from your WebEx session
© 2011 Oracle Corporation – Proprietary and Confidential
<Insert Picture Here>
Oracle Data Provider for .NET (ODP) Installation and Deployment
Considerations
Greg Darling - Principal Support Analyst, Oracle
Jenny Jackson - Senior Principal Support Analyst, Oracle
AGENDA
Presentation – approximately 60 minutes
Q&A Session – approximately 15 minutes
Web attendees can ask questions via Q&A panel
Phone attendees can ask questions via Q&A panel or
phone (operator assisted)
Please hold all questions until the end of the presentation
© 2011 Oracle Corporation – Proprietary and Confidential
© 2011 Oracle Corporation – Proprietary and Confidential
The following is intended to outline our general
product direction. It is intended for information
purposes only, and may not be incorporated into
any contract. It is not a commitment to deliver any
material, code, or functionality, and should not be
relied upon in making purchasing decision. The
development, release, and timing of any features
or functionality described for Oracle’s products
remains at the sole discretion of Oracle.
Safe Harbor Statement
<Insert Picture Here>
Oracle Data Provider for .NET (ODP) Installation and Deployment
Considerations
Greg Darling - Principal Support Analyst , Oracle
Jenny Jackson - Senior Principal Support Analyst, Oracle
<Insert Picture Here>
Program Agenda
ODP Installation
ODP Runtime Considerations
Deployment Strategies
Considerations for Integration with 3rd party products
© 2011 Oracle Corporation – Proprietary and Confidential
<Insert Picture Here>
ODP Installation
- What gets installed where
© 2010 Oracle Corporation – Proprietary and Confidential
Oracle.DataAccess.dll
OraOpsX.dll
OCI.dll
Oracle Client
ODP.NET pieces:
Oracle.DataAccess.dll
IS the ODP.NET provider
Strongly Named
Managed code
OraOpsX(w).dll
Contains the unmanaged Oracle Call
Interface (OCI) implementation code used by ODP
X is the major version
“w” is for .net 2 and higher.
Example: oraops11w.dll
OCI.dll
Loaded by OraOps, entry point to OCI calls
Oracle Client
Full client
Instant Client
Instant Client vs Full client
Both ODAC and Full Client include ODP.NET
ODAC bundle includes Instant Client distribution
OCI.dll will load oraociei11.dll
Full Client installation bundle
OCI.dll will load oracleint11.dll
New features are introduced in ODAC bundle first,
and then rolled into later versions of full client.
File Locations
Oracle.DataAccess.dll
%ORACLE_HOME%\ODP.NET\bin\<framework_version>
OraOpsX(w).dll
%ORACLE_HOME%\bin
OCI.dll and Oracle Client
Full client (older ODAC, or via full client install media):
%ORACLE_HOME%\bin
Instant Client (included with ODAC 11.1.0.6.20 or higher)
%ORACLE_HOME%\
Typical ODP.NET Setup
In addition to copying the files to the OS, the following
configuration steps are typically performed when installing ODP
via the OUI:
Oracle.DataAccess.dll is registered in the Global Assembly
Cache (GAC)
Policy files (Policy.2.112.Oracle.DataAccess.dll for example) are
registered in the GAC
Machine.config – install overwrites previous entries
Factory Classes (System.Data.Common)
Config settings (<configSections>)
Registry
Machine wide ODP.NET settings
Path environment variable
This may break older installs as newest home is put first in
the PATH.
Global Assembly Cache
Well known location to search for assemblies
Location(s):
NET 1.x,2.x,3.x
c:\windows\assembly
NET 4
C:\windows\microsoft.net\framework\assembly
Registering things in the GAC
OraProvCfg is used by the Oracle Universal Installer
(OUI) to add/remove things from that GAC
Complete usage for OraProvCfg can be found by executing
OraProvCfg at a command prompt with no arguments.
OraProvCfg is .NET version specific, and found in the same
location as Oracle.DataAccess.dll
Example usage in the following note on My Oracle Support
HOWTO: Example use of OraProvCfg.exe to add/remove Oracle
assemblies from the Global Assembly Cache (Doc ID 1169890.1)
Registry setup
Used for machine-wide ODP.NET settings
EnablingTracing
Configuration options
Enabling Performance Counters
DLLPATH
This setting is used to control where ODP.NET will load
dependencies from
Accomplished via SetDllDirectory
Includes the directory specified, and the one above it
Policy Files
Consists of dll and a .config file
Example: Policy.2.112.Oracle.DataAccess.dll
Used to globally forward re-direct applications looking
for lower versions of ODP.NET
Located at %Oracle_home%\odp.net\PublisherPolicy\<framework_version>
Registered in the GAC by default
Older apps will automatically use the newer ODP
Do not span framework versions
Spanning framework versions or backwards redirection can
be accomplished via app/web.config, but is not
recommended.
1.x support discontinued in 11.1.0.7.20 and higher (ie, no 1.x
Policy file). 1.x app will fail if deployed to 11.2 client.
Things to know when you add ANOTHER Oracle
client
PATH is changed.. New home goes to the front of the
PATH
Could break apps that rely on PATH
DBProviderFactories entry is overwritten with most
recently installed version.
Policy files may be overwritten.
TNSNames.ora needs to be created, or TNS_ADMIN
set.
ODP.NET Registry entries get added, not overwritten.
Demo
<Insert Picture Here>
Runtime Considerations
- What happens at runtime
© 2010 Oracle Corporation – Proprietary and Confidential
Loading things at runtime
1. The Common Language Runtime (CLR) Assembly
Loader loads ODP.NET (Oracle.DataAccess.dll)
2. ODP.NET loads OraOpsXw.dll (version must match)
3. OraOpsXw.dll is responsible for the rest of the client
DLLS loaded via static and dynamic dependencies
on the Oracle Call Interface (OCI).
Checks are made to ensure the proper dependencies are
loaded (major version must match)
A mismatch between ODP and OraOpsXw.dll and/or
client dll’s will result in
System.TypeInitializationException: The
provider is not compatible with the version of
Oracle client
CLR Assembly Loader – how ODP gets loaded
By default, a .NET app will only run with the version it
is compiled with unless a) Binding Redirect is used or
b) Publisher Policy files are found.
Failure to find the referenced assembly results in
System.IO.FileNotFoundException: Could not load file or assembly
'Oracle.DataAccess, Version=X.X.X, Culture=neutral,
PublicKeyToken=89b483f429c47342' or one of its dependencies. The system
cannot find the file specified.
ODP.NET installation DOES include Policy files by
default, which globally affect the machine. These can
be removed from the GAC, or overridden in
app/web.config.
CLR Assembly Loader – how ODP gets loaded
In a nutshell, at runtime the .NET CLR
1. Checks for binding redirects to determine what
version to load
CLR checks for redirect
1. App/web.config first, which overrides
2. Publisher Policy files
If no redirects are found, the version used is the version
referenced at compile time.
2. After version is determined, the CLR
1. Checks the GAC for strongly named assemblies (which
ODP is).
2. Checks local app directory for the assembly
Controlling which ODP is loaded
Publisher Policy Files
Remove from GAC if desired, which will affect installation globally
Override in app.config / web.config via
<publisherPolicy apply="no" />
Binding Redirect in app.config / web.config<bindingRedirect oldVersion="2.111.7.0" newVersion="2.112.1.0" />
<bindingRedirect oldVersion="0.0.0.0-
65535.65535.65535.65535“ newVersion="2.112.1.0" />
.NET Framework Configuration tool (GUI)
Binding Redirect Example
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<runtime>
<assemblyBinding …xmlns=“ … >
<dependentAssembly>
<assemblyIdentity name="Oracle.DataAccess” publicKeyToken="… />
<bindingRedirect oldVersion="2.111.7.0" newVersion="2.112.1.0" />
<publisherPolicy apply="no" />
</dependentAssembly>
</assemblyBinding>
</runtime>
<configuration>
So ODP is loaded, what about the rest of the
unmanaged dependencies?
Recall ODP > OraOpsXw.dll > OCI.dll > client libraries
Versions prior to 10.2.0.2.20 require that the directory
the client libraries are in be in your PATH environment
variable.
10.2.0.2.20 and higher, ODP makes use of Windows
API call SetDllDirectory , so no longer has
dependencies on OS PATH.
DLLPath is the ODP.NET setting that controls what
ODP calls SetDllDirectory with.
Set by default in the registry when installing ODP
HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\ODP.NET\<version>
Can also be set in app/web.config
App.config / web.config
Application configuration file, auto loaded by CLR
File Names
Myapp.exe.config will automatically be loaded by the CLR
when Myapp.exe is loaded.
Web app automatically loads web.config
In addition to controlling ODP version loaded (via
redirect) , app/web.config can be used to pass
parameters to ODP when it is desired to set them at
the app level rather than globally.
Tracing, Performance counters, DLLPath, other options.
Requires section name="oracle.dataaccess.client“ in
<configSections>, which gets installed by default in
machine.config
Multiple Oracle Home/Side by Side Considerations
- Multiple versions for use by multiple apps
In order to use Multiple versions of ODP side by side
in multiple applications
Only a single version lower than 10.2.0.2.20 can be used,
because it needs to have the dependencies directory (ie,
%OH%\bin) first in the PATH environment variable.
Policy files may need to be removed or overridden
DLLPath needs to be set correctly so that ODP loads the
proper dependencies.
By default, each ODP version has it’s own registry hive
and is set correctly during the installation.
If you can get the proper ODP loaded, the rest of the client
dependencies should fall into place.
Multiple Oracle Home/Side by Side Considerations
- Factory Classes (System.Data.Common)
When using Factory classes, the CLR relies on machine.config
to determine what provider is used.
Installing a new ODP version overwrites machine.config.
To use multiple versions, the entry can be overridden in
app/web.config.<system.data>
<DbProviderFactories>
<remove invariant="Oracle.DataAccess.Client" />
<add name="Oracle Data Provider for .NET" invariant="Oracle.DataAccess.Client"
description="Oracle Data Provider for .NET"
type="Oracle.DataAccess.Client.OracleClientFactory, Oracle.DataAccess, Version=2.111.7.0,
Culture=neutral, PublicKeyToken=89b483f429c47342"/>
</DbProviderFactories>
</system.data>
Demo
<Insert Picture Here>
Deployment Strategies
© 2011 Oracle Corporation – Proprietary and Confidential
Install Media Bundles – Client media vs. ODAC
ODAC (Oracle Data Access Components) is a download bundle
containing Windows client drivers (ODP.NET, OLEDB, ODBC,
etc) and Instant Client Oracle client software.
with the exception of Oracle Developer Tools for Visual Studio,
ODAC is available as an OUI or xcopy bundle
The same products come as part of the full Oracle
client installation as well.
with the exception of Oracle Developer Tools for Visual
Studio,
© 2011 Oracle Corporation – Proprietary and Confidential
Install Media Bundles – Client media vs. ODAC
Functionality differences between ODAC release and
full client release
New ODP.NET functionality is on a separate release
schedule than the client/database software, and is released
as part of ODAC bundles.
x86 ODAC is generally released first. There may or may
not be an equivalent X64 ODAC release.
New ODP functionality is rolled up into the next major
database patch version, both x86 and x64
Example: 11.2.0.1.2 x86 ODAC was rolled into
11.2.0.2.0 full client, both 32 bit and 64 bit.
© 2011 Oracle Corporation – Proprietary and Confidential
Deployment Options
OUI Interactive Install – ODAC IC or Full Client
Xcopy Install – ODAC IC
Simple Unzip Approach/Redistributing Minimal set of
Binaries
© 2011 Oracle Corporation – Proprietary and Confidential
Deployment Options (Continued)
OUI Interactive Install – ODAC IC or Full Client
The oracle universal installer performs the installation based
on user interactive choices
Copies all required dependencies
Setups the registry
Registers the oracle.dataaccess assembly in the GAC
Modifies the machine.config for use with factory classes
Cons
Requires an administrator or user with administrator rights
to perform the install.
OUI is java based and can sometimes be problematic
© 2011 Oracle Corporation – Proprietary and Confidential
Deployment Options (Continued)
Xcopy Install
Streamlined deployment bundle based on xcopy strategy
Copies all required dependencies
Setups the registry
Registers the oracle.dataaccess assembly in the GAC
Modifies the machine.config for use with factory classes
Pros
Simple xcopy install via the command line or integration
into custom install scripts.
Control over installation with command line options
Less problematic
© 2011 Oracle Corporation – Proprietary and Confidential
Deployment Options (Continued)
Simple Unzip strategy
Minimum binaries needed
oracle.dataaccess.dll (managed layer)
oraopsxxw.dll (unmanaged layer)
orannzsbb11.dll
oraociei11.dll *
oci.dll
* Note: oraociicus11.dll from the Instant Client Lite install bundle can
be substituted for oraociei11.dll if a smaller disk footprint is
desired. However, oraociicus11.dll only supports English error
messages.
© 2011 Oracle Corporation – Proprietary and Confidential
Deployment Options (Continued)
Simple Unzip strategy
Setup Requirements
Copy the minimum required binaries to the application bin
directory.
Use the ezconnect adaptor (//hostname:port/service name)
or setup and copy the tnsnames.ora and sqlnet.ora files to
a good known location.
Set up a TNS_ADMIN system variable if using local
naming resolution to point to the location of the network
configuration files
© 2011 Oracle Corporation – Proprietary and Confidential
Deployment Options (Continued)
Simple Unzip strategy
Limitations
Assembly is not registered in GAC so its unavailable for
multiple applications.
No publisher policy files for forward redirection
Registry keys not created so extra steps may be needed to
setup some parameters such as the tracing facility in the
web.config or app.config file.
DLLPATH not present in registry so the loading of
Oracle.DataAccess.dll and other depenedencies will reply
on the Windows loader and rules for the order in which
they are searched, found and loaded into the process
space
© 2011 Oracle Corporation – Proprietary and Confidential
Deployment Considerations - 32 bit vs 64 bit
With the introduction of 64 bit Windows operating
system, Microsoft provides the ability to run 32 bit
applications via the WOW64 subsystem. As both 64
bit and 32 bit applications can be run on a 64 bit
operating system, issues may be encountered if the
correct bit version of the Oracle client software is not
installed to meet your specific requirements.
32 bit apps need 32 bit Oracle client software, 64 bit apps
need 64 bit
Oracle does not provide one install bundle that installs both
bit versions, so to run both 32 bit and 64 bit apps on the same
system, both 32 bit and 64 bit Oracle client software will need
to be installed into separate homes.
© 2011 Oracle Corporation – Proprietary and Confidential
64 and 32-bit Oracle Data Provider for .NET
Oracle Data Provider for .NET (ODP.NET)
Available in both 32 bit and 64 bit.
The Windows Explorer plug-in is used to manipulate the .NET 2.0,
3.,0 and 3.5 Global Assembly Cache (GAC).
Shows both 32 bit and 64 bit assemblies.
GAC for .NET 2.0, 3.0 and 3.5 and is at C:\Windows\assembly\
32 bit GAC is in GAC_32
64 bit GAC is in GAC_64
GAC for .NET 4 is at C:\WINDOWS\Microsoft.NET\assembly
.NET apps will run as 64 bit on a 64 bit OS, and 32 bit on a 32 bit
OS if compiled with a target platform of ANYCPU.
© 2011 Oracle Corporation – Proprietary and Confidential
64 and 32-bit Application Settings
Settings:
ANYCPU
runs as 32 bit on 32 bit OS, 64 bit on 64 bit OS
x86
forces app to run as 32 bit, regardless of host OS architecture
x64
application will only run as 64 bit process, so will only run on
64 bit OS
Defaults
Prior to VS2010, all VS versions defaulted to ANYCPU
As of VS2010, default is now x86.
Command line compile still defaults to ANYCPU though.
© 2011 Oracle Corporation – Proprietary and Confidential
64 and 32-bit Application Deployment Issues.
Most common exception is BadImageFormatException
Is app running as 32 bit or 64 bit?
Easiest way to tell is to start the process and check the
Process tab in Task Manager.
32 bit processes have *32 as part of their name.
Is Oracle software 32 bit or 64 bit?
Check the registry, for Oracle > Oracle home name >
ORACLE_HOME.
64 bit software
HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE
32 bit software on 64 bit OS
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\ORACLE
© 2011 Oracle Corporation – Proprietary and Confidential
Common Deployment Issues
Most common exception is System.TypeInitializationException
System.TypeInitializationException
System.TypeInitializationException: The provider is not
compatible with the version of Oracle client
Use Microsoft Utilities such as Process Explorer/Monitor to
verify what version of Oracle.DataAccess.dll and
OraOpsxxw.dll are being loaded into the process space
Verify version of oraocieiXX.dll for IC deployment/unzip
Verify version of oraclientXX.dll for full client
© 2011 Oracle Corporation – Proprietary and Confidential
Common Deployment Issues (Continued)
Other exceptions: System.IO.FileNotFoundException:
Could not load file or assembly 'Oracle.DataAccess,
Version=X.X.X
System.IO.FileNotFoundException
System.IO.FileNotFoundException:
System.IO.FileNotFoundException: Could not load file or
assembly 'Oracle.DataAccess, Version=X.X.X,
Culture=neutral, PublicKeyToken=89b483f429c47342' or one
of its dependencies. The system cannot find the file specified.
Verify the version of the ODP assembly your application was
compiled with and also the bitness of your
application/assembly
© 2011 Oracle Corporation – Proprietary and Confidential
<Insert Picture Here>
ODP.NET Deployment Demo
© 2011 Oracle Corporation – Proprietary and Confidential
<Insert Picture Here>
Considerations for Integration
with 3rd party products
© 2011 Oracle Corporation – Proprietary and Confidential
SQL Server Integration Services BI Development
Suite
Visual Studio - 32-bit IDE
Design tools are 32-bit
Creation of a ADO.NET data source using connection
manager requires 32-bit ODP.NET
Designing on 32-bit Windows, packages can be deployed to
64-bit Windows to run in 64-bit mode
Designing on 64-bit Windows, must have 32-bit oracle client
and ODP.NET installed even if you are planning on running
the package in 64-bit mode
Additional details: http://msdn.microsoft.com/en-
us/library/ms141766.aspx
© 2011 Oracle Corporation – Proprietary and Confidential
Microsoft Internet Information Services
IIS 6.0Windows 2003 SP1 provides compatibility layer to allow IIS to host
32-bit web applications within IIS
Supports 32-bit worker processes in IIS worker process isolation
mode
Only the World Wide Web Publishing service can run 32-bit and
64-bit worker processes. Other IIS services such as ftp and others
run as 64-bit.
Cannot run both 64 and 32-bit worker processes concurrently on
IIS 6.0. Its one or the other not both.
Worker process bitness determines oracle client and data access
driver bitness
Enable 32-bit worker processes by running admin script from
%systemdrive%\Inetpub\AdminScripts
Command: cscript.exe adsutil.vbs set
W3SVC/AppPools/Enable32BitAppOnWin64 “true”
© 2011 Oracle Corporation – Proprietary and Confidential
Microsoft Internet Information Services
IIS 7.0
Windows 2008 introduced IIS 7.0
Can run both 64 and 32-bit worker processes concurrently
on IIS 7.0.
Set a configuration property on the application pool to
enable 32-bit worker processes
Set property “Enable 32-bit Applications” to True in the
advanced settings
Worker process bitness determines oracle client and
ODP.NET bitness. If hosting both 64 and 32-bit web
applications that access an oracle database then you must
install both the required 64-bit and 32-bit components.
© 2011 Oracle Corporation – Proprietary and Confidential
Oracle Developer Tools for Visual Studio
32-bit Plugin for Visual Studio
Allows connectivity from Server Explorer
There is no 64-bit Developer Tools because there is no 64-
bit release of the Visual Studio IDE .
If developing on x64 and need ODT, then you will need to
install the 32-bit ODT and ODP.NET into a unique home
and the 64-bit ODP.NET and dependencies into another
Separate Install Bundles
© 2011 Oracle Corporation – Proprietary and Confidential
<Insert Picture Here>
3rd Party Integration Demo
© 2011 Oracle Corporation – Proprietary and Confidential
What Coming Down the Road
Entity Framework and LINQBeta 2 released for 32-bit
http://www.oracle.com/technetwork/topics/dotnet/whatsnew/index.html
Production in Q4 2011
100% Managed ProviderIncluding Oracle Client
Fully ADO.NET compliant
Release schedule Beta – coming soon - 2011
Production – End of 2011 or Early 2012
© 2010 Oracle Corporation – Proprietary and Confidential
© 2011 Oracle Corporation – Proprietary and Confidential
Q&A panel
type your question here1
Send your question3
Who to ask?2
© 2011 Oracle Corporation – Proprietary and Confidential
© 2011 Oracle Corporation – Proprietary and Confidential
THANK YOU