68
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 1

1 Copyright © 2012, Oracle and/or its affiliates. All rights reserved. · ODAC 11.2 Release 4 (11.2.0.3) – December 2011 ... – Oracle Developer Tools supports Visual Studio 2012

  • Upload
    others

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

  • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 1

  • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 2

    What’s New For Oracle and .NET

    Alex Keh, Christian Shay

    Principal Product Managers, Oracle

  • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 3

    Program Agenda

    ODAC Release Schedule

    Visual Studio 2012 and .NET Framework 4.5

    Schema Compare Tools

    Pluggable Databases

  • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 4

    Program Agenda

    High Availability

    Ease of Application Migration

    Managed ODP.NET

    Entity Framework

  • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 5

    Oracle .NET Development Environment

    Visual

    Studio

    Application

    Development Deploy

    Deploy

    Database

    Development

    Oracle Data

    Provider for .NET

    Oracle Developer Tools

    for Visual Studio

    Oracle Database

    Extensions for .NET

    Oracle Providers for

    ASP.NET

    .NET

    Framework

    Web or

    Client/Server

  • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 6

    ODAC Release Schedule

  • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 7

    Recent ODAC Releases

    ODAC 11.2 Release 4 (11.2.0.3) – December 2011

    – Entity Framework

    – LINQ to Entities

    – WCF Data Services

    – Query Window improvements

    ODAC 11.2 Release 5 (11.2.0.3.20) – September 2012

    – Visual Studio 2012

    – .NET Framework 4.5 certification

    – Entity Framework 5 certification

  • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 8

    Upcoming ODAC Releases

    Oracle Database 12c Release 1

    – High availability

    – Ease of application migration

    – Pluggable Databases

    ODAC 12c

    – Managed ODP.NET

    – Oracle Schema Compare

    – Production release – CY 2013

    Soon after Oracle Database 12c Release 1 on Windows release

  • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 9

    Visual Studio 2012 and .NET Framework 4.5

  • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 10

    Microsoft Visual Studio 2012 and .NET 4.5

    Supported by ODAC 11.2 Release 5

    – Released simultaneously with Microsoft Visual Studio launch

    – Oracle Developer Tools supports Visual Studio 2012

    – ODP.NET supports .NET 4.5

    Both 32-bit and x64 certified

    Both xcopy and OUI versions

    Oracle – official VSIP partner

  • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 11

    Visual Studio Launch Partner

  • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 12

    Schema Compare in Visual Studio

  • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 13

    Schema Compare

    Upcoming in Oracle Developer Tools for Visual Studio

    – ODAC 12c

    Compare two schemas in the same or different dbs

    – Visually inspect differences using UI

    – Generate a diff script for deployment purposes

    – Can compare down to granularity of schema type (eg compare

    all tables, or all packages, etc)

  • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 14

    Schema Compare

    Start with a local instance identical to production db

    As development of .NET app progresses, local db

    schema evolves to meet needs of app

    Use SC as needed to inspect what has changed

    When development is complete, use SC to compare

    development vs production to generate diff script

    Deploy diff script with app to bring production db up to

    required version of schema

    Typical Use Case of Visual Studio Developer

  • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 15

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

    Schema Compare

  • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 16

    Pluggable Databases

  • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 17

    Root

    PDB SEED Empty

    ERP PDB

    Provision empty

    PDBs per database

    that need to be

    consolidated

    Empty

    DW PRB

    Empty

    CRM PDB

    Database Consolidation Oracle Pluggable Databases

  • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 18

    Fast Cloning Pluggable Database Cloning and Snapshots

    • Create PDB clones

    easily within single

    Container DB (CDB)

    • On clone triggers

    make it possible to

    scrub or mask data

    • Clone even faster on

    file systems

    supporting copy-on-

    write

    Root

    PDB SEED Empty

    ERP PDB ERP

    PDB

    ERP Copy 1

    PDB

    ERP Copy 2

    PDB

  • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 19

    Root

    PDB SEED

    11.2

    ERP DB

    10.2

    DW DB

    11.2

    CRM DB

    Data Pump Replication

    • Provision empty

    PDBs per

    database that need

    to be consolidated

    • Use datapump or

    replication to

    migrate a

    Database into a

    PDB

    Database Consolidation of Existing Databases Logical data migrations for pre-12.1 Databases

    Empty

    CRM PDB

    Empty

    ERP PDB

    Empty

    DW PDB CRM

    PDB

    ERP

    PDB

    DW

    PDB

  • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 20

    Database Consolidation of Existing Databases Plug-in 12.1 Standalone Databases

    Root

    • Upgrade an

    existing pre-12.1

    database to 12.1

    • Plug-in the

    database post

    upgrade into a

    CDB

    PDB SEED

    12.1

    ERP DB

    12.1

    DW DB

    12.1

    CRM DB

    Root

  • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 21

    PDB Functionality in Visual Studio

  • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 22

    PDB Functionality with ODP.NET

    ODP.NET works implicitly with PDBs

    Requires Oracle Database 12c and ODAC 12c

  • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 23

    PDB Functionality in Server Explorer

    Pluggable Databases Node

    – Menu: Plug, Generate Create Script

    Pluggable Databases Node

    – Menu: Clone, Unplug, Delete, Status, Generate Create Script

  • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 24

    High Availability

  • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 25

    ODP.NET FAN Uses ONS

    Oracle Notification Service (ONS) replaces AQ

    Benefits

    – Faster, more scalable, eliminates firewall issue, supports Active

    Data Guard, and consolidates publish/subscribe service

    No code changes required

    Requires ODP.NET 12c

  • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 26

    Global Data Services

    Extend RAC services to a global basis

    – Access to FCF, load balancing, and affinity capabilities

    – RAC, Active Data Guard, and GoldenGate can participate

    Optimizes utilization, HA, and performance

    No code changes

    Requires Oracle Database 12c and ODP.NET 12c

  • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 27

    Global Data Services Concepts

    Without GDS

    Sales Service Sales Service

    GoldenGate GoldenGate

    Sales Global Service

    With GDS

  • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 28

    Faster and More Graceful Planned Outage

    Offline DB alerts ODP.NET of impending downtime

    ODP.NET stops allocating and closes idle connections

    – Connections returned to the pool are closed

    Benefit – DB brought offline as quickly as possible

    without end user disruptions

    Set ODP.NET attribute “HA Events = true”

    Requires Oracle Database 12c and ODP.NET 12c

  • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 29

    Transaction Guard

    ODP.NET can determine whether a transaction

    committed even upon some DB failure

    Benefit – Ensure transaction commits at most one time

    – No duplicates

    Transaction outcome can be queried by the application

    – OracleConnection properties return transaction id and status

    – OracleLogicalTransactionStatus class

    Requires Oracle Database 12c and ODP.NET 12c

  • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 30

    Transaction Guard

    Oracle Database 12c Release 1

    1. Request

    2. Calls

    4. Guaranteed Outcome

    3. Enforce Outcome

  • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 31

    Recoverable Error Detection and Recovery

    After DB error, ODP.NET determines if failed transaction

    is recoverable or not

    – Returns error message if operation cannot be retried

    ODP.NET OracleException property indicates if

    transaction recoverable and can be retried

    Benefit – Easier to determine next step in transaction

    recovery process

    Requires Oracle Database 12c and ODP.NET 12c

  • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 32

    Connection Timeout Error Improvement

    Returns specific error when no connection allocation

    possible due to max pool size limit

    – Previously, error was vague

    – Can distinguish CP errors from other client and server errors

    Benefit – Easier to identify and resolve CP-related error

    No code changes to use

    – If already capturing error messages

    Requires ODP.NET 12c

  • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 33

    Ease of Application Migration

  • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 34

    Implicit REF CURSOR (RC)

    ODP.NET retrieves result set without explicit RC

    declaration nor RC metadata in .NET config

    Can retrieve multiple implicit RCs

    – ExecuteNonQuery – Returns array of RCs

    – ExecuteReader – Returns DataReader, each accessible via

    calling NextResult

    Benefit – Simplifies retrieving result sets from PL/SQL

    Entity Framework will still require result set metadata in

    .NET config

  • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 35

    Boolean Data Type

    ODP.NET OracleBoolean data type

    – Can be used with PL/SQL Booleans

    Benefit – Eases parameter binding

    – Stored procedures

    – Entity Framework Function Imports

  • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 36

    Identity Column

    DB automatically generates auto-incrementing value as

    needed

    – Supports ANSI’s IDENTITY keyword

    Benefit – Easier to set up auto incrementing values,

    such as for primary keys

    Integrated with ODT and ODP.NET

    – E.g. ODT: Create table with auto-incrementing Identity column

    – E.g. ODP.NET: Add row without explicitly providing identity value

  • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 37

    Large VARCHAR2, NVARCHAR2, and RAW

    ODP.NET VARCHAR2, NVARCHAR2, and RAW data

    types now can be up to 32 KB in size

    Benefit – Remain with fundamental data types even with

    larger data

    – No need to modify schema or use more advanced type

  • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 38

    Return Row Count Per Array DML Iteration

    ODP.NET returns number of rows affected for each input

    value, not just the total number of rows affected

    New OracleCommand.ArrayBindRowCount property

    – Returns number of affected rows for each executed array bound

    DML iteration

    Benefit – Provides more info on DML correctness and

    efficiency

  • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 39

    Managed ODP.NET

  • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 40

    Managed ODP.NET vs. Unmanaged ODP.NET

    One assembly for both 32-bit and x64

    Easier side by side deployment

    Deploy smaller and fewer binaries

    – Before: 150 MB

    – After: Less than 10 MB

    Easier patching process

    Fully integrated with Code Access Security

    Advantages

  • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 41

    Current ODP.NET Architecture Managed and Unmanaged

    ODP.NET

    Oracle.Data

    Access.dll

    ODP.NET

    Unmanaged

    DLLs Oracle

    OCI

    Unmanaged Managed

    NET

    Database

  • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 42

    Forthcoming ODP.NET Architecture Fully Managed

    ODP.NET

    Oracle.Managed

    DataAccess.dll Oracle

    Managed Database

  • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 43

    Managed ODP.NET

    100% managed provider

    Assembly

    – Oracle.ManagedDataAccess.dll

    No other Oracle Client files required

    – Unless using distributed transactions

    Namespaces

    – Oracle.ManagedDataAccess.Client

    – Oracle.ManagedDataAccess.Types

  • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 44

    Managed ODP.NET

    Same assembly for either 32-bit and x64 Windows

    Can be deployed side by side

    – With unmanaged ODP.NET

    – With managed ODP.NET

    Installable via OUI and xcopy

    Beta currently downloadable from OTN

  • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 45

    Managed ODP.NET

    Certified with

    – .NET Framework 4 and higher only

    – Visual Studio 2010 and 2012

    Supports Oracle DB 10.2 and higher

  • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 46

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

    Hello (Managed) World

  • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 47

    Managed ODP.NET Features

    Standard ADO.NET provider objects, methods, and

    properties

    Visual Studio drag and drop code generation

    – Oracle Developer Tools for Visual Studio

    Full SQL or PL/SQL

    Connection pooling features

    – Min, Max, Timeout, Lifetime, Increment, Decrement

    – Automatic RAC Load Balancing and Fast Connection Failover

    – Performance counters

  • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 48

    Managed ODP.NET Features

    Entity Framework

    Native Oracle data types

    – REF Cursor, LOBs, Date, String, Decimal, Binary, TimeStamp, etc.

    – SecureFiles/LOB and LONG retrieval APIs

    – Oracle data types in DataSet

    Multiple Active Result Sets

    Self-tuning

  • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 49

    Managed ODP.NET Features

    Security and auditing

    – Proxy authentication

    – Operating system authentication

    – End-to-end tracing with Client Id, Action, and Module

    New features

    – ONS

    – Connection pool timeout error

  • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 50

    Distributed Transactions

    Requires an additional managed DLL (for now)

    – Oracle.ManagedDataAccessDTC.dll

    If not using distributed transactions, no need to deploy

    additional DLL

    No direct reference to DLL directly

    – Implicitly loaded

    – Two versions with same name: 32-bit and x64

    – Still must match 32-bit or 64-bit COM calls

  • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 51

    Managed ODP.NET vs. Unmanaged ODP.NET

    User defined types

    Oracle-specific XML features and data types

    Advanced Queuing

    Client Result Cache

    BulkCopy

    Transaction Guard

    Features Unavailable in First Release

  • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 52

    Managed ODP.NET Deployment Concepts

    Option 1: single configuration file deployment

    – .NET config file contains TNS and sqlnet.ora settings

    i.e. Machine.config, web.config, app.config

    Option 2: multi-file configuration

    – .NET config file

    – Tnsnames.ora and sqlnet.ora

    Option 3: no configuration files

    – Store connect info in Data Source attribute

  • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 53

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

    Deploying Managed ODP.NET

  • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 54

    Managed ODP.NET Deployment Concepts

    .NET config file

    – Similar settings as unmanaged plus TNS and sqlnet.ora settings

    – Managed -

    – Unmanaged -

    Tnsnames.ora and Sqlnet.ora

    – Same attribute settings

    – Most, but not all attributes are available

  • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 55

    Unmanaged to Managed Migration

    Application migration process

    – 1. Replace Oracle.ManagedDataAccess.dll reference to project

    – 2. Modify namespace(s) to Managed ODP.NET

    – 3. Change .NET config settings for Managed ODP.NET

    Include sqlnet.ora settings

    Managed ODP.NET APIs same as ODP.NET APIs

    – Initially, Managed ODP.NET will not support all ODP.NET

    features

    – Plan is eventual feature parity

  • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 56

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

    Porting to Managed ODP.NET

  • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 57

    Managed ODP.NET Release Timeline

    Public beta 1 on OTN

    Release more public betas

    – Depends on customer feedback and additional features

    Production release

    – CY 2013

  • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 58

    Entity Framework

  • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 59

    New Entity Framework Features

    ODAC 11.2 Release 5

    – Entity Framework 5 certification

    Oracle Database 12c Release 1

    – Identity column

    – Boolean

    – SQL APPLY

    Attend “Using Entity Framework with Oracle DB” session

    – Wednesday, 5 PM @ Marriott Golden Gate Room C1

  • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 60

    Conclusion and Q & A

  • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 61

    Upcoming .NET Sessions

    Oracle and .NET: Best Practices for Performance and

    Deployment

    – 10:15 AM - 11:15 AM, Marriott Marquis - Golden Gate C1

    PL/SQL Programming for .NET Developers: Tips, Tricks,

    and Debugging

    – 1:15 PM - 2:15 PM, Marriott Marquis - Golden Gate C1

    Using Entity Framework with Oracle Database

    – 5:00 PM - 6:00 PM, Marriott Marquis - Golden Gate C1

    Wednesday Oct 3

  • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 62

    Upcoming .NET Sessions

    Hands-on Lab: Building .NET Applications with Oracle

    – 12:45 PM - 3:15 PM, Marriott Marquis - Salon 10/11

    Thursday Oct 4

  • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 63

    Visit .NET Experts at the Demogrounds

    .NET Development for Oracle Database

    Moscone South, Left - S-068

    Monday through Wednesday

  • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 64

    Additional Oracle .NET Resources

    OTN .NET Developer Center

    – http://otn.oracle.com/dotnet

    Twitter

    – @OracleDOTNET

    YouTube

    – http://www.youtube.com/user/OracleDOTNETTeam

    For more questions

    [email protected] or [email protected]

    http://otn.oracle.com/dotnethttp://www.youtube.com/user/OracleDOTNETTeammailto:[email protected]:[email protected]

  • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 65

    Graphic Section Divider

  • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 66

    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.

  • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 67

  • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 68