Beruflich Dokumente
Kultur Dokumente
Roy F Swonger
Vice President
Database Upgrade & Utilities
Oracle
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | How to Migrate to Oracle Autonomous Database Cloud
Safe Harbor Statement
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.
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | How to Migrate to Oracle Autonomous Database Cloud 2
Upgrade Slides, Videos and Presentations
• https://MikeDietrichDE.com/videos
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | How to Migrate to Oracle Autonomous Database Cloud 3
Bill Beauregard
Senior Principal Product Manager
Oracle Database Utilities Bill Beauregard
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | How to Migrate to Oracle Autonomous Database Cloud 4
Roy F. Swonger
Vice President
Oracle Database Upgrade and Utilities RoyFSwonger
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | How to Migrate to Oracle Autonomous Database Cloud 5
Agenda:
Migration Methods to Autonomous Database Cloud
How to Choose the Right One?
• Migration Methods
– DBMS_CLOUD
– Data Pump
– SQL*Loader
– SQL Developer
• Important factors
– Source database version
– Source data file format & location
– GUI vs command-line
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | How to Migrate to Oracle Autonomous Database Cloud 6
DBMS_CLOUD
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | How to Migrate to Oracle Autonomous Database Cloud 7
Migrate Using DBMS_CLOUD PL/SQL Package to Oracle ADB
Documentation:
Loading Data from Files in the Cloud
Autonomous Data
CDB_loud
Warehouse Cloud
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | How to Migrate to Oracle Autonomous Database Cloud 8
Important DBMS_CLOUD Procedures & Tables
• Loading
.CREATE_CREDENTIAL // Store encrypted OSS credentials
.COPY_DATA // Load data into an existing table
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | How to Migrate to Oracle Autonomous Database Cloud 9
DBMS_CLOUD Example
• Store encrypted OSS credentials in ADB
DBMS_CLOUD.CREATE_CREDENTIAL(
credential_name => 'DEF_CRED_NAME',
username => 'adwc_user@oracle.com',
password => 'password'
);
• Load data into the existing table named CHANNELS
DBMS_CLOUD.COPY_DATA(
table_name =>'CHANNELS',
credential_name =>'DEF_CRED_NAME',
file_uri_list =>'https://swiftobjectstorage.us-phoenix-
1.oraclecloud.com/v1/adwc/adwc_user/channels.txt',
format => json_object('delimiter' value ',')
);
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | How to Migrate to Oracle Autonomous Database Cloud 10
DBMS_CLOUD Example
• Query to see information about ongoing and completed data loads
SELECT table_name, owner_name, type, status, logfile_table,
badfile_table
FROM user_load_operations WHERE type = 'COPY';
TABLE_NAME OWNER_NAME TYPE STATUS LOGFILE_TABLE BADFILE_TABLE
---------- ---------- ---- --------- ------------- -------------
CHANNELS SH COPY COMPLETED COPY$21_LOG COPY$21_BAD
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | How to Migrate to Oracle Autonomous Database Cloud 11
Oracle Database Utilities: Data Pump
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | How to Migrate to Oracle Autonomous Database Cloud 12
Migrate/Upgrade Using Data Pump to Oracle ADB
When to use Migration Process
Documentation:
Importing Data to ADW Using Oracle Data Pump Autonomous Oracle
CDB_Cloud
Importing Data to ATP Using Oracle Data Pump Database
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | How to Migrate to Oracle Autonomous Database Cloud 13
Migrate/Upgrade Using Data Pump to ATP (Planned)
When to use Migration Process
Documentation:
Note: Older than 10g use SQL*Loader
Importing Data Using Oracle Data Pump Autonomous Data
CDB_Cloud
Warehouse Cloud
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | How to Migrate to Oracle Autonomous Database Cloud 14
Important Data Pump Parameters & Procedure
Items in blue are common to ADW & ATP
• Export
exclude=index, cluster, indextype, materialized_view,
materialized_view_log, materialized_zonemap, db_link
data_options=group_partition_table_data // 12.2 or later
parallel=n // for source DB earlier than 12.2
schemas=schema name
dumpfile=export%u.dmp
• Add Credentials
.CREATE_CREDENTIAL // Store encrypted OSS credentials
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | How to Migrate to Oracle Autonomous Database Cloud 15
Important Data Pump Parameters & Procedure
• Import
tenant_name_database_name_high // use the HIGH database service
dumpfile // list of file URLs on your OSS
credential // name of OSS credential in ADW
partition_options=merge // partitioned tables > non-partitioned
transform=segment_attributes:n // tables storage attributes are ignored
transform=dwcs_cvt_iots:y // IOTs converted into regular tables
transform=constraint_use_default_index:y
// PK indexes created, unique key constraints renamed to constraint name
exclude=index, cluster, indextype, materialized_view,
materialized_view_log, materialized_zonemap, db_link
• Log file
DBMS_CLOUD.PUT_OBJECT// move log file to your Cloud Object Storage to examine
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | How to Migrate to Oracle Autonomous Database Cloud 16
Data Pump Example
• Export
expdp sh/sh@orcl \
exclude=index, cluster, indextype, materialized_view,
materialized_view_log, materialized_zonemap, db_link \
data_options=group_partition_table_data \
parallel=16 \
schemas=sh \
dumpfile=export%u.dmp
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | How to Migrate to Oracle Autonomous Database Cloud 17
Data Pump Example
• Store encrypted credentials
DBMS_CLOUD.CREATE_CREDENTIAL(
credential_name => 'DEF_CRED_NAME',
username => 'adwc_user@oracle.com',
password => 'password'
);
• Only Data Pump versions 12.2.0.1 and earlier - Set a default Credential
alter database property set default_credential =
'ADMIN.DEF_CRED_NAME’//
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | How to Migrate to Oracle Autonomous Database Cloud 18
Data Pump Example
• Import
impdp admin/password@ADWC1_high \
directory=data_pump_dir \
credential=def_cred_name \
dumpfile= https://swiftobjectstorage.us-phoenix-
1.oraclecloud.com/v1/adwc/adwc_user/export%u.dmp \
parallel=16 \
partition_options=merge \
transform=segment_attributes:n \
transform=dwcs_cvt_iots:y
transform=constraint_use_default_index:y \
exclude=index, cluster, indextype, materialized_view,
materialized_view_log, materialized_zonemap, db_link
Note: insert additional dumpfile keyword if you use Data Pump 12.2.0.1 and earlier
dumpfile=default_credential:…
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | How to Migrate to Oracle Autonomous Database Cloud 19
Data Pump Example
• Move the log file for Data Pump Import to the object store to read it
BEGIN
DBMS_CLOUD.PUT_OBJECT(
credential_name => 'DEF_CRED_NAME',
object_uri => 'https://swiftobjectstorage.us-phoenix-
1.oraclecloud.com/v1/adwc/adwc_user/import.log',
directory_name => 'DATA_PUMP_DIR',
file_name => 'import.log');
END;
/
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | How to Migrate to Oracle Autonomous Database Cloud 20
Data Pump Demo
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | How to Migrate to Oracle Autonomous Database Cloud 21
Oracle Database Utilities: SQL*Loader
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | How to Migrate to Oracle Autonomous Database Cloud 22
Migrate Using SQL*Loader
When to use Migration Process
Documentation:
Oracle Database Utilities
Autonomous Data
Warehouse Cloud
CDB_Cloud
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | How to Migrate to Oracle Autonomous Database Cloud 23
SQL*Loader Prerequisites
• Download the Connection Wallet
• Download and install the Oracle Instant Client (if needed)
• Edit sqlnet.ora
• Set TNS_ADMIN & PATH environment variables
Documentation
Preparing for Oracle Call Interface (OCI), ODBC, and JDBC OCI Connections
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | How to Migrate to Oracle Autonomous Database Cloud 24
SQL*Loader Prerequisites Demo
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | How to Migrate to Oracle Autonomous Database Cloud 25
Recommended SQL*Loader Parameters
• Loading into the Autonomous Cloud
readsize=100M
bindsize=100M
rows=[commit interval]
direct=N
other situation-specific parameters and several case studies are available in the Oracle
Database Utilities documentation….
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | How to Migrate to Oracle Autonomous Database Cloud 26
SQL*Loader Control file: Recommended Options, Loads CSV
OPTIONS (READSIZE=100000000, BINDSIZE=100000000, ROWS=50000,
SKIP=1, DIRECT=N)
LOAD DATA
INFILE 'olympics.csv'
APPEND
INTO TABLE OLYMPICS
FIELDS CSV WITHOUT EMBEDDED
(
YEAR,
SEASON,
CITY,
SPORT,
DISCIPLINE,
ATHLETE,
COUNTRY,
GENDER,
EVENT,
MEDAL
)
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | How to Migrate to Oracle Autonomous Database Cloud 27
SQL*Loader Demo
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | How to Migrate to Oracle Autonomous Database Cloud 28
Oracle SQL Developer
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | How to Migrate to Oracle Autonomous Database Cloud 29
Oracle SQL Developer
Wizard driven!
• Launched in 2005
• Quarterly releases
• 5M+ Oracle DBAs and & Developers
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | How to Migrate to Oracle Autonomous Database Cloud 30
Oracle SQL Developer Web
§ Oracle Database Cloud Services Console
§ Instance Management
§ Fully Functional Query/PLSQL Worksheet
§ Schema Diagramming
§ Object Create/Alter Dialogs
§ Real Time SQL Monitoring
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | How to Migrate to Oracle Autonomous Database Cloud 31
Migrate Using SQL Developer
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | How to Migrate to Oracle Autonomous Database Cloud 32
SQL Developer Example - Wizard for Excel
Empty Oracle Database table and Excel file on hand
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | How to Migrate to Oracle Autonomous Database Cloud 33
SQL Developer Example
Step 1: Mouse-right click – Import Data
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | How to Migrate to Oracle Autonomous Database Cloud 34
SQL Developer Example
Step 2: Select your input (XLS) file
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | How to Migrate to Oracle Autonomous Database Cloud 35
SQL Developer Example
Step 3: Verify the data being read
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | How to Migrate to Oracle Autonomous Database Cloud 36
SQL Developer Example
Step 4: import automatically or create a script for external staging table
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | How to Migrate to Oracle Autonomous Database Cloud 37
SQL Developer Example
Step 5: Choose columns to import
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | How to Migrate to Oracle Autonomous Database Cloud 38
SQL Developer Example
Step 6: Map Excel columns to database table
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | How to Migrate to Oracle Autonomous Database Cloud 39
SQL Developer Example
Step 7: Verify settings (if there is a problem go back to step 6), Click Finish
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | How to Migrate to Oracle Autonomous Database Cloud 40
SQL Developer Example
Last Step: Verify the import look at your new table data
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | How to Migrate to Oracle Autonomous Database Cloud 41
SQL*Loader vs SQL Developer Inserts
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | How to Migrate to Oracle Autonomous Database Cloud 42
SQL Developer 18.3 Data Pump Wizards for ADB
§ Run Data Pump Export
§ Copy files to OSS
§ .dmp goes to OSS
§ kick off import job on ADB
§ Watch jobs in SQLDev/logs
ACCENTURE
BETA TESTING
OF ORACLE
AUTONOMOUS
DW CLOUD
October 2018
#TECHVISION2018 #ORACLE
www.accenture.com/technologyvisionoracle
Copyright © 2018 Accenture. All rights reserved.
THE ORACLE
AUTONOMOUS DATA
WAREHOUSE CLOUD:
COMBINING
CLOUD AND
MACHINE
LEARNING INTO
THE WORLD’S
FIRST SELF-
DRIVING,
AUTONOMOUS
DATABASE
Copyright © 2018 Accenture. All rights reserved.
CAN THE WORLD’S FIRST AUTONOMOUS
DATABASE UNLEASH THE INTELLIGENT
ENTERPRISE?
ACCENTURE TESTED THE AUTONOMOUS DATA WAREHOUSE
CLOUD ON A REAL APPLICATION, RUNNING REAL-WORLD
WORKLOADS
https://finance.yahoo.com/news/oracles-revolutionary-
database-automates-key-221700618.html
https://youtu.be/YqnhRPq2Hq0
PAUL DAUGHERTY
Chief Technology and Innovation Officer
Accenture
The Oracle Autonomous Data Warehouse database is really self-driving, no DBA skills are
needed to create a data mart in minutes – all tools are embedded into the cloud service
ADWC has all needed features to health check the current environment and analyze the
existing flaws and drawbacks including security & regulations
Generating and running reports is not only simple, uncomplicated and effortless, but
no additional tuning or re-architecting of the Oracle databases is needed: the
underlying Oracle Cloud Infrastructure is super fast and highly reliable
The Oracle Autonomous Data Warehouse interface contains all necessary capabilities for a non-
professional database user to create its own data marts and run analytical reports on the data
101
Not possible as the
58
4 HOURS 1 HOUR 30 MINUTES
hardware is not elastic
Database is
SECONDS SECONDS
down while
scaling is Database
happening remains
active while
scaling is
happening
ADWC IS
CONSISTENTLY
PERFORMING
FASTER
1.63x 1.72x
METADATA ONLY
AUTONOMOUS DATA
WAREHOUSE CLOUD
Benefits Quote
§ Reduce reliance on DBAs for operational areas “We are at the dawn of the intelligent, autonomous age and having a self-driving
database is a natural progression. Freeing DBAs from the basic operational nuances
§ Having limited budget to build/support application, reducing the of running a database is of tremendous value. I feel that autonomous databases
need for a dedicated DBA is a benefit will become ubiquitous in the future“
Clark A. Kho , Senior Technology Architect, Accenture
§ Minimize the need to remember to apply patches ensuring
database is secured “ADWC is super fast compared to other similar systems!”
§ Better performance for the application Julian Dontcheff, Managing Director – Accenture Technology, Oracle Global Technology Lead
Admin Password?
Less than
NEW SERVICE
CREATED IN 101 SECONDS