0% found this document useful (0 votes)
34 views64 pages

NoCOUG 201911 Panchal Autonomous Database

Uploaded by

rti2012
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
34 views64 pages

NoCOUG 201911 Panchal Autonomous Database

Uploaded by

rti2012
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 64

Oracle Autonomous Database:

A Look Under the Hood


Nilay Panchal

Senior Product Manager


@theproductlad

Copyright © 2019 Oracle and/or its affiliates.


Safe Harbor

The following 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, timing, and pricing of any features or functionality described for Oracle’s products may change
and remains at the sole discretion of Oracle Corporation.

Statements in this presentation relating to Oracle’s future plans, expectations, beliefs, intentions and
prospects are “forward-looking statements” and are subject to material risks and uncertainties. A detailed
discussion of these factors and other risks that affect our business is contained in Oracle’s Securities and
Exchange Commission (SEC) filings, including our most recent reports on Form 10-K and Form 10-Q
under the heading “Risk Factors.” These filings are available on the SEC’s website or on Oracle’s website
at http://www.oracle.com/investor. All information in this presentation is current as of September 2019
and Oracle undertakes no duty to update any statement in light of new information or future events.

Copyright © 2019 Oracle and/or its affiliates.


Autonomous Database
Introduction

Copyright © 2019 Oracle and/or its affiliates.


Oracle Spent Last 20 Years
Automating Database Technology • Automatic Indexes
• SQL Quarantine
• Real-Time Statistics
19c

• Autonomous Health Framework


• Automatic Diagnostic Framework 18c
• Automatic Refresh of Clones
• Automatic Columnar Flash
• Automatic Memory Management • Automatic IM population


Automatic Segment Space Mgmt
Automatic Statistics Gathering
12c • Automatic Application Continuity

• Automatic Storage Management




Automatic Workload Repository
Automatic Diagnostic Monitor 11g
• Automatic Query Rewrite
• Automatic Undo Management • Automatic SQL Tuning
10g •

Automatic Workload Capture/Replay
Automatic SQL Plan Management
9i • Automatic Capture of SQL Monitor
• Automatic Data Optimization

Copyright © 2019 Oracle and/or its affiliates.


Oracle Spent Last 10 Years Automating
Database Infrastructure
2019
• Exadata Cloud Service
• In-Memory Columnar in Flash
• Smart Fusion Block Transfer
• Direct-to-wire Protocol
• JSON and XML offload
• Instant failure detection

• Network Resource Mgmt


• Prioritized File Recovery
• IO Priorities
• Data Mining Offload
• Offload Decryption

• Database Aware Flash Cache


• Storage Indexes
• Smart Scan • Hybrid Columnar Data
• Infiniband Scale-Out

2008
Copyright © 2019 Oracle and/or its affiliates.
Autonomous Database Completes the Job
Eliminates All the Complexity of Mission Critical Databases

ORACLE Oracle
AUTONOMOUS Cloud
DATABASE

Complete Complete Automated


Infrastructure Database Data Center
Automation Automation Operations and
Machine Learning

Copyright © 2019 Oracle and/or its affiliates.


Autonomous Database:
External Hybrid Instance
Wallet Partitioned
OCTOBER Rotation Tables
Partitioned
Tables
Wallet

SEPTEMBER Data Safe


OCI
Metrics
ADW on
Dedicated $$$ Free Service Continuous
Events Work
Enhancements
AUGUST Service Requests

Perf
ODI
Spatial
Serverless | Dedicated | Free
JULY Hub on OCI
Studio
Marketplace

JUNE 12345
Auto SQL
Developer Application ORDS-SODA ATP on Fleet
Mgmt
** Private
IP
Database
Vault
Scaling Express Dedicated
Web

HIPAA CPU-IO Full Support Oracle


MAY Compliance
Text Spatial XML Shares For DB Links Mgmt
Cloud

APRIL Network * Avro Change


ACLs Files License

MARCH Cloning Service


Gateway
*
SOC 1 and
Application * Serverless exclusive
FEBRUARY Continuity
SOC 2
Compliance ** Dedicated exclusive
Support
JANUARY For Parquet Schema
Advisor
Files
One Autonomous Database – Two Deployment Choices

ORACLE
AUTONOMOUS
DATABASE

Serverless Dedicated

Customizable Private Database


Ultra-Simple and Elastic
Cloud in Public Cloud

Copyright © 2019 Oracle and/or its affiliates.


Autonomous Database Serverless – Primary Benefits

• Simple
– Oracle automates and manages everything
• Deployment, lifecycle, software updates, etc.
– Customer just chooses database compute, storage, and region

• Elastic
– Low minimum size - 1 OCPU
– Low minimum time commitment - 1 hour
– Automatically scales online for true pay-per-use

Copyright © 2019 Oracle and/or its affiliates.


Autonomous Database Dedicated – Primary Benefits

• Provides your own Database Cloud running on


dedicated Exadata Infrastructure
– Runs all your databases - any size, scale, or criticality

• Highest Isolation
– Runs inside Secure Isolation Zone for highest protection
from other tenants
– Configure multiple Exadatas or Container Databases for
intra-company isolation

• Customizable Operational Policies


– Control of provisioning, updates, availability, density
Copyright © 2019 Oracle and/or its affiliates.
One Autonomous Database – Optimized by Workload

ORACLE
AUTONOMOUS
DATABASE

Autonomous Data Autonomous Transaction


Warehouse - ADW Processing - ATP
Best for all Analytic Workloads: Best for TP and Mixed Workloads:
• Data Warehouse, Data Mart • Transactions, Batch, Reporting
• Data Lake, Machine Learning • IoT, Machine Learning

Copyright © 2019 Oracle and/or its affiliates.


Under the Hood

Copyright © 2019 Oracle and/or its affiliates.


Database Configuration
Autonomous Database Platform
• RAC on Exadata
• Autonomous Database decides
where to place each database during
provisioning
• Fewer number of RAC nodes
preferred when possible
• Databases may be open on one
node
• Still RAC enabled

Copyright © 2019 Oracle and/or its affiliates.


Database Parameters
• All parameters set to optimal values based on workload type
• May be different than regular database defaults
• Users can only change a limited number of parameters
Allowed Parameters
APPROX_FOR_AGGREGATION NLS_ISO_CURRENCY OPTIMIZER_IGNORE_HINTS
APPROX_FOR_COUNT_DISTINCT NLS_LANGUAGE OPTIMIZER_IGNORE_PARALLEL_HINTS
APPROX_FOR_PERCENTILE NLS_LENGTH_SEMANTICS PLSCOPE_SETTINGS
FIXED_DATE NLS_NCHAR_CONV_EXCP PLSQL_CCFLAGS
MAX_IDLE_TIME NLS_NUMERIC_CHARACTERS PLSQL_DEBUG
NLS_CALENDAR NLS_SORT PLSQL_OPTIMIZE_LEVEL
NLS_COMP NLS_TERRITORY PLSQL_WARNINGS
NLS_CURRENCY NLS_TIMESTAMP_FORMAT STATISTICS_LEVEL
NLS_DATE_FORMAT NLS_TIMESTAMP_TZ_FORMAT TIME_ZONE
NLS_DATE_LANGUAGE OPTIMIZER_CAPTURE_SQL_PLAN_BASELINES
NLS_DUAL_CURRENCY

Copyright © 2019 Oracle and/or its affiliates.


Optimizer Hints
• Optimizer and PARALLEL hints work differently based on
workload type
ADW Ignores optimizer and PARALLEL hints
ATP Honors optimizer and PARALLEL hints

• Users can override by changing two parameters


TRUE FALSE
optimizer_ignore_hints Ignores optimizer hints Honors optimizer hints
optimizer_ignore_parallel_hints Ignores PARALLEL hints Honors PARALLEL hints

Copyright © 2019 Oracle and/or its affiliates.


Optimizer Statistics
• Stats are gathered automatically for direct load operations
• create table … as select …;
• insert /*+ append */ into … select …;
• Parallel inserts with or without the append hint
• Data Pump Import loads
• dbms_cloud loads

Copyright © 2019 Oracle and/or its affiliates.


Optimizer Statistics
• ATP gathers stats with a nightly auto stats job
• If your workload does conventional DML in ADW gather stats
manually with the GATHER AUTO option

BEGIN
DBMS_STATS.GATHER_SCHEMA_STATS('SH', options=>'GATHER AUTO');
END;
/

Copyright © 2019 Oracle and/or its affiliates.


Optimizer Statistics in 19c
• Real-time Statistics Collection
• Gathers a subset of optimizer statistics for conventional DML operations
• Number of rows, MAX and MIN column values, etc.

• High-frequency Statistics Collection


• Gathers full optimizer statistics every 15 minutes if statistics are stale

Copyright © 2019 Oracle and/or its affiliates.


Automatic Indexing
• Fully automated index creation
based on continuous analysis
of the workload
• Expert system with
reinforcement learning
• Learns from its own actions as
all candidate indexes are
validated before being
implemented

Copyright © 2019 Oracle and/or its affiliates.


Auto Indexing On Netsuite
• Ran a complex Netsuite workload, and compared Auto Indexing to tuned system
• 17,542 SQL statements, 1,852 tables, 8,151 indexes - years of tuning to create these indexes
• Before running on Auto Indexing, all indexes were dropped

1172 1155 4663

Elapsed Indexes
Manually Auto Index Manually
Time tuned Used tuned
1733
(sec)
Auto Index

Auto Indexing achieved near-identical performance to manual tuning


Auto Index DB stays tuned as workload changes
Copyright © 2019 Oracle and/or its affiliates.
Auto Indexing On Accounts Receivable
• Workload: 4,889 SQL statements running against 35 tables
• Indexes:
• Application code created 49 indexes of which 17 were used
• Automatic indexing created 5 indexes, all of which were used
17
123
Elapsed Indexes
Manually Manually
Time tuned Used tuned 5
(sec) Auto Index
4 Auto Index
User Management
User Management
• Pre-defined ADMIN user for database management
• Subset of SYSDBA privileges
• No SYS, SYSTEM access for users

Copyright © 2019 Oracle and/or its affiliates.


User Management
• Pre-defined role, DWROLE, for DW developers
• Includes common developer privileges
grant dwrole to sales identified by WelcomeSalesADW19;

DWROLE Privileges
CREATE ANALYTIC VIEW CREATE VIEW
CREATE TABLE CREATE PROCEDURE
CREATE HIERARCHY CREATE SESSION
CREATE JOB CREATE SEQUENCE
ALTER SESSION CREATE MINING MODEL
CREATE ATTRIBUTE DIMENSION CREATE TRIGGER
CREATE TYPE CREATE SYNONYM

Copyright © 2019 Oracle and/or its affiliates.


Secure Password Policies
• Pre-defined unchangeable password rules
• Passwords must be:
• Minimum 12 characters with at least one uppercase and one lowercase
letter, and one numeric character
• Cannot be one of the last 4 used passwords
• Cannot be the same as the username
• Must be changed every 360 days

Copyright © 2019 Oracle and/or its affiliates.


Storage Management
Storage Management
• Provisioned storage size is net usable space with 3x redundancy
• Includes system tablespaces and the local filesystem
• 10% overage allowed
• Exadata flash size is proportional to the storage size

Set storage size at provisioning time Scale up/down any time without downtime

Copyright © 2019 Oracle and/or its affiliates.


Tablespace Management
• All tablespaces created and managed automatically
• Tablespace sizes depend on the provisioned storage size
• All tablespaces auto extend when needed
• Users cannot create or drop tablespaces
• All objects are created in DATA automatically
• Multiple DATA tablespaces created when storage size exceeds 32 TB

Tablespaces from a Sample Autonomous Database


SYSTEM DATA
SYSAUX DBFS_DATA
UNDOTBS1 SAMPLESCHEMA
TEMP UNDO_8

Copyright © 2019 Oracle and/or its affiliates.


Tablespace Management
• No quota granted to users by default for security purposes
• Grant quota to users as needed
BEGIN
DBMS_CLOUD_ADMIN.GRANT_TABLESPACE_QUOTA(
username => 'ADBUSER', tablespace_quota => '10G' );
END;
/

Copyright © 2019 Oracle and/or its affiliates.


Tablespace Management
• TEMP and UNDO limited by default
• TEMP à 30% of storage size
• UNDO à 5% of storage size on each RAC instance

• Scale up the storage size if you need more


• Or, manually resize data and temp files
alter database tempfile ‘…’ resize 200G;

Copyright © 2019 Oracle and/or its affiliates.


Table/Index Storage Attributes
• No need to worry about storage attributes
• Optimized and managed by Autonomous
Database
• Table/index storage attributes ignored
• Tablespace, INITIAL, NEXT, PCTFREE, PCTUSE,
etc.

Copyright © 2019 Oracle and/or its affiliates.


Compression
• Compression configured automatically based on ADB type
ADW Hybrid Columnar Compression, Query High
ATP No compression

• Users can override using create/alter table commands, all


compression types available
create table orders_history … column store compress for archive high;

Copyright © 2019 Oracle and/or its affiliates.


Resource Management
Resource Allocation
• System resources allocated based on number of OCPUs
dynamically
• CPU, IO, number of sessions, SGA, PGA, etc.
• More OCPUs provide more resources

Set CPU core count at provisioning time Scale up/down any time without downtime

Copyright © 2019 Oracle and/or its affiliates.


Auto Scaling
• Enables the database to use up to 3x CPU/IO resources
immediately when needed by the workload
• Pay for exactly what you use
• Helps CPU or IO bound workloads
• Does not scale up all other resources. Provision more OCPUs to
scale up these.
• Number of sessions
• Concurrency
• PGA, SGA, etc.

Copyright © 2019 Oracle and/or its affiliates.


Auto Scaling Walkthrough
• Two databases running the same workload with the same
number of OCPUs with and without auto scaling
• Workload starts with 8 concurrent queries
• Adds 16 more queries later

Copyright © 2019 Oracle and/or its affiliates.


ADW1 with 4 OCPUs ADW2 with 4 OCPUs
Auto scaling disabled Auto scaling enabled
Can use up to 4 OCPUs Can use up to 12 OCPUs

Copyright © 2019 Oracle and/or its affiliates.


ADW1 with 4 OCPUs ADW2 with 4 OCPUs
Auto scaling disabled Auto scaling enabled

8 sessions on CPU 100% utilization 8 sessions on CPU 33% utilization

8 running queries 8 running queries

Copyright © 2019 Oracle and/or its affiliates.


ADW1 with 4 OCPUs ADW2 with 4 OCPUs
Auto scaling disabled Auto scaling enabled
8 sessions on CPU
16 sessions waiting for CPU 100% utilization 24 sessions on CPU 100% utilization

24 running queries 24 running queries

Copyright © 2019 Oracle and/or its affiliates.


Auto Scaling
• Historical view of the number of OCPUs used each hour

Copyright © 2019 Oracle and/or its affiliates.


Pre-Defined Database Services
• Applications connect to a pre-defined database service
• e.g. jdbc:oracle:thin:@dbname_high?TNS_ADMIN=/Users/test/wallet_dbname
• Database services control resource usage
• SQL parallelism, CPU/IO shares, max concurrent queries/DML

DEFAULT SQL SHARE OF CONCURRENT NO OF


SERVICE PARALLELISM RESOURCES QUERIES/DML
TPURGENT MANUAL 12 100 X OCPUs
OLTP
TP 1 8 100 X OCPUs
HIGH OCPUs 4 3
DW, Batch,
MEDIUM 4 2 1.25 X OCPUs
Reporting
LOW 1 1 100 X OCPUs

Copyright © 2019 Oracle and/or its affiliates.


Which Service to Use
• OLTP
• Connect to TP or TPURGENT based on priority requirements
• DW
• Connect to HIGH, MEDIUM, LOW based on concurrency requirements

HIGH MEDIUM LOW

• Low concurrency • Higher concurrency • Highest concurrency


• More resources • Fewer resources per • Fewest resources per
per user user user

Copyright © 2019 Oracle and/or its affiliates.


Monitoring and Notifications
Monitoring and Notifications
• Performance monitoring
• Notifications and alerts

Copyright © 2019 Oracle and/or its affiliates.


Performance Monitoring Tools
• Service Console
• Performance Hub
• Automatic Workload Repository (AWR)
• Active Session History (ASH)
• Real-Time SQL Monitoring
• SQL Test Case Builder
• Enterprise Manager (Currently available for ATP-D, coming soon to others)

• No direct access to events, tracing, hang analyzer

Copyright © 2019 Oracle and/or its affiliates.


Service Console
• Simple monitoring graphs for key service metrics
• Accessible by database users without a cloud account

Copyright © 2019 Oracle and/or its affiliates.


Performance Hub
• ASH Analytics and SQL Monitoring
• Accessible by users with cloud accounts

Copyright © 2019 Oracle and/or its affiliates.


Notifications and Alerts
• Oracle Cloud Infrastructure Events Service
• Oracle Cloud Infrastructure Monitoring Service

Copyright © 2019 Oracle and/or its affiliates.


Oracle Cloud Infrastructure Events
Service

Compute Functions
Trigger serverless code

Network
Events Notifications
Events Service
Alerts via email/PagerDuty
Storage
Event Rules
Streaming
Database

Copyright © 2019 Oracle and/or its affiliates.


Oracle Cloud Infrastructure Monitoring

Compute

Network
Metrics Notifications
Monitoring
Alerts via email/PagerDuty
Storage
Aggregated metrics
Statistics, dimensions
Database

Copyright © 2019 Oracle and/or its affiliates.


Networking
Connecting from the Internet

Region
Oracle Services
Network

SSL SSL encrypted connections ADB


Certificates Apps/tools

Copyright © 2019 Oracle and/or its affiliates.


Connecting from the Internet
Network ACLs (whitelisting) to restrict connections from unknown clients

Region
Connections from non-whitelisted clients
Oracle Services
Network

Apps/tools

ADB

Connections from whitelisted clients

Apps/tools

Copyright © 2019 Oracle and/or its affiliates.


Connecting from Clients in OCI
Clients with public IP addresses
Region

Virtual Cloud Network Oracle Services


Network

Network ACL

Private subnet Public subnet

Internet Gateway

Apps/tools Apps/tools
ADB

Copyright © 2019 Oracle and/or its affiliates.


Connecting from Clients in OCI
Clients with private IP addresses
Region

Virtual Cloud Network Oracle Services


Network
Internet Gateway
Network ACL

Public subnet Private subnet

Service Gateway

Apps/tools Apps/tools
ADB

Copyright © 2019 Oracle and/or its affiliates.


Connecting from On-Premises Networks
FastConnect, VPN Connect

On-Premises Network Region


Virtual Cloud Network Oracle Services
FastConnect Network
or
VPN Connect

DRG Service ADB


Apps/tools
Gateway

Copyright © 2019 Oracle and/or its affiliates.


Learn More about
Autonomous Database

Copyright © 2019 Oracle and/or its affiliates.


Developer Tools

Application Express SQL Developer REST Services


(APEX) Web (ORDS)

Copyright © 2019 Oracle and/or its affiliates.


Data Science and Analytics Tools

Oracle Oracle
Machine Learning Analytics Desktop
(OML) (OAD)
Formerly Data Visualization Desktop (DVD)
Copyright © 2019 Oracle and/or its affiliates.
NEW Free Tier for Oracle Cloud

$
NEW Always Free
Services always free for as
+ Free Trial
$300 free credits for 30 days
long as you use them Highly reduced pricing

Learn, explore, and build for free!


Always Free - What’s Included

Autonomous Compute Storage Load


Database Balancing
2 Databases 2 VMs 100GB Block 10 Mbps
20GB Storage Each 1GB Memory 10GB Object Bandwidth
Each 10GB Archive Shape

Available to all new and existing cloud accounts


Autonomous Data Warehouse
Hands-On Labs

https://www.oracle.com
/goto/adw/tutorial
Q&A

Nilay Panchal
@theproductlad

Copyright © 2019 Oracle and/or its affiliates.

You might also like