Download presentation
Presentation is loading. Please wait.
Published byJuniper Banks Modified over 8 years ago
2
Alex Keh Principal Product Manager Windows Development Oracle Corporation
3
Developing Oracle Applications with.NET
4
Agenda Introduction Oracle Data Provider for.NET Features and Demos Best Practices Customers Future Directions
5
Why Choose Oracle? Oracle brings enterprise scalability, availability and reliability to.NET – Advanced DB features are available through Oracle Data Provider for.NET (ODP.NET) Oracle is open – DB server can be on Windows, Linux, or Unix – Developers can use either.NET or J2EE without losing DB capabilities Wide adoption
6
Oracle: A Great Database for.NET ODP.NET fully compliant with ADO.NET – No limits on using.NET functionality with Oracle Oracle DB leads the way in advanced functionality --- all exposed in ODP.NET – RAC, XML DB, grid, advanced security, etc. High performance ADO.NET provider – Lots of tuning options
7
ODP.NET - Basics Available today in production for free – http://otn.oracle.com/tech/windows/odpnet http://otn.oracle.com/tech/windows/odpnet – Original release: 2002 – 10.1.0.3 released last month Can be used with Oracle8, Oracle8i, Oracle9i, and Oracle10g database servers – DB server can be on Unix, Linux, Windows, etc. – Database client on Windows Supports VS.NET 2002 and 2003 Supports.NET Framework 1.0 and 1.1
8
ODP.NET Object Model DataSet Oracle DataAdapter Oracle Transaction Oracle Command Oracle Connection Oracle DataReader Connected Layer (ODP.NET) Disconnected Layer Oracle OracleCommand Builder Data Layer
9
D E M O N S T R A T I O N Simple “Hello World” Demo
10
Agenda Introduction Oracle Data Provider for.NET Features and Demos Best Practices Customers Future Directions
11
D E M O N S T R A T I O N Batch SQL, Oracle REF Cursors, and Multiple Active Result Sets (MARS)
12
D E M O N S T R A T I O N Passing Array Parameters
13
Key Unique Oracle on.NET Features – Top 5 Features Oracle SS2K Multiple Active Result Sets (MARS) Multiple Active Result Sets (MARS)Yes No Native XML Data Type Native XML Data Type Yes No Result Set Retrieval Tuning Options Result Set Retrieval Tuning OptionsYes No Configurable LOB Retrieval Configurable LOB Retrieval Yes No Array Parameters Array Parameters Yes No Features Oracle SS2K Multiple Active Result Sets (MARS) Multiple Active Result Sets (MARS)Yes No Native XML Data Type Native XML Data Type Yes No Result Set Retrieval Tuning Options Result Set Retrieval Tuning OptionsYes No Configurable LOB Retrieval Configurable LOB Retrieval Yes No Array Parameters Array Parameters Yes No
14
Other Unique ODP.NET Features Proxy authentication TAF Callbacks and Notifications Configurable statement cache Array binding for multiple execution Named or positional parameters DataAdapter Requery
15
ODP.NET 10.1.0.3 SQL statement caching Command cancellation and timeout DeriveParameters support – Automatic stored procedure parameter metadata population Support for ADO.NET 1.1 APIs Retrieve LOB data greater than InitialLOBFetchSize without a primary key, unique column, or rowid And bug fixes...
16
D E M O N S T R A T I O N Statement Caching
17
D E M O N S T R A T I O N Using XML Schema
18
Agenda Introduction Oracle Data Provider for.NET Features and Demos Best Practices Customers Future Directions
19
Best Practices - Connections Use connection pooling – But keep the number of connections and connection pools to a minimum Watch out for dynamically-created connection strings – Changing parameter order does not create new pools – Changing parameter values does Use proxy authentication – Effective for uniquely-identified users with same roles
20
Best Practices - Connections Use Validate Connection only if you have to – Guarantees a valid connection, BUT extra round trip – Writing your own exception handler may be better/faster Close all ODP.NET objects when finished (e.g. OracleConnection) – Do not count on the garbage collector to do this automatically
21
Best Practices – Data Retrieval and Updates Key concept: control database roundtrips – Retrieve only the data that is needed when it’s needed Single command (SELECT) tuning – Use FetchSize (OracleDataReader) and RowSize (OracleCommand) to control result retrieval – Use DataAdapter Requery Save DB round trip and from re-executing
22
Best Practices – Data Retrieval and Updates Multi-statement tuning (in one round trip) – Executing multiple, differing statements? Use anonymous PL/SQL Batches statements for execution in one round trip – Executing the same set of commands multiple times? Use statement caching Re-uses already parsed SQL or PL/SQL commands Works even if parameter values change!
23
Best Practices – Data Retrieval and Updates Multi-statement tuning (in one round trip) -- continued – Executing the same command multiple times? Use parameter array binding Statement will execute once for each array value Limited ability to use SELECT statements
24
Best Practices – Data Retrieval and Updates Multi-statement tuning (in one round trip) -- continued – Passing an array (or executing the same command multiple times)? Use PL/SQL associative arrays Statement will execute once for the entire array Can be used with SELECT statements Parameter array binding Easier to use than associative arrays However, associative arrays will have faster performance and more features
25
Best Practices – Data Types Key concept: control database roundtrips These benefits come from using ODP.NET types (e.g. OracleClob) Use OracleRefCursor class – Defers data retrieval until results needed Use Oracle LOB classes (DML) – No need to retrieve data when updating or writing to LOBs
26
Best Practices – Data Types Use Oracle LOB classes (SELECT) – Need to retrieve LOB data all at once? InitialLOBFetchSize and InitialLongFetchSize to tune LOB and LONG retrieve the Use Oracle LOBs – Need to retrieve LOB data in specific amounts? Set the Read property to retrieve the LOB data needed per round trip – Need to defer LOB retrieval until later? By default, ODP.NET LOBs use LOB locators (pointers to LOBs on the server)
27
Agenda Introduction Oracle Data Provider for.NET Features and Demos Best Practices Customers Future Directions
28
Credit Suisse First Boston Mission Critical.NET derivatives trading system – Running in London, NY, Singapore and DR locations DB Server – Production with Oracle Database 10g – XML DB, RAC, Streams, and Data Guard on Linux Middle-tier – ODP.NET 10g – Connection Pooling – Non-schema and schema-based XMLType LOB data type – Fast performance
29
Thomson Financial Internet text-based repository for financial information research DB Server – Oracle RAC on HP-UX with MC Service Guard from HP – Uses Data Guard and Replication
30
Thomson Financial Middle-tier - ODP.NET – Transparent application failover and notifications TAF support works great in failing over queries and re- starting transactions – XMLType – data in XML – Extensive LOB and temporary LOB manipulation – Connection pooling
31
Agenda Introduction Oracle Data Provider for.NET Features and Demos Best Practices Customers Future Directions
32
Future Directions Themes Better ease of use More flexibility Access to advanced Oracle DB features Faster performance ADO.NET 2.0 compliance
33
Future Directions ODP.NET improvements for RAC and Grid – Fast connection failover ODP.NET frees connections to bad nodes and creates new connections to healthy ones – Runtime load balancing Sets how connections are to be divided among RAC instances based on percentage ODP.NET DB change notification – When a DB data change occurs, client result sets using the data are notified – Ensure clients have the latest data
34
Future Directions ODP.NET Connection Pool Management – Explicitly refresh connections in a pool or pools ODP.NET LOB retrieval – Faster performance Fewer DB round trips for LOB retrieval – Easier tunability and usability Full LOB functionality with IntialLOBFetchSize InitialLOBFetchSize can be greater than 32 KB ODP.NET VPD – Application security context
35
Future Directions ADO.NET 2.0 – Complying with new spec – Support new ADO.NET 2.0 features .NET stored procedures – Run C# and VB.NET code as stored procedures Oracle Developer Tools for Visual Studio – Code wizards – Browse and edit Oracle schema – Browse and edit stored procedures – And more…
36
For More Information during OW Presentation: Oracle Developer Tools for Visual Studio.NET – Follows current presentation More demonstrations – Oracle on.NET booth at the demogrounds – Oracle on Windows Pavilion at the demogrounds
37
For More Information after OW ODP.NET – http://www.oracle.com/technology/tech/windows/odpnet/ http://www.oracle.com/technology/tech/windows/odpnet/ Oracle’s.NET Developer Center – http://www.oracle.com/technology/tech/dotnet/ http://www.oracle.com/technology/tech/dotnet/ Oracle’s Windows Technology Center – http://otn.oracle.com/windows/ http://otn.oracle.com/windows/ Subscribe to the ODP.NET mailing list – Send email to odpnet_us@oracle.com with Subject line: “Subscribe” Email me: alex.keh@oracle.comalex.keh@oracle.com
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.