41

Visual Studio Development Lifecycle: SQL, PL/SQL, Source Control, Deployment Christian Shay Principal Product Manager -.NET Technologies, Oracle

Embed Size (px)

Citation preview

Page 1: Visual Studio Development Lifecycle: SQL, PL/SQL, Source Control, Deployment Christian Shay Principal Product Manager -.NET Technologies, Oracle
Page 2: Visual Studio Development Lifecycle: SQL, PL/SQL, Source Control, Deployment Christian Shay Principal Product Manager -.NET Technologies, Oracle

Visual Studio Development Lifecycle: SQL, PL/SQL, Source Control, Deployment

Christian ShayPrincipal Product Manager - .NET Technologies, Oracle

Page 3: Visual Studio Development Lifecycle: SQL, PL/SQL, Source Control, Deployment Christian Shay Principal Product Manager -.NET Technologies, Oracle

<Insert Picture Here>

Program Agenda

• SQL and PL/SQL Development Lifecycle– Overview– Create Users, Roles and Grant Privileges– Creating Schema Objects– Visual Studio Source Control Integration– PL/SQL and SQL Editing– SQL Tuning– PL/SQL Debugging in Visual Studio– Deployment of SQL and PL/SQL Scripts

• .NET Stored Procedures– Overview– Demo

Page 4: Visual Studio Development Lifecycle: SQL, PL/SQL, Source Control, Deployment Christian Shay Principal Product Manager -.NET Technologies, Oracle

<Insert Picture Here>

SQL and PL/SQL Development Lifecycle with Visual Studio

Page 5: Visual Studio Development Lifecycle: SQL, PL/SQL, Source Control, Deployment Christian Shay Principal Product Manager -.NET Technologies, Oracle

Oracle Application Development Lifecycle

Grant Privileges

.NET CodingPL/SQL and

SQL Editing/Debug

Source Control

Test, Tune, Deploy

Create Users/Roles

Create Schema Objects

Page 6: Visual Studio Development Lifecycle: SQL, PL/SQL, Source Control, Deployment Christian Shay Principal Product Manager -.NET Technologies, Oracle

SQL and PL/SQL Development Lifecycle Overview

• Oracle Developer Tools for Visual Studio – Tightly integrated “Add-in” for Visual Studio 2008, VS 2005

and VS .NET 2003

• ODP.NET– ADO.NET 1.x and ADO.NET 2.0 compliant data provider– Native access to Oracle database– Utilize advanced Oracle Database features

• RAC, performance, security, data types, XML, etc.

• Both available for free download today– http://otn.oracle.com/dotnet

Page 7: Visual Studio Development Lifecycle: SQL, PL/SQL, Source Control, Deployment Christian Shay Principal Product Manager -.NET Technologies, Oracle

Create Users, Roles and Grant Privileges

• User Designer• Role Designer• Grant and Revoke Privileges Dialog

Page 8: Visual Studio Development Lifecycle: SQL, PL/SQL, Source Control, Deployment Christian Shay Principal Product Manager -.NET Technologies, Oracle

D E M O N S T R A T I O N

User/Role Designer

Privileges Wizard

Page 9: Visual Studio Development Lifecycle: SQL, PL/SQL, Source Control, Deployment Christian Shay Principal Product Manager -.NET Technologies, Oracle

Create Schema Objects

• Oracle Wizards – Table Designer– PL/SQL Package Wizard– Table Import Wizard to import data– ..many others (one Wizard/Designer for every schema type)

• Query Window• Run SQL*Plus Script

Page 10: Visual Studio Development Lifecycle: SQL, PL/SQL, Source Control, Deployment Christian Shay Principal Product Manager -.NET Technologies, Oracle

D E M O N S T R A T I O N

Creating Schema Objects

Page 11: Visual Studio Development Lifecycle: SQL, PL/SQL, Source Control, Deployment Christian Shay Principal Product Manager -.NET Technologies, Oracle

Visual Studio Source Control Integration

• Configure Source Control in Visual Studio• Oracle Database Project • Generate Create Script to Source Control

Page 12: Visual Studio Development Lifecycle: SQL, PL/SQL, Source Control, Deployment Christian Shay Principal Product Manager -.NET Technologies, Oracle

D E M O N S T R A T I O N

Source Control Integration

Page 13: Visual Studio Development Lifecycle: SQL, PL/SQL, Source Control, Deployment Christian Shay Principal Product Manager -.NET Technologies, Oracle

PL/SQL and SQL Editing

• Oracle PL/SQL Editor – database based– Collapsible Regions– Syntax Coloring– Integrated Online Help– Supports Debugging

• Oracle SQL Editor – file based

Page 14: Visual Studio Development Lifecycle: SQL, PL/SQL, Source Control, Deployment Christian Shay Principal Product Manager -.NET Technologies, Oracle

D E M O N S T R A T I O N

SQL and PL/SQL Editors

Page 15: Visual Studio Development Lifecycle: SQL, PL/SQL, Source Control, Deployment Christian Shay Principal Product Manager -.NET Technologies, Oracle

SQL Tuning

• Oracle Performance Analyzer• SQL Tuning Advisor• Explain Plan feature in Oracle Query Window

Page 16: Visual Studio Development Lifecycle: SQL, PL/SQL, Source Control, Deployment Christian Shay Principal Product Manager -.NET Technologies, Oracle

Performance Tuning in Visual Studio –SQL Tuning Advisor

• Requirements– ADVISOR Privelege– Oracle Database license for Oracle Diagnostic Pack– Oracle Database license for the Oracle Tuning Pack

• How to run:– Oracle Query Window “Tune SQL” button– Oracle Performance Monitor – Tune SQL button

• Implement Findings Button– Automatically fix the problem for certain finding types

• View Report Button– View more details about how to fix a problem

Page 17: Visual Studio Development Lifecycle: SQL, PL/SQL, Source Control, Deployment Christian Shay Principal Product Manager -.NET Technologies, Oracle

Performance Tuning in Visual Studio –Oracle Performance Analyzer

• Detects performance issues in an application’s use of the database under load

• Use it when you have a running app with a load• Requirements– SYSDBA– Oracle Database license for Oracle Diagnostic Pack

Page 18: Visual Studio Development Lifecycle: SQL, PL/SQL, Source Control, Deployment Christian Shay Principal Product Manager -.NET Technologies, Oracle

D E M O N S T R A T I O N

SQL Tuning

Page 19: Visual Studio Development Lifecycle: SQL, PL/SQL, Source Control, Deployment Christian Shay Principal Product Manager -.NET Technologies, Oracle

PL/SQL Debugging in Visual Studio

• Direct Database Debugging– “Step into” a SP directly from Server Explorer

• Application Debugging– Step from application code (eg C# or ASP.NET code)

directly into PL/SQL and then return back

• External Application Debugging– Set breakpoints and debug SPs called by external

applications running on other machines or platforms

Page 20: Visual Studio Development Lifecycle: SQL, PL/SQL, Source Control, Deployment Christian Shay Principal Product Manager -.NET Technologies, Oracle

PL/SQL Debugging Configuration

• GRANT debug privileges as SYSDBA– 9.2, 10g: GRANT DEBUG ANY PROCEDURE TO username– 10g or later:

• GRANT DEBUG CONNECT SESSION TO username

• Set port range in Debugging Options page– Tools -> Options->Oracle Developer Tools

• Compile PL/SQL units for Debug– Via menu in PL/SQL editor or in Oracle Explorer

Page 21: Visual Studio Development Lifecycle: SQL, PL/SQL, Source Control, Deployment Christian Shay Principal Product Manager -.NET Technologies, Oracle

Direct Database Debugging

• “Step Into” from Server Explorer• “Run Debug” from Server Explorer• Enter parameters manually

Page 22: Visual Studio Development Lifecycle: SQL, PL/SQL, Source Control, Deployment Christian Shay Principal Product Manager -.NET Technologies, Oracle

Application Debugging Mode

• Step from .NET code into PL/SQL and back

• Check off “Tools -> Oracle Application Debugging”

• ODT automatically starts listener using port in range given in Options page

• Uncheck "Enable the Visual Studio hosting process" in the .NET Project Properties Debug tab

Page 23: Visual Studio Development Lifecycle: SQL, PL/SQL, Source Control, Deployment Christian Shay Principal Product Manager -.NET Technologies, Oracle

D E M O N S T R A T I O N

PL/SQL Debugging

Page 24: Visual Studio Development Lifecycle: SQL, PL/SQL, Source Control, Deployment Christian Shay Principal Product Manager -.NET Technologies, Oracle

Deployment of SQL and PL/SQL Scripts

• Source Control• Export/Import

Page 25: Visual Studio Development Lifecycle: SQL, PL/SQL, Source Control, Deployment Christian Shay Principal Product Manager -.NET Technologies, Oracle

<Insert Picture Here>

.NET Stored Procedures

Page 26: Visual Studio Development Lifecycle: SQL, PL/SQL, Source Control, Deployment Christian Shay Principal Product Manager -.NET Technologies, Oracle

Write .NET Stored Procedures for Oracle

Visual StudioVisual StudioEnvironmentEnvironmentVisual StudioVisual StudioEnvironmentEnvironment

Oracle Developer Oracle Developer Tools for VS.NETTools for VS.NETOracle Developer Oracle Developer Tools for VS.NETTools for VS.NET

Oracle DB Oracle DB Extensions Extensions

for .NET for .NET

Oracle DB Oracle DB Extensions Extensions

for .NET for .NET

C#,VB.NET,C++C#,VB.NET,C++Server ProjectServer Project((Use ODP.NETUse ODP.NET

if requiredif required) )

C#,VB.NET,C++C#,VB.NET,C++Server ProjectServer Project((Use ODP.NETUse ODP.NET

if requiredif required) )

Assembly Assembly foo.dll foo.dll

(proc sp)(proc sp)

Assembly Assembly foo.dll foo.dll

(proc sp)(proc sp)

BuildBuild

DevelopDevelop

Stored ProcStored Proc

Stored Stored Procedure, Procedure,

SQL .. SQL ..

Stored Stored Procedure, Procedure,

SQL .. SQL ..

ClientClientApplicationApplication

ClientClientApplicationApplication

InvokeInvoke

InvokeInvoke

DeployDeploy

Page 27: Visual Studio Development Lifecycle: SQL, PL/SQL, Source Control, Deployment Christian Shay Principal Product Manager -.NET Technologies, Oracle

Architecture

Page 28: Visual Studio Development Lifecycle: SQL, PL/SQL, Source Control, Deployment Christian Shay Principal Product Manager -.NET Technologies, Oracle

Supported Platforms

• 32 bit and 64 bit Windows• .NET Framework 1.1 or 2.0• ADO.NET 1.x, 2.0• Oracle 10.2 or later

Page 29: Visual Studio Development Lifecycle: SQL, PL/SQL, Source Control, Deployment Christian Shay Principal Product Manager -.NET Technologies, Oracle

When to use

• Ease of development• Computationally intensive code• Leverage .NET programming expertise• Leverage existing .NET code libraries• Call out to OS or Applications• When Windows platform only is OK• When no commits or rollbacks required in SP• When no distributed transactions are required

Page 30: Visual Studio Development Lifecycle: SQL, PL/SQL, Source Control, Deployment Christian Shay Principal Product Manager -.NET Technologies, Oracle

Install

• Optional Database option ships with Oracle Database 10.2 and 11g

• Latest and greatest release is part of ODAC• DBCA performs configuration• CLR Service created and started– Service is named <OracleHomeName>ClrAgnt

Page 31: Visual Studio Development Lifecycle: SQL, PL/SQL, Source Control, Deployment Christian Shay Principal Product Manager -.NET Technologies, Oracle

Stored Procedure Requirements

• Be declared a public static method.• Not be a constructor or a destructor.• Use parameter types that are compatible with the

Oracle native database types.

Page 32: Visual Studio Development Lifecycle: SQL, PL/SQL, Source Control, Deployment Christian Shay Principal Product Manager -.NET Technologies, Oracle

ODP.NET Server Side Differences

• Failover/Notifications, Transaction and Connection classes have differences

• No transactions can be started, committed, or rolled back from within a .NET SP

• No distributed transactions

Page 33: Visual Studio Development Lifecycle: SQL, PL/SQL, Source Control, Deployment Christian Shay Principal Product Manager -.NET Technologies, Oracle

<Insert Picture Here>

Next Steps

Page 34: Visual Studio Development Lifecycle: SQL, PL/SQL, Source Control, Deployment Christian Shay Principal Product Manager -.NET Technologies, Oracle

.NET Hands On Lab!

• Tuesday – 2:30pm–6:30 pm - Continental Parlor 7/8/9• Ten Lessons, work at your own pace – from beginner

level to advanced• Visual Studio 2008 and Oracle 11g preinstalled and

configured

Page 35: Visual Studio Development Lifecycle: SQL, PL/SQL, Source Control, Deployment Christian Shay Principal Product Manager -.NET Technologies, Oracle

.NET Hands On Lab!

• Developing and Deploying a .NET Stored Function • Using Database Change Notification With ODP.NET and Oracle 11g • Building ASP.NET Web Applications with Oracle Developer Tools for

Visual Studio• Getting Started with Oracle Data Provider for .NET • Building .NET Applications Using Oracle Developer Tools for Visual

Studio• Debugging Oracle PL/SQL from Visual Studio • Optimizing Data Access Performance with ODP.NET• Using Oracle User-Defined Types with .NET and Visual Studio• Tuning .NET Applications in Visual Studio with SQL Tuning Advisor

and Oracle Performance Analyzer• Using Oracle Providers for ASP.NET

Page 36: Visual Studio Development Lifecycle: SQL, PL/SQL, Source Control, Deployment Christian Shay Principal Product Manager -.NET Technologies, Oracle

.NET Demogrounds Booth

• All day Monday – Wednesday • Oracle .NET Engineering staff are there to give you a

demo and answer questions• Moscone West, first floor, far left back corner area• Booth W-011 – “.NET Development for Oracle Database”• Windows Database booth is nearby at booth W-010

Page 37: Visual Studio Development Lifecycle: SQL, PL/SQL, Source Control, Deployment Christian Shay Principal Product Manager -.NET Technologies, Oracle

Upcoming Oracle Develop .NET Sessions

• Tuesday 11:30 am - Golden Gate 1– Messaging and Event-Driven .NET Applications with

Oracle Database

• Tuesday 1:00 pm - Golden Gate 1– Optimize Oracle Data Access Performance with

Microsoft Visual Studio and .NET

Page 38: Visual Studio Development Lifecycle: SQL, PL/SQL, Source Control, Deployment Christian Shay Principal Product Manager -.NET Technologies, Oracle

Upcoming OpenWorld Sessions

• Wednesday 10:15 pm – Moscone South 236:– Microsoft Active Directory and Windows Security

Integration with Oracle Database

• Wednesday 11:45 am - Moscone South 236:– Best Practices for Performance of Oracle Database on

Windows

Page 39: Visual Studio Development Lifecycle: SQL, PL/SQL, Source Control, Deployment Christian Shay Principal Product Manager -.NET Technologies, Oracle

More Information

• .NET Technology Center– http://otn.oracle.com/dotnet

• .NET Blog– http://cshay.blogspot.com/

• For more questions– [email protected]

search.oracle.com

or

Page 40: Visual Studio Development Lifecycle: SQL, PL/SQL, Source Control, Deployment Christian Shay Principal Product Manager -.NET Technologies, Oracle

The preceding 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 decisions.The development, release, and timing of any features or functionality described for Oracle’s products remains at the sole discretion of Oracle.

Page 41: Visual Studio Development Lifecycle: SQL, PL/SQL, Source Control, Deployment Christian Shay Principal Product Manager -.NET Technologies, Oracle