DEV 301 Oracle Developer Tools for Visual Studio.NET Christian Shay, Oracle Corporation Alex Keh,...
-
Upload
chester-harper -
Category
Documents
-
view
219 -
download
0
Transcript of DEV 301 Oracle Developer Tools for Visual Studio.NET Christian Shay, Oracle Corporation Alex Keh,...
![Page 1: DEV 301 Oracle Developer Tools for Visual Studio.NET Christian Shay, Oracle Corporation Alex Keh, Oracle Corporation.](https://reader036.fdocuments.us/reader036/viewer/2022062321/56649dc65503460f94aba7bb/html5/thumbnails/1.jpg)
DEV 301Oracle Developer Tools for Visual Studio .NET
Christian Shay, Oracle Corporation
Alex Keh, Oracle Corporation
![Page 2: DEV 301 Oracle Developer Tools for Visual Studio.NET Christian Shay, Oracle Corporation Alex Keh, Oracle Corporation.](https://reader036.fdocuments.us/reader036/viewer/2022062321/56649dc65503460f94aba7bb/html5/thumbnails/2.jpg)
Agenda
Introduction
Oracle Developer Tools for VS.NET
.NET Stored Procedures Demo
Oracle Data Provider for .NET New Features
ODP.NET demo – DB Change Notification
![Page 3: DEV 301 Oracle Developer Tools for Visual Studio.NET Christian Shay, Oracle Corporation Alex Keh, Oracle Corporation.](https://reader036.fdocuments.us/reader036/viewer/2022062321/56649dc65503460f94aba7bb/html5/thumbnails/3.jpg)
Windows Development Environment Support
Visual StudioEnvironment
IIS
Oracle Developer Oracle Developer Tools for VS.NETTools for VS.NET
C++, C#, VB .NET
Application
Develop
ODP.NETODP.NET
Deploy
Oracle DB Oracle DB Extensions Extensions
For .NETFor .NET
IIS(ASP
ASP.NET)
MTS/COM+
Application
Deploy
Oracle Services for MTSOracle Services for MTS
Database Development
DB
![Page 4: DEV 301 Oracle Developer Tools for Visual Studio.NET Christian Shay, Oracle Corporation Alex Keh, Oracle Corporation.](https://reader036.fdocuments.us/reader036/viewer/2022062321/56649dc65503460f94aba7bb/html5/thumbnails/4.jpg)
Agenda
Introduction
Oracle Developer Tools for VS.NET
.NET Stored Procedures Demo
Oracle Data Provider for .NET New Features
ODP.NET demo – DB Change Notification
![Page 5: DEV 301 Oracle Developer Tools for Visual Studio.NET Christian Shay, Oracle Corporation Alex Keh, Oracle Corporation.](https://reader036.fdocuments.us/reader036/viewer/2022062321/56649dc65503460f94aba7bb/html5/thumbnails/5.jpg)
Oracle Developer Tools for Visual Studio .NET
Tightly integrated “Add-in” for Visual Studio .NET
Oracle is a premier-level partner in MS Visual Studio Industry Partner Program (VSIP)
Available for free download now
http://otn.oracle.com/dotnet
![Page 6: DEV 301 Oracle Developer Tools for Visual Studio.NET Christian Shay, Oracle Corporation Alex Keh, Oracle Corporation.](https://reader036.fdocuments.us/reader036/viewer/2022062321/56649dc65503460f94aba7bb/html5/thumbnails/6.jpg)
Develop on Windows, Database on any platform
Visual StudioEnvironment
Oracle Developer Oracle Developer Tools for VS.NETTools for VS.NET
Windows
Windows
Linux
Unix
Oracle 10g, 9i, or 8i
Other
![Page 7: DEV 301 Oracle Developer Tools for Visual Studio.NET Christian Shay, Oracle Corporation Alex Keh, Oracle Corporation.](https://reader036.fdocuments.us/reader036/viewer/2022062321/56649dc65503460f94aba7bb/html5/thumbnails/7.jpg)
Benefits
Easy to learn and intuitive
Leverage your SQL Server experience
Powerful features that enhance productivity – e.g. designers, code generation
Exposes native Oracle functionality not typically available in generic tools
Stay in Visual Studio for more of your project’s lifecycle
![Page 8: DEV 301 Oracle Developer Tools for Visual Studio.NET Christian Shay, Oracle Corporation Alex Keh, Oracle Corporation.](https://reader036.fdocuments.us/reader036/viewer/2022062321/56649dc65503460f94aba7bb/html5/thumbnails/8.jpg)
Feature Overview
Oracle Explorer – browse and alter schema
Wizards & Designers
Automatic Code Generation
PL/SQL Editor with intellisense
Oracle Data Window
Oracle Query Window (Ad Hoc SQL)
Integrated Help System – SQL, PL/SQL Keywords
![Page 9: DEV 301 Oracle Developer Tools for Visual Studio.NET Christian Shay, Oracle Corporation Alex Keh, Oracle Corporation.](https://reader036.fdocuments.us/reader036/viewer/2022062321/56649dc65503460f94aba7bb/html5/thumbnails/9.jpg)
demo
Oracle Developer Tools
![Page 10: DEV 301 Oracle Developer Tools for Visual Studio.NET Christian Shay, Oracle Corporation Alex Keh, Oracle Corporation.](https://reader036.fdocuments.us/reader036/viewer/2022062321/56649dc65503460f94aba7bb/html5/thumbnails/10.jpg)
Oracle Explorer
Tree control, similar to “Server Explorer”
View Oracle schema objects
Generate SQL for schema objects
Filter hides unwanted schema objects
A starting place for most tasks
View, alter, create schema objects
Auto generate code
View and edit Oracle data
Run stored procedures and functions
![Page 11: DEV 301 Oracle Developer Tools for Visual Studio.NET Christian Shay, Oracle Corporation Alex Keh, Oracle Corporation.](https://reader036.fdocuments.us/reader036/viewer/2022062321/56649dc65503460f94aba7bb/html5/thumbnails/11.jpg)
Designers and Wizards
Table Designer
View Designer
Stored Procedure/Function Wizard
Package Wizards
Sequence Designer
Synonym Designer
Trigger Designer
Data Adapter Wizard
![Page 12: DEV 301 Oracle Developer Tools for Visual Studio.NET Christian Shay, Oracle Corporation Alex Keh, Oracle Corporation.](https://reader036.fdocuments.us/reader036/viewer/2022062321/56649dc65503460f94aba7bb/html5/thumbnails/12.jpg)
Automatic code generation
Drag and drop a schema object from Oracle explorer
Generated code uses OracleDataAdapter class (ODP.NET)
Data Adapter Wizard can be run to customize
Generate “typed datasets” as needed
![Page 13: DEV 301 Oracle Developer Tools for Visual Studio.NET Christian Shay, Oracle Corporation Alex Keh, Oracle Corporation.](https://reader036.fdocuments.us/reader036/viewer/2022062321/56649dc65503460f94aba7bb/html5/thumbnails/13.jpg)
PL/SQL Code Editor
Syntax Coloring
Collapsible regions
Intellisense
Context sensitive help for SQL and PLSQL Keywords and Datatypes
Intelligent Error display in task list
Context sensitive help for Oracle error numbers
![Page 14: DEV 301 Oracle Developer Tools for Visual Studio.NET Christian Shay, Oracle Corporation Alex Keh, Oracle Corporation.](https://reader036.fdocuments.us/reader036/viewer/2022062321/56649dc65503460f94aba7bb/html5/thumbnails/14.jpg)
Data Window
View and Update Table data
Run Stored procedures and view data
Supports Oracle datatypes
View complex data types such as Ref Cursors
![Page 15: DEV 301 Oracle Developer Tools for Visual Studio.NET Christian Shay, Oracle Corporation Alex Keh, Oracle Corporation.](https://reader036.fdocuments.us/reader036/viewer/2022062321/56649dc65503460f94aba7bb/html5/thumbnails/15.jpg)
Oracle Query Window
Execute “Ad Hoc” SQL
Drag and drop objects from Oracle Explorer to generate SQL
Result of select statements in choice of grid or text format
Execute multiple statements in a row
Run scripts (“@myscript.sql”)
![Page 16: DEV 301 Oracle Developer Tools for Visual Studio.NET Christian Shay, Oracle Corporation Alex Keh, Oracle Corporation.](https://reader036.fdocuments.us/reader036/viewer/2022062321/56649dc65503460f94aba7bb/html5/thumbnails/16.jpg)
Integrated Online Help
Getting started
Walkthroughs
Oracle Developer Tools Reference Guide
Context sensitive help for UI elements
Context sensitive SQL and PLSQL keywords
Oracle Error Manual
Oracle SQL Reference Guide
Oracle PL/SQL Reference Guide
![Page 17: DEV 301 Oracle Developer Tools for Visual Studio.NET Christian Shay, Oracle Corporation Alex Keh, Oracle Corporation.](https://reader036.fdocuments.us/reader036/viewer/2022062321/56649dc65503460f94aba7bb/html5/thumbnails/17.jpg)
Coming Soon
PL/SQL Debugging
Many other features…..
![Page 18: DEV 301 Oracle Developer Tools for Visual Studio.NET Christian Shay, Oracle Corporation Alex Keh, Oracle Corporation.](https://reader036.fdocuments.us/reader036/viewer/2022062321/56649dc65503460f94aba7bb/html5/thumbnails/18.jpg)
Agenda
Introduction
Oracle Developer Tools for VS.NET
.NET Stored Procedures Demo
Oracle Data Provider for .NET New Features
ODP.NET demo – DB Change Notification
![Page 19: DEV 301 Oracle Developer Tools for Visual Studio.NET Christian Shay, Oracle Corporation Alex Keh, Oracle Corporation.](https://reader036.fdocuments.us/reader036/viewer/2022062321/56649dc65503460f94aba7bb/html5/thumbnails/19.jpg)
Oracle Database Extensions for .NET
Oracle 10g Release 2 on Windows
Supports C#, VB.NET, C++ Stored Procedures
Build assembly in Visual Studio .NET
Deploy from Visual Studio .NET using Deployment Wizard
![Page 20: DEV 301 Oracle Developer Tools for Visual Studio.NET Christian Shay, Oracle Corporation Alex Keh, Oracle Corporation.](https://reader036.fdocuments.us/reader036/viewer/2022062321/56649dc65503460f94aba7bb/html5/thumbnails/20.jpg)
Write .NET Stored Procedures for Oracle
Visual StudioEnvironment
Oracle Developer Oracle Developer Tools for VS.NETTools for VS.NET
Oracle DB Oracle DB Extensions Extensions
for .NET for .NET
C#,VB.NET,C++Server Project(UseODP.NETIf required)
Assembly foo.dll
(proc sp)
Build
Develop
Stored ProcStored Proc
Stored Procedure,
SQL ..
ClientApplication
Invoke
Invoke
Deploy
![Page 21: DEV 301 Oracle Developer Tools for Visual Studio.NET Christian Shay, Oracle Corporation Alex Keh, Oracle Corporation.](https://reader036.fdocuments.us/reader036/viewer/2022062321/56649dc65503460f94aba7bb/html5/thumbnails/21.jpg)
Creating a .NET SP
1) Use Visual Studio .NET to build a NET procedure or function in the usual way
2) If data access is required, use ODP.NET classes
3) Result is a .NET Assembly
4) Run .NET Stored Procedure Deployment Wizard
5) Call .NET SP as you would any other SP
![Page 22: DEV 301 Oracle Developer Tools for Visual Studio.NET Christian Shay, Oracle Corporation Alex Keh, Oracle Corporation.](https://reader036.fdocuments.us/reader036/viewer/2022062321/56649dc65503460f94aba7bb/html5/thumbnails/22.jpg)
demo
Creating and Deploying a .NET Stored Procedure into Oracle
![Page 23: DEV 301 Oracle Developer Tools for Visual Studio.NET Christian Shay, Oracle Corporation Alex Keh, Oracle Corporation.](https://reader036.fdocuments.us/reader036/viewer/2022062321/56649dc65503460f94aba7bb/html5/thumbnails/23.jpg)
Agenda
Introduction
Oracle Developer Tools for VS.NET
.NET Stored Procedures Demo
Oracle Data Provider for .NET New Features
ODP.NET demo – DB Change Notification
![Page 24: DEV 301 Oracle Developer Tools for Visual Studio.NET Christian Shay, Oracle Corporation Alex Keh, Oracle Corporation.](https://reader036.fdocuments.us/reader036/viewer/2022062321/56649dc65503460f94aba7bb/html5/thumbnails/24.jpg)
ODP.NET 10g Release 2 Themes
Better ease of use
More flexibility
Access to advanced Oracle DB features
Faster performance
![Page 25: DEV 301 Oracle Developer Tools for Visual Studio.NET Christian Shay, Oracle Corporation Alex Keh, Oracle Corporation.](https://reader036.fdocuments.us/reader036/viewer/2022062321/56649dc65503460f94aba7bb/html5/thumbnails/25.jpg)
ODP.NET - RAC and Grid
Automatic connection cleanup
ODP.NET frees connections to bad nodes automatically
Set connection pool parameter“HA events = true”
Works with 10gR2 RAC
Runtime connection load balancing
Connections divided among nodes based on metrics and admin policies
Set connection pool parameter: “load balancing = true”
Works with 10gR2 RAC
![Page 26: DEV 301 Oracle Developer Tools for Visual Studio.NET Christian Shay, Oracle Corporation Alex Keh, Oracle Corporation.](https://reader036.fdocuments.us/reader036/viewer/2022062321/56649dc65503460f94aba7bb/html5/thumbnails/26.jpg)
ODP.NET - DB Change Notification
When a DB data change occurs, client app using the data is notified
Change in a query result set, schema objects, or the state of the database
Works with 10gR2 DB
Properties
Create/Remove DB change notifications
Group multiple notifications into one registration
Persist notifications on DB server
![Page 27: DEV 301 Oracle Developer Tools for Visual Studio.NET Christian Shay, Oracle Corporation Alex Keh, Oracle Corporation.](https://reader036.fdocuments.us/reader036/viewer/2022062321/56649dc65503460f94aba7bb/html5/thumbnails/27.jpg)
Change Notification Process
1. When command is executed, the notification registration is created in the DB
2. ODP.NET starts the application listener upon notification registration
3. When a change occurs, the application is notified through either
Callback - event delegate assigned to the OracleDependency.OnChange event property
Polling - OracleDependency.HasChanges property
![Page 28: DEV 301 Oracle Developer Tools for Visual Studio.NET Christian Shay, Oracle Corporation Alex Keh, Oracle Corporation.](https://reader036.fdocuments.us/reader036/viewer/2022062321/56649dc65503460f94aba7bb/html5/thumbnails/28.jpg)
Setting up ODP.NET Change Notification
1. Create OracleDependency
2. Assign event handler to OracleDependency.OnChange event property
Event handler invoked when the change notification is received
3. Set the port for the listener to listen on
4. Bind the OracleDependency instance to the OracleCommand with the query
Internally, the DB change notification request is created and assigned to the OracleCommand.Notification property
![Page 29: DEV 301 Oracle Developer Tools for Visual Studio.NET Christian Shay, Oracle Corporation Alex Keh, Oracle Corporation.](https://reader036.fdocuments.us/reader036/viewer/2022062321/56649dc65503460f94aba7bb/html5/thumbnails/29.jpg)
demo
DB Change Notification
![Page 30: DEV 301 Oracle Developer Tools for Visual Studio.NET Christian Shay, Oracle Corporation Alex Keh, Oracle Corporation.](https://reader036.fdocuments.us/reader036/viewer/2022062321/56649dc65503460f94aba7bb/html5/thumbnails/30.jpg)
ODP.NET - Connection Pool Management
Explicitly refresh connections in a pool or pools
Clear connections from a pool or pools
One pool - Execute OracleConnection.ClearPool method
All pools – Execute OracleConnection.ClearAllPools method
Works with 10gR2 and earlier DBs
![Page 31: DEV 301 Oracle Developer Tools for Visual Studio.NET Christian Shay, Oracle Corporation Alex Keh, Oracle Corporation.](https://reader036.fdocuments.us/reader036/viewer/2022062321/56649dc65503460f94aba7bb/html5/thumbnails/31.jpg)
ODP.NET - LOB (and LONG) Retrieval
Faster performance
Fewer DB round trips for LOB retrieval
Transparent to developer
Works with 10gR2 DB
More tunable and usable
Full LOB functionality when InitialLOBFetchSize > 0
GetOracleBlob() and GetOracleClob() methods in OracleDataReader supported
InitialLOBFetchSize can be up to 2GB
Works with 10gR2 DB
![Page 32: DEV 301 Oracle Developer Tools for Visual Studio.NET Christian Shay, Oracle Corporation Alex Keh, Oracle Corporation.](https://reader036.fdocuments.us/reader036/viewer/2022062321/56649dc65503460f94aba7bb/html5/thumbnails/32.jpg)
ODP.NET - Security
Application security context
ODP.NET can set the Client Identifier in the Application Context for every database session
Similar to proxy user authentication, but requires only one session and no pre-created proxy user
Set OracleConnection.ClientIdentifier = “gold customer”
Works with 10gR2 and earlier DBs
![Page 33: DEV 301 Oracle Developer Tools for Visual Studio.NET Christian Shay, Oracle Corporation Alex Keh, Oracle Corporation.](https://reader036.fdocuments.us/reader036/viewer/2022062321/56649dc65503460f94aba7bb/html5/thumbnails/33.jpg)
ODP.NET - Additional Features
Input REF Cursors into PL/SQL
Only works when REF Cursor is output from PL/SQL first
Works with 10gR2 DB
ODP.NET works with .NET Stored Procedures
Additional ADO.NET 2.0 features for ODP.NET in 2nd half 2005
![Page 34: DEV 301 Oracle Developer Tools for Visual Studio.NET Christian Shay, Oracle Corporation Alex Keh, Oracle Corporation.](https://reader036.fdocuments.us/reader036/viewer/2022062321/56649dc65503460f94aba7bb/html5/thumbnails/34.jpg)
Next Steps
Come to the Oracle booth (Exhibition Hall Stand A21) for a one on one demonstration with .NET experts
Next Session: SVR340 Oracle on Windows Thu Jul 7 10:15 - 11:30 Room: 2c
.NET Developer Center - free downloads, demos, walkthroughs, and whitepapers
http://otn.oracle.com/dotnet
Oracle Developer Tools & .NET Stored Proc questions? Email: [email protected]
Oracle Data Provider (ODP.NET) questions? Email: [email protected]