oracle openworld event branded template · •compare db project v2 against your live db instance...
TRANSCRIPT
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Oracle and .NETIntroduction and What’s New
Alex Keh Christian ShaySenior Principal Product Manager Senior Principal Product Manager Oracle Oracle
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Program Agenda
Getting Started
Oracle Database 12c Release 2 and ODAC 12.2c Release 1
Oracle Cloud – .NET
Future Releases
1
2
3
4
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Getting StartedOracle .NET
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Oracle .NET Development Environment
VisualStudio
AppDevelopment 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
.NET Developer Center:http://otn.oracle.com/dotnet
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Develop on Windows Run Database on any Platform
ODT and ODP.NET 12c
Windows
Linux
Solaris
Oracle DB 12c or 11g
Other
VisualStudio
Windows
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Oracle Developer Tools for Visual Studio
• “Add-in” for Visual Studio– Works with VS 2015 and VS 2017
– Download from OTN (MSI or Oracle Installer)
• Tight integration with Visual Studio data features– Server Explorer
– Table Adapter Configuration Wizard
– Entity Designer
• Oracle specific features– Oracle Designers (Table, View, Stored Proc, AQ, etc)
– PL/SQL Debugging
– Offline Database Project, Schema Compare… and much more
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
ODP.NET Overview
• Implements standard ADO.NET– ADO.NET: Microsoft’s standard for data access from .NET code
• Extended to provide native access to Oracle Database
– Utilize advanced Oracle Database features
– E.g. RAC, performance, security, data types, XML, etc.
• Download– Nuget
– OTN: MSI installer
– OTN: Oracle Installer
– OTN: Xcopy install
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
D E M O N S T R A T I O N
Visual Studio Tools and ODP.NET
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
ODP.NET Architecture
ODP.NETOracle.ManagedDataAccess.dll
Oracle
ManagedLayer
Database
UnmanagedLayer
ODP.NETOracle.DataAccess.dll
Oracle
ODP.NETUnmanaged DLLs
Oracle DB Client
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Key ODP.NET Features
• Connection pooling and performance counters– Runtime Load Balancing, Fast Connection Failover: RAC and GDS
– Transaction Guard
– Planned Outage
• Native Oracle data types
– REF Cursors, LOBs, XMLType, UDTs, arrays, etc.
• Performance
– Caching
– FetchSize and RowSize, InitialLOBFetchsize
• Entity Framework
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Oracle Database 12c Release 2 and ODAC 12.2c Release 1Oracle .NET
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Oracle Database 12.2 and ODAC 12.2
• Visual Studio 2017, .NET 4.6.2 and 4.7, and Entity Framework 6.2
• Schema Compare
• ODP.NET Database Resident Connection Pooling (DRCP)
• Oracle Multitenant pooling across PDBs
• Application Continuity
• Sharding
• Connection Open event
• Oracle Edition-Based Redefinition pooling across editions
New Features
13
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
“Offline” Schema Compare in Visual Studio
• Schema Comparison using SQL Scripts in “Database Project Version 2”
• Import your schema into DBProjv2– Creates a set of standardized SQL scripts, one for each SQL statement
– One CREATE statement per file by convention
– Check the scripts into source control
– Can “Build” a single Schema create script merging all the SQL scripts into one file
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
“Offline” Schema Compare in Visual Studio
Oracle Database Project V2(SQL Scripts in source control)
Running Database Instance
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
“Offline” Schema Compare
• Compare DB Project v2 against your live DB instance and view diffs
• Generate deployment script to make live DB schema equal to DBProjv2
• Automatically update DB Project v2 scripts to equal live DB
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
“Offline” Schema Compare in Visual Studio
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
“Offline” Schema Compare in Visual Studio
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Connection Open Event
• Developers provide custom code, which is executed prior to dispensing connection
• Benefit: centralized place for initialization/customization before using connection
– E.g. set session settings and tags
Ease of Use
19
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Database Resident Connection Pooling
• DRCP pools connections at DB server level
– Pools "dedicated" servers
– Pooled server = equivalent of combined server foreground process and DB session
• Supports large numbers of client connections and across middle-tiers
• Enable DRCP using “(SERVER=POOLED)“ in TNS descriptor– No ODP.NET code changes required
• New OracleConnection properties (optional)
– string DRCPConnectionClass; – share one server pool across multiple mid-tier pools
– bool DRCPConnectionPurity; – returns a new DRCP connection
Scalability
20
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Database Resident Connection PoolingTNS Descriptor and Code Sample
21
oracle = (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=myserver)(PORT=5521)) (CONNECT_DATA=(SERVICE_NAME=db.company.com)(SERVER=POOLED)))
----------
using System;using Oracle.DataAccess.Client;
class DRCP{
static void Main(){
string constr = “<connection string>";OracleConnection con = new OracleConnection(constr);con.DRCPConnectionClass = "classA";con.Open();
}}
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Oracle Multitenant Enhancement
• Support for multiple PDBs in the same pool
– No longer need separate pool for each PDB
• Switch between PDBs in the same pool
– Requires PDBs to be in same CDB and the same user
• Switching requires closing the connection to the old PDB and opening a connection to the new PDB
• Set OracleConnection PDBName and PDBServiceName properties to identify PDB connection from pool to use
Scalability
22
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Oracle Multitenant EnhancementCode Sample
23
using System;using Oracle.DataAccess.Client;
class Multitenant{
static void Main(){
// Create a connectionstring constr = “<connection string>";OracleConnection con = new OracleConnection(constr);
// Set the pdb and service namescon.PDBName = "US";con.PDBServiceName = "HRDB";con.Open();
}}
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Oracle Edition-Based Redefinition Enhancement
• Connections to multiple editions can now co-exist in the same pool
• DB Edition name can now be set at the OracleConnection level
• Switch between Editions in the same application and/or pool
– Requires same user if switching editions in same pool
• Switching requires closing the connection to the old Edition and opening a connection to the new Edition
• Set OracleConnection.DatabaseEditionName property before Open()
Ease of Development
24
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Oracle Edition-Based Redefinition EnhancementCode Sample
25
using System;using Oracle.DataAccess.Client;
class Editions{
static void Main(){
// Create a connectionstring constr = “<connection string>”;OracleConnection con = new OracleConnection(constr);// Set the edition name before Open()con.DatabaseEditionName = "EditionX";con.Open();con.Close();con.DatabaseEditionName = "EditionY";con.Open();
}}
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Application Continuity
• OpenWorld session: Best Practices for High Availability: .NET and Oracle Database
• Wednesday, Oct 04, 3:30 p.m. - 4:15 p.m.
• Moscone West - Room 3010
High Availability
26
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Sharding
• Type of DB partitioning that separates very large databases the into smaller, faster, more easily managed shards
• Data dependent routing added to ODP.NET to access shard data
• ODP.NET and sharding typical use
1. App specifies sharding key and/or super sharding key before establishing connection
2. ODP.NET connects to specific sharded instance that holds the data associated with the specified keys
3. Data is retrieved
Scalability
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
ODP.NET Sharding Code SampleSetting ShardingKey and ShardGroupKey for returning correct shard connection
using System;using Oracle.DataAccess.Client;
class Sharding{
static void Main(){OracleConnection con = new OracleConnection(<Connection String>);//Setting a shard keyOracleShardingKey shardingKey = new OracleShardingKey(OracleDbType.Int32, 123);//Setting a second shard key value for a composite keyshardingKey.SetShardingKey(OracleDbType.Varchar2, "gold");//Creating and setting the super shard keyOracleShardingKey superShardingKey = new OracleShardingKey();superShardingKey.SetShardingKey(OracleDbType.Int32, 1000); //Setting super sharding key and sharding key on the connectioncon.SetShardingKey(shardingKey, superShardingKey);con.Open();//perform SQL query
}}
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Oracle Cloud – .NETIaaS and PaaS
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
The Best Cloud Database for Developers
30
• Popular language drivers– ODP.NET
• Multiple interfaces– Full Oracle Net (SQL*Net)
– REST API, JSON storage
– Documents & collections
• Updated tools– ODT for Visual Studio
– SQL Developer, Data Modeler
– Powerful new command-line
DATABASE
12c
R2
Oracle APEX
Oracle SQLDeveloper
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Oracle Database Exadata Express Cloud Service
• Use ODP.NET and ODT 12.1 (Cloud Release) or higher
–ODT for VS 2017, 2015, and 2013
–Managed and unmanaged ODP.NET
• How to connect:– Developing .NET Applications for Oracle Database Exadata Express
Cloud Service
– Uses Oracle Net Services with Oracle Wallet to secure connection
Connect from On-premises
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Oracle Database Cloud Service
• Use ODP.NET and ODT 12.1 (Cloud Release) or higher
–ODT for VS 2017, 2015, and 2013
–Managed and unmanaged ODP.NET
• How to connect:– Developing .NET Applications for Oracle Database as a Service
– Secure Shell (SSH) required to secure connection• Use SSH client to create tunnel, such as PuTTY
• PuTTY can also generate private and public SSH key pair
Connect from On-Premises
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Oracle Cloud Infrastructure (OCI)
• Windows available on Bare Metal and Compute Classic
– Bare Metal: Available from image library or use custom image
– Compute Classic: Windows 2012 R2 and Windows 2008 R2 VMs available from Oracle Cloud Marketplace• Free during promotional period
• Deploy and configure IIS, .NET, and ODP.NET apps to OCI– Compute Classic White Paper: Deploying Microsoft Web
Application Server on Oracle Compute Cloud Service
Deploy .NET applications to Oracle IaaS on Windows
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Future ReleasesOracle .NET
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Oracle Cloud Service for .NETPlatform as a Service – Future
35
GOAL: Allow Oracle customers to deploy .NET applications easily to Oracle Cloud
Oracle Cloud Service for .NET
• High Availability and Load Balancing • Visual Studio Integration• Scale In and Out• Automated Provisioning• Replicate from Test to Production
• Lifecycle Management• Service Console• Application Performance Monitoring• Health Checks• Rolling Patches and Upgrades
Consolidate mid-tier technologies (.NET) and database under a single cloud vendor
Performance, High Availability, and Ease of Development – Easily develop high performance, highly available applications running against Oracle Database Service
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
ODAC 12.2c Release 1 Update 1
• Visual Studio 2017 Community
• Bug fixes
• New OUI, MSI for VS 2017 and VS 2015, Xcopy, NuGet
Release Update
36
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
.NET Core
• Support .NET Core 2.0 or higher
• Initial supported platforms: Windows and Oracle Linux
–More platforms being considered
• Beta by end of year
–OTN release
–Open to all
• Statement of direction
Multiplatform .NET
37
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Upcoming Sessions, Hands on Lab and Demogrounds
38
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Additional Oracle .NET Resources
OTNotn.oracle.com/dotnet
Twittertwitter.com/OracleDOTNET
YouTubeyoutube.com/OracleDOTNETTeam
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Questions and AnswersOracle .NET
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Safe Harbor Statement
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.