Upload
others
View
6
Download
0
Embed Size (px)
Citation preview
1
Hybrid Cloud Transformations
Feb 13, 2020
Copyright © 2019 Oracle and/or its affiliates.
Charles Kim @racdbaCEOViscosity North America
Roman Delino
Regional ManagerOracle Corporation
@ViscosityNA
• Oracle ACE Director
• Founder and CEO of Viscosity
• Over 27 years of Oracle Expertise: Mission Critical Databases,
RAC, Data Guard, ASM, RMAN, Shareplex/GoldenGate
• Specialize in “Complex Data Replication & Integration” with Shareplex & GG
• Oracle Management Cloud Certified
• Oracle Exadata Certified Implementation Specialist, (2014, 2016)
• Oracle Certified RAC Expert
• Oracle Linux Certified Expert
Charles Kim @racdba
@ViscosityNA
High Level Agenda and Topics• Part 1
• Technical• 20c• 19c
• Part 2• 19c Business Value• Engineered Systems TCO and ROI• What does Hybrid Cloud mean to you
@ViscosityNA
We wrote the books
4
@ViscosityNA
Upgrade PlansUpgrade On-Premise? Upgrade to the Cloud?
• How many are Terminal Release to Terminal Release customers?
• How many are planning to upgrade in– 6 months– 12 months– 24 months– Already There?
• Interesting in doing Zero Downtime and Zero Risk Upgrades?
• Still running legacy versions?
@ViscosityNA
Oracle Database 12cR2 introduced on the Cloud 9/18/2016
6
February 13, 2018
On-Premise Oracle Database 12cR2 released just under 6 months later on 3/1/17
@ViscosityNA
Oracle Release DatesOracle Database 11g Release 1 Aug 2007
Oracle Database 11g Release 2 Sept 2009
Oracle Database 12c Release 1 June 2013
Oracle Database 12c Release 1 (Patchset) - 12.1.0.2 June 2014
Oracle Database 12c Release 2 March 2017
Oracle Database 12c Release 2First Bundled Patch
May 2017
Oracle Database 12c Release 2RU (July 18)
July 2017
Oracle 18c - “Cloud First” February 2018
Oracle 18c – Available on Exadata February 2018
Oracle 18c – Available on ODA March 2018
Oracle 18c – On-Premise July 2018
Oracle 19c - Exadata On-PremiseOracle 19c - General Availability - Terminal Release
Feb 13, 2019April 2019
@ViscosityNA
Lifetime Support Commitments and PlansPlanned Release and Support Timelines
2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027
11.2.0.4
12.1.0.2
EXTENDED
EXTENDED
12.2 EXTENDED
12.2.0.1
18c
19c EXTENDED*
20c
PremierWaived Extended Support Fee
Paid Extended Support
*Oracle Database 19c and 22c is expected to the long-term support release. Always check MOS Note 742060.1 for the latest schedule
21c
22c
12.2.0.2Nov 30, 2020
12.2.0.3March 31, 2023
No Extended Support
No Extended Support
@ViscosityNA
We’ve written 23+ books on Data, Cloud, and Oracle…
Viscosity At A Glanceo Viscosity founders hold 25+ years each in
the Oracle space
o Authors of 23+ books in the Oracle space
o 6 Oracle ACEso 4 Oracle ACE Directors (only 36 in
USA) o + 2 Oracle ACE
o Quest SharePlex Platinum Partnero Kyriba Platinum Partner
o Expertise in Oracle 11g, 12c, 18c, 19c, RAC, ASM, Data Guard, Zero Downtime Upgrades, Performance Tuning, and much more
@ViscosityNA
4 Quarters of Tech Deep DivesReleased @OpenWorld 20172nd Edition @OpenWorld 2019
3rd Edition for IOUG Collaborate - April 2020
PDB Me ASAP! A Lazy DBA’s Guide to Mastering Multitenant Features of Oracle Database 12cR2
Evolution of the DBA
12
Kind of DBA Timeline
CLI DBA Early 90’s DBAs
GUI DBA Late 90’s and Dot Com
Google DBA Dot Com and 2000’s
iDBA Dot Com, IOUG iDBA Master Curriculum
RAC DBAs (MAA DBAs) 2000+ after 9.2 (but major spike with 10.2) + Data Guard
DMA 2010+ Database Machine Administrator
vDBA / vRAC DBA 2010+ Evolving role of a DBA in the virtual world
Cloud DBA 2011+ Database Consolidation with Private Database CloudOracle Database 12c Launches June 2013
Public Cloud DBA 2015+ Oracle Public Cloud with Database Cloud Service, Database Backup Cloud Service, Storage Cloud Service, IaaS Cloud Service
PDBAs 2017+ Multi-Tenant with Oracle Database 12c Release 2GA – March 15, 2017
“It is not the strongest or the most intelligent who will survive but those who can best manage [adapt
to] change.”
@ViscosityNA
Oracle 19c (LiveSQL Released) - Jan 16, 2019
• https://blogs.oracle.com/oracle-database/oracle-database-19c-now-available-on-livesql
• http://livesql.oracle.com
@ViscosityNA
Oracle Database19c 3 PDBs - FREE TO USE
• Starting in Oracle Database 20c • Containerized databases are a requirement• Starting in Oracle Database 19c, each container
database can have up to 3 pluggable databases
• Change how we perform database upgrades• Change how we do data center migrations• Change how we perform patches
@ViscosityNA
@ViscosityNA
RU and RUR for 12.2• In July 2017 Oracle will release• a Database RU ( = Proactive Bundle Patches (BPs)), • a Grid Infrastructure RU, • and an OJVM RU.
• No More PSUs or Bundle Patches for the 12.2.0.1 release
• The first RUR ( = Patch Set Updates (PSUs)) for 12.2.0.1 is planned for October 2017 • October 2017, the 2nd RU for Oracle Database 12.2.0.1 is expected• January 2018, the 3rd RU is expected and the 2nd RUR is expected
• Speculations: Are to release only 2 RURs per RU
40
@ViscosityNA
PSUs are Very Important - (N-1)MOS 756671.1 - Oracle Recommended Patches - Oracle Databasehttp://www.dbaexpert.com/blog/master-reference-for-psus/
FYI: 12.2 Release Date - Release Schedule of Current Database Releases (Doc ID 742060.1)
12.1.0.2
11.2.0.4
@ViscosityNA
Data Guard Standby - First Patch Apply (11.2)Doc ID 1265700.1 - Data Guard Standby-First Patch Apply
• What is allowed:• 11.2.0.4 JulPSU to
11.2.0.4 OctPSU• 12.1.0.2 JulPSU to
12.1.02 OctPSU
• What is NOT allowed:• 11.2.0.3 JulPSU to
11.2.0.4• 11.2.0.4 JulPSU to
12.1.0.2
42
Starting in Oracle Database 11.2.0.1 and later• Apply candidate patch(see below) first on the
standby database (Binary Only)• Evaluate candidate patch• Switchover• Apply patch(es) on old primary database including
DataPatch• Switchover (Switch Back)
Candidates Patches:• Database home interim patches• Exadata bundle patches (e.g. Monthly and
quarterly database patches for Exadata)• Database patch set updates (PSUs)
Read the README.html file
@ViscosityNA Upgrade, Migrate & Consolidate to Oracle Database 12c
Performance: Preserve Statistics
Gather accurate performance statistics from productionAccurate means: Starting at least 1 month before the upgradeUse Automatic Workload Repository (AWR) Snapshots interval 30-60 minutes and
retention ~40 daysExtract AWR: SQL> @?/rdbms/admin/awrextr.sql
Performance snapshot comparison using AWR DIFF reports:SQL>select * from table(DBMS_WORKLOAD_REPOSITORY.AWR_DIFF_REPORT_HTML(<DBID>, 1, 101, 121, <DBID>, 1, 201, 221));
MOS Note:1477599.1 Best Practices Around Data Collection For Performance Issues
43
Pre-Upgrade/Migrate ConsiderationsAlways Consider Minimal or Zero Downtime Approach
Set Guaranteed Restore Points accordingly
Ensure AWR retention is long enough to capture historical data for comparison
Backup your database statistics, in case an older SQL plan needs restoring
Definitely consider RAT for real workload testing, instead of synthetic workloads tests
If upgrading older version of RAC to new version in place, special consideration need to be understood9i RAC to 12c RAC
Upgrade to 12c GI stack first, Flex ASM or notLegacy clients may not support new Net connections
@ViscosityNA
Oracle Database 12c Release 2Upgrade Paths
Minimum Effort Upgrades to Oracle 12c Release 2 (12.2)Source Database Target Database11.2.0.3 / 11.2.0.4 12.2.x12.1.0.1 / 12.1.0.2 12.2.x
Intermediate upgrade pathsSource Database Intermediate upgrade path Target database11.2.0.1 / 11.2.0.2 11.2.0.4 12.2.x11.1.0.6 / 11.1.0.7 11.2.0.4 12.2.x10.2.0.2/10.2.0.3/10.2.0.4/10.2.0.5 11.2.0.4 / 12.1.0.2 12.2.x10.1.0.5 11.2.0.4 / 12.1.0.2 12.2.x9.2.0.8 11.2.0.3 / 11.2.0.4 12.2.x
@ViscosityNA
Oracle Database 12c Release 2For Super Old Versions
Intermediate upgrade pathsSource Database Intermediate upgrade path Target database7.3.3 (lower) 7.3.4 --> 9.2.0.8 --> 11.2.0.3 or higher 12.2.x8.0.5 ( or lower ) 8.0.6 --> 9.2.0.8 --> 11.2.0.3 or higher 12.2.x8.1.7 ( or lower ) 8.1.7 --> 9.2.0.8 --> 11.2.0.3 or higher 12.2.x9.0.1.3 ( or lower ) 9.0.1.3 --> 9.2.0.8 --> 11.2.0.3 or higher 12.2.x9.2.0.7 ( or lower ) 9.2.0.7 --> 11.2.0.3 or higher 12.2.x9.2.0.8 11.2.0.3 / 11.2.0.4 12.2.x
@ViscosityNA
• Oracle Database 19c Release Update & Release Update Revision October 2019 Known Issues (Doc ID 2568305.1)
Last updated on JANUARY 17, 2020
@ViscosityNA
19c Recommended Patches
@ViscosityNA
Oracle 19c (LiveSQL Released) - Jan 16, 2019
• https://blogs.oracle.com/oracle-database/oracle-database-19c-now-available-on-livesql
@ViscosityNA
Oracle 20c New Features• Native blockchain table
• Secure ledger table managed by a trusted provider who has the best security in the world
• Create blockchain table [ledger_of_tables]
• Insert only
• Rows are cryptographically chained and trusted
• New JSON datatype
• Binary JSON datatype for SQL and PL/SQL
• SCANS up to 10x faster
• Updates up to 4x faster
• SQL Update now allows SET and REMOVE of JSON elements
@ViscosityNA
Oracle 20c New Features
• In-Memory
• Support for Spatial and Text options
• 10x faster for Spatial
• 3x faster for Text
• Hybrid Scans
• In-memory scans get missing values from the buffer cache
• 10x faster hybrid queries
• Self-Managing In-Memory
• Auto In-Memory populate and evict
• No need to declare tables INMEMORY
Persistent Memory
• For workloads that need lower latency
than flash memory
• Keeps Data and Redo on local persistent
memory (PMEM)
• Eliminates I/O code path, no need for
large buffer cache
• Can scale out using Native Database
Sharding
@ViscosityNA
Oracle 20c New Features
• Automatic Machine Learning (Auto ML)• Automatically build and compare Machine Learning models
• Bring algorithms to the data, not data to the algorithm• Oracle DB natively includes dozens of ML algorithms including deep learning
• Extend in-database algorithm with Python and R• Easily deploy models via REST API• Perform parallel ML directly in Data Warehouses or OLTP for fast model
building and real-time scoring of the new data
Quarantine for Execution Plans for SQL Statements
SQL statements terminated due to excessive CPU and I/O can be quarantinedExecution Plans for above SQL are Quarantined
Enable/Disable a quarantine configuration:DBMS_SQLQ.ALTER_QUARANTINE procedure
Drop & Alter Quarantined Configuration (unused quarantined configs deleted 53 weeks):DBMS_SQLQ.DROP_QUARANTINE & DBMS_SQLQ.ALTER_QUARANTINE
DBA_SQL_QUARANTINE - details of quarantine configurationsV$SQL & GV$SQL to get execution plan details of quarantined SQL
54SQL Quarantine
@ViscosityNAviscosityna.com
Oracle 19c RAC and SE2 De-Support
• SE does not provide all the HA capabilities in Oracle Database
• SE2 Socket Requirements are hard to meet (as hardware evolves)
• SE RAC has been diminishing demand
• MOS: 2504078.1Desupport of Oracle Real Application Clusters (RAC) with Oracle Database Standard Edition 19c (Doc ID 2504078.1)
@ViscosityNAviscosityna.com
RAC for Standard Edition Customers
@ViscosityNAviscosityna.com
Cannot Install Oracle 19c SE
@ViscosityNA
19c: dbca silent enhancementsDuplicate and Oracle RAC database
• DBCA Silent Mode New features in Database 19C (Doc ID 2477805.1)• DBCA silent mode command "createDuplicateDB" will create a duplicate of a Non-
CDB or an Oracle RAC database.
• The createDuplicateDB command can be used to duplicate the following types of databases:
Duplicate an Oracle RAC database as a non-multitenant container database (non-CDB)Duplicate an Oracle RAC database as a pluggable database (PDB)Duplicate an Oracle RAC database as an Oracle RAC databaseDuplicate an Oracle RAC database as an Oracle RAC standby database
•Duplicate a non-CDB as a non-CDBDuplicate a non-CDB as a non-CDB standby databaseDuplicate a non-CDB as an Oracle RAC database
@ViscosityNA
19c Upgrade in silent modeOne of our financials customer• Set Oracle parameter SEC_CASE_SENSITIVE_LOGON to True
– This fails in the Pre-upgrade process since it is set to False on the 11.2 DB.
• Enable Flashback• Source 19c Home• export LD_LIBRARY_PATH=/u01/app/oracle/product/19.5.0/dbhome_1/lib
• nohup /u01/app/oracle/product/19.5.0/dbhome_1/bin/dbua -silent -sid TRXPRD1 -oracleHome /u01/app/oracle/product/11.2.0.3/db_1 -recompile_invalid_objects true -emConfiguration NONE -upgrade_parallelism 8 &
•
• Upgrade Logs - /u01/app/oracle/cfgtoollogs/dbua/upgrade2012-02-07_04-47-49PM
• Disable Flashback
@ViscosityNA
Rapid Home Provisioning (RHP)In 19c, now called Fleet Patching and Provisioning (FPP)
• Every terminology is going towards Fleet – i.e. Fleet Container
Database Management
@ViscosityNA
Oracle 19c
• Long Term Support • EBS will be certified in Oracle 19c• Customers are being told to go to Oracle 19c• Here’s the ISSUE
• If you are on 11.2.0.4, you are already too late• Need to wait for the 1st RU or 2nd RU before even considering
19cFactoid
• As of Q4 2018, about 80% customer databases are on 11.2 and 12.1• Oracle does not charge for extended support on Oracle Cloud
@ViscosityNA
Oracle 19cMy Oracle Support Document 2485457.1
• Auto Upgrade for Oracle Databases• Must download the AutoUpgrade Kit (Starting with 12.2 and 18.5)
• For 12.2: Requires the January 2019 Release Updates (DBJAN2019RU)• Upgrade database instance from command line with single configuration file• Runs pre-upgrade tasks• Performs automated fix-ups• Performs the actual upgrade• Performs post-upgrade tasks
• Automatic retry and tailback• Schedule the upgrade• Change init.ora parameters along the way
@ViscosityNA
Easy Connect Enhancements
• Add support for multiple hosts and ports in the connection strings • Designed for easier load-balancing client connections
• Easy Connect Adapter accepts list of name-value pairs• &CONNECT_TIMEOUT=45• &RETRY_COUNT=3• &SDU=
@ViscosityNA
Automated Testing of Query Plans
• NO DBA INTERVENTION NEEDED• Oracle says:
• Companies no longer need to perform full regression tests … Hmmm
• Oracle 19c will “automagically” check built-in execution plans against existing plans• Then replace current plan with the faster plan• Or keep the existing plan• Idea is queries will run just as fast or better
@ViscosityNA
Automatic Indexing
• NO DBA INTERVENTION NEEDED• One of the biggest 19c feature• Fully automated• Oracle will identify candidate indexes• Oracle will first create those indexes as unusable and invisible (metadata only)
• Verify: oracle will ask the optimizer to test if those candidate indexesimprove the SQL performance
• Validate & Implement: If the performance is better for all statements when indexed is used, it will become visible
• Will have audit reports as part of database system reporting
April 2-6, 2017 in Las Vegas, NV USA #C17LV
Activating and Controlling AIC
Is AIC activated? And if so, at what levels?1
SQL> SELECT parameter_name, parameter_valueFROM dba_auto_index_config;
AIC Parameter Setting-------------------------------- ---------AUTO_INDEX_COMPRESSION OFFAUTO_INDEX_DEFAULT_TABLESPACEAUTO_INDEX_MODE IMPLEMENTAUTO_INDEX_REPORT_RETENTION 31AUTO_INDEX_RETENTION_FOR_AUTO 373AUTO_INDEX_RETENTION_FOR_MANUALAUTO_INDEX_SCHEMAAUTO_INDEX_SPACE_BUDGET 50
AIC is already activated and it’s running in fully automatic mode. It can also be set to only gather
intelligence for later index implementation (REPORT ONLY) or even deactivated (OFF)
AIC logging will be retained for 31 days; any AIC-created indexes will be retained
for at least 373 days …
… and up to 50% of the AIC default tablespace can be allocated for AIC –
created indexes
April 2-6, 2017 in Las Vegas, NV USA #C17LV
Are There Any AIC-Created Indexes Already?
SQL> SELECT owner, table_name, index_name, visibilityFROM dba_indexesWHERE auto = 'YES'ORDER BY 1,2,3; OWNER TABLE_NAME INDEX_NAME VISIBILITY
----- -------------------------------- -------------------------------- ------------TPCE ADDRESS SYS_AI_c3s7r26pujqyw INVISIBLETPCE COMPANY SYS_AI_5bz560x7mkmm5 INVISIBLETPCE COMPANY SYS_AI_8m4x6f5kzagpk INVISIBLETPCE COMPANY_COMPETITOR SYS_AI_g16pbfxkcvndg INVISIBLETPCE CUSTOMER_ACCOUNT SYS_AI_2nq8gbwuzdb6j INVISIBLETPCE CUSTOMER_ACCOUNT SYS_AI_d3kmzk12banrf VISIBLETPCE DAILY_MARKET SYS_AI_804nrthjdbw65 INVISIBLETPCE FINANCIAL SYS_AI_f48n5gfuab5xd INVISIBLETPCE HOLDING_HISTORY SYS_AI_c2vqkp1cnaynt INVISIBLETPCE HOLDING_SUMMARY SYS_AI_5unr1rda8j36j INVISIBLETPCE NEWS_XREF SYS_AI_8v3ttavnf0607 INVISIBLETPCE SECURITY SYS_AI_2gm9u3nyxkwcu INVISIBLETPCE SECURITY SYS_AI_4qyqwxyvbn1ut INVISIBLETPCE TRADE SYS_AI_1hjwdmk5q4mkz VISIBLETPCE TRADE SYS_AI_385rjxyamg6nd VISIBLETPCE TRADE SYS_AI_a8805thkfs7ua VISIBLETPCE TRADE SYS_AI_f03t41rg8f49c INVISIBLETPCE TRADE_HISTORY SYS_AI_cbcn2hcywmvcb INVISIBLETPCE WATCH_ITEM SYS_AI_cz35y7a104y79 INVISIBLETPCE WATCH_LIST SYS_AI_3h68gvvm1cmvr INVISIBLE
The SYS_AI prefix is proof that AIC has been hard at work …
… but even though AIC created these
indexes automatically, some are still
INVISIBLE because they’re not yet
valuable enough to improve workload
performance
19c - Automatic Indexes & Data Dictionary ViewsAuto indexes are local B-tree IndexesAuto Indexes can be created for partitioned tables & non-partitioned tablesAuto Indexes can’t be created for temporary tables
The main dictionary view that shows the configuration settings for automatic indexing:DBA_AUTO_INDEX_CONFIG
Views with the AUTO column that shows whether an index is AUTO Index: set to YES or sets it to NO if it’s not an Auto Index.
DBA_INDEXESALL_INDEXESUSER_INDEXES
19c - DBMS_AUTO_INDEX.REPORT for more Info
October 7, 2019 73
Read Mostly Physical Standby
October 7, 2019 75
@ViscosityNA
19c: Data Guard DML Re-Direction
• RUN DML on ADG
• Re-Direct DML statement back to the primary database • Data changes will happen on the primary database• Changed blocks will ship to ADG• ADG wil be in sync to maintain redundancy
Set ADG_REDIRECT_DML initialization parameter = TRUESQL> ALTER SESSION ENABLE ADG_REDIRECT_DML;
@ViscosityNA
Additional 19c New Features
Duplicate a non-CDB — Or an Oracle RAC database with dbca in silent mode
createDuplicateDB command of DBCA in silent mode.Can be duplicated to a remote server with connectivity from the source system (where DBCA is running) to the target remote server.
Relocate a PDB to another CDB using DBCA in silent mode
RelocatePDB command of DBCA in silent mode
Simplified Image Based Oracle Database Client Installation
Starting with Oracle Database 19c, installation and configuration of Oracle Database Client software is an image-based installation.To install Oracle Database Client, create the new Oracle home, extract the image file into the newly-created Oracle home, and run the setup wizard to register the Oracle Database product.
Oracle Clusterware dry-run mode upgrade to check your system’s upgrade readiness
Starting with Oracle Grid Infrastructure 19c, the Oracle Grid Infrastructure installation wizard (gridSetup.sh)
The wizard performs all of the system readiness checks as an actual upgradeEnables you to verify if your system is ready for upgrade before you start the upgrade
Does not perform the actual upgrade
@ViscosityNA
Additional 19c New Features
Hybrid Partitioned tables Enables partitions to reside in both Oracle Database segments and in external files and sources. — Enhances functionality of partitioning for Big Data SQL where large portions of a table can reside in external partitions.— Move non-active partitions to external files, such as Oracle Data Pump files, for a cheaper storage solution— Move non-active partitions to Big Data
Flashback physical standby when the primary database is flashed back
In previous releases, getting the secondary to the same point in time as the primary requires a manual procedure to flash back standby databases. A new parameter is introduced which enables the standby database to be flashed back automatically when Flashback Database is performed on the primary database.
Propagate restore points to the standby Restore points and GRP is stored in the control file and not propagated to the standby site
With Failover, the standby becomes the new primary and restore point information is LOST
Now, the restore points are preserved after a failover
MIRA + In-Memory ADG
It its one or the other before
Now you can have best of both
@ViscosityNA
Additional 19c New FeaturesFSFO in “Test” Mode Configure it to Observe only creating a 'test mode' to see when a failover or other
interaction would have occurred during the normal production processing- Can tune FSFO for finer granularity- Can see IF FSFO would have actually occurred without production impact- Improve failover validation
Dynamically Change FSFO target With 12.2, we can have multiple FSFO targets
With 19c, we can change the targets without FSFO being disabled
PDB Recovery Catalog PDBs are now supported as a target database
Can be used with Virtual Private Catalog (VPC)
@ViscosityNA
Additional 19c New Features
Clear Flashback logs periodically to increase FRA size predictability
Starting in 19c, the management of space in the fast recovery area is simplified
Oracle Database monitors flashback logs in the fast recovery area and automatically deletes flashback logs that are beyond the retention period. When the retention target is reduced, flashback logs that are beyond the retention period are deleted immediately.
@ViscosityNA
Additional 19c New Features
RAT at PDB Level Starting in 19c, capture and replay is supported at PDB level
ASM Parity Protected Files Single Parity for redundancy Intended for write-once files such as archive logs and backup sets
For Flex Disk GroupNot supported for datafiles
Requires 3 regular failure groups in a flex disk groupFined Grained PDB Patching Patch individual PDBs in a Multi-tenant environment
Allows bug fixes to be patched only on specific PDBs rather than across the entire CDB
@ViscosityNA
Direct Placement for OCR and Vote Disks18c Desupported19c Re-Supported
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.87
HCC - Hybrid Columnar CompressionHighest Capacity, Lowest Cost
▪ Data is organized and compressed by column– Dramatically better compression
▪ Speed Optimized Query Mode for Data Warehousing
– 10X compression typical– Runs faster because of Exadata offload!
▪ Space Optimized Archival Mode for infrequently accessed data
– 15X to over 50X compression typical
Que
ry
Faster and SimplerBackup, DR, Caching, Reorg, Clone Benefits Multiply
Mission CriticalZero Downtime Upgrades and MigrationsZero Risk With Reverse Replication
@ViscosityNA
@ViscosityNAviscosityna.com
18c: Scalable Sequencesselect hca_seq_scale_01.nextval from dual;
select sys_context('USERENV', 'INSTANCE'), sys_context('USERENV', 'SID')
from dual;
Let’s dissect the sequence number:101808 0000000000000000000003
@ViscosityNA
18c: Scalable SequencesLet’s dissect the sequence number:101808 0000000000000000000003 = total 28 digits
6 digit scalable sequence offset numberNormal sequence number – 22 digits
Let’s dissect the scalable sequence offset:101 808
3 digit instance offset number: [ (instance id % 100) + 100 ] => 1013 digit session offset number: ( session id from session information % 1000 ) = 1808/1000 = remainder of 808
@ViscosityNA
Oracle Database 18c New Features
Zero Impact Grid Infrastructure Patching Per-PDB Switchover
Sharded RACLogically partition data across instances in RACUser Defined Sharding
@ViscosityNA
Really19c
Oracle Read-Only Oracle HomeSome Files that used to be in ORACLE_HOME are in ORACLE_BASE_HOME and
ORACLE_BASE_CONFIGBiggest benefit is Patching and Update the Database without large downtimes.One Read-Only Image can be to distribute to many DatabasesTo enable/help commands:
$roohctl -enable (next, run ./dbca from the bin directory)$roohctl -help
Following are the possible commands:
-enable Enable Read-only Oracle Home
-disable Disable Read-only Oracle Home
106
18cOracle
Database
Oracle Read-Only Oracle Home & RPM InstallThe database tools and processes write under the ORACLE_BASE path instead of under the Oracle home directory. A read-only Oracle home separates the software from the database configuration information and log files. This separation enables you to easily share the software across different deployments. A read-only Oracle home also simplifies version control and standardization.
Oracle 18c also includes an RPM-based Database Installation:▪$rpm –ivh (performs preinstallation validations, extracts packaged software, reassigns
ownership, executes root operations for the installation...etc.)
107
18cOracle
Database
@ViscosityNA
Oracle Database 18c New Features
Database In-Memory Support for External Tables
-Great for HDFS
Rolling patches for OJVM
Integration with Active Directory (No OID)Authorization to database through Active Directory user/group mappings to database schema users and roles
Per PDB Key storagePassword-less schema creationNo default passwords
In-Memory for external tablesBuild and load in single queryVirtual columns in-memory
Private Temporary Tables(to go along with current Global Temporary Tables)
• CREATE PRIVATE TEMPORARY TABLE is the same as GTT but only visible to the session that creates it
Automatic In-Memory
- evicts the infrequently accessed IM columns out of memory in the situation of memory insufficiency
- based on the Heat Map
Alter Table Merge Partition & SubPartition Online
@ViscosityNA
Oracle Database 18c Additional Features
Official Docker Support for 18c (and RAC Support Coming)
Snapshot Carousel
Duplicate PDBs across CDBsInline External TablesExternal Table Definition provided at runtimeNo need to pre-create external tables that’s only used once
Dynamic Data Masking - redact data before it is returned to the applicationThe Express Edition (XE) is free use for development or production (not recommended)
Nearly all functionality is IncludedLimited to 12G of user storage (was 11G in 11g)Limited to 2G of SGA
@ViscosityNA
Oracle Database 18c Additional Features
Shadow Lost Write Protection-DB, TS or Datafile
Transportable Backups
Backups from non-CDBs are usable after migration to CDB
- Backups on source DB are PREPLUGIN backups
RMAN duplicate PDB into existing CDB Backup to archive storage
- Enhances Oracle SBT Library to Archive Storage Cloud
Manual termination of run-away queriesManually kill a statement without breaking the session:
ALTER SYSTEM CANCEL SQL.
ALTER SYSTEM CANCEL SQL ‘SID, SERIAL, @INST_ID, SQL_ID’;
New parallel statement queue timeout and dequeue actions
@ViscosityNA
Multi-Instance Redo Apply Supports Use of Block Change Tracking Files for RMAN Backups
MIRA + BCT = ADG (Best of both worlds)
•RMAN block change tracking file can now be enabled on an Oracle Active Data Guard standby that is using multi-instance Redo Apply•Fastest redo apply technology + incremental backup technology on the same Oracle Active Data Guard
@ViscosityNA
PDB Switchover Clause
• Reverses the roles between a refreshable clone PDB and a primary PDB. • The former Refreshable clone PDB becomes the primary PDB, which can
now be opened in read write mode. • The formerly primary PDB now is the refreshable clone and can only be
opened in READ ONLY mode.• This command must be executed from the primary PDB.• The dblink must point to the root CDB where the refreshable clone PDB
resides.
alter pluggable database refresh mode auto every 2 minutes from new_pdb@dblink switchover;
June 11, 2018 146
18cOracle
Database
Oracle 18c – Inline External Tables
June 13, 2018 163
18cOracle
Database
Multitenant
• Container managed database virtualization
• Manage Many as one (Great!)• Patching, Backup, Security, Online
Cloning, Online Relocation165
Oracle 12c Oracle Database 18c
• Per-PDB Switchover• Transportable Backups• Snapshot Carousel• Faster Upgrades
18cOracle
Database
@ViscosityNAwww.viscosityna.com
Oracle Database 12.2For IT Transformation
January 2020
Charles Kim, CEOOracle ACE Director
Oracle Platinum Partner
@ViscosityNA
Why You Should Consider Upgrading to Oracle 12.2 or 18c
11.2 Premier Support Ended - ULA?12.1.0.2 Premier Support EndEven Oracle 19c ?
@ViscosityNA
Silent Installation of RAC / ASM / DB - Oracle Database 12.2Different Way of Installing / Configuring Oracle
• Create 2-4 Node RAC environments easily with automation
• Create ASM instances in silent mode (for non-RAC)
• Create ASM Disk Groups with automation
• Perform Silent Installations of Oracle DB Software
• Create Databases with dbca in silent mode
@ViscosityNA
@ViscosityNA
12cR2 Initialization Parameters
• Oracle 12c Release 2 now has 4649 initialization parameters • Oracle 12c Release 2 now has 412 documented and 4237 hidden.
• Oracle 12c R2 has 746 V$ views and 1,312 X$ tables
• There is also an additional column on many V$ views for Container ID (CON_ID) with PDBs (Pluggable Databases) and CDBs (Container Database).
• Make sure that you adjust any scripts that you have to accommodate this new column.
@ViscosityNA 240
Fully Encrypted DatabaseTablespace Encryption (TDE)
Encryption in the Silicon (M7)Oracle Multi-Tenant Security (PDBs)Oracle Audit Vault
Oracle Database Vault DB Security Evaluation #19
Transparent Data Encryption EM Configuration Scanning
Fine Grained Auditing (9i)Secure application roles
Client Identifier / Identity propagationOracle Label Security (2000)
Proxy authenticationEnterprise User Security
Global rolesVirtual Private Database (8i)
Database Encryption APIStrong authentication (PKI, Kerberos, RADIUS)
Native Network Encryption (Oracle7) Database Auditing
Government customer
Oracle Database SecurityBuilt over MANY years...
1977
Full Database Encryption
TDE Tablespace Offline Conversion- No storage overhead
- Requires downtime
- Role-Based Conditional Auditing
- Auto Lockout of Inactive Accounts- CREATE PROFILE time_limit LIMIT INACTIVE_ACCOUNT_TIME 30;
@ViscosityNA
Security
• Encryption– In 12.2, encryption of a tablespace can be
deployed with zero downtime.– You can encrypt, decrypt, and rekey a
tablespace using Transparent Data Encryption (TDE) in live conversion.
– You cannot encrypt, decrypt or rekey a temporary tablespace online.
• Future Tablespaces to be Encrypted– For Oracle Cloud– ALTER SYSTEM SET
ENCRYPT_NEW_TABLESPACES = CLOUD_ONLY;
– AES128
• Separation of Duty for Administering RAC Clusters– The intent of SYSRAC, is to provide only the minimal
set of privileges for the RAC admin to perform daily tasks.
– The SYSRAC privilege is for RAC, whereas the SYSDG privilege is for Data Guard.
– The SYSRAC privilege reduces the reliance on SYSDBA on production RAC systems.
– SYSRAC privilege is the default mode for connecting to the database by clusterware agent; e.g, when executing RAC utilities such as SRVCTL.
@ViscosityNA
SecurityZero Downtime Encryption and Decryption
• TDE encryption now available for all tablespaces; including SYSTEM, SYSAUX, and UNDO
• Extend encryption and hashing algorithms to include ARIA, GOST, and SEED Encryption Algorithms for International Standards.
• Perform offline conversion of a tablespace, without additional storage overhead.
• To encrypt an existing tablespace online, you must login to the database with the SYSKM role. To encrypt the SYSTEM or SYSAUX tablespace, you must login with the SYSDBA role.– SQL> ALTER TABLESPACE sysaux ENCRYPTION ONLINE USING 'AES256' ENCRYPT;
• Decrypt a tablespace online without any downtime– SQL> ALTER TABLESPACE sysaux ENCRYPTION ONLINE DECRYPT;
Starting in 18c: You can encrypt sensitive credential data stored in data dictionary -SYS.LINK$ & SYS.SCHEDULER$_CREDENTIAL system tables; Previously obfuscated.
@ViscosityNA
SQL*PlusHistory
• set hist on
• SQL> set hist 1000• SQL> show hist
history is ON and set to "1000"
SQL> help hist HIST[ORY] [N {RUN | EDIT | DEL[ETE]}] | [CLEAR]
SQL> show hist
SQL> hist 2 runSQL> hist 3 del
SQL> hist clear
spool JSON + CSV
• set feedback onlyReturn # of rows only without displaying output of the query
login.sql behavioral changesDOC ID: 2241021.1
@ViscosityNA
DBMS_TNS
• Perform a TNSPING from the Database– Resolves a TNS name and return the corresponding Oracle connection string– Works for TNS Alias and EZ*Connect
SQL> select dbms_tns.resolve_tnsname(‘&TNS_ALIAS') from dual;
@ViscosityNA
HUGE Improvements – 12cR2
• In 12c, object names for users, roles, tables, columns, indexes, constraints, etc. have been increased from 30 bytes to 128 bytes with a few limitations.
• The limit for tablespace names and pluggable databases is still 30 bytes, but others all increase to 128 bytes.
• You will notice this change in the dictionary views where the VARCHAR2 columns will shows as 128 bytes instead of 30 bytes.
• It also helps in migrations from non-Oracle systems where the name is longer than 30 characters.
• The best enhancement in 12c R2 is 32K VARCHAR is default. This allows the extending of the VARCHAR data types without having to enable the extended mode specifically (early 12c). The size limit for both VARCHAR2 and NVARCHAR2 is 32K.
@ViscosityNA
Oracle Database 18cVARCHAR2(4000) to VARCHAR2(32000)
--Connect to the CDB AS SYSDBA.ALTER SESSION SET CONTAINER=CDB$ROOT;--change the setting of MAX_STRING_SIZE to EXTENDED:ALTER SYSTEM SET max_string_size=extended SCOPE=SPFILE;--Shut down the CDB.SHUTDOWN IMMEDIATE--Restart the CDB in UPGRADE mode.startup upgrade;--Use the catcon.pl script to run the rdbms/admin/utl32k.sql script in the root and in all the PDBs in the CDBcd $ORACLE_HOME/rdbms/adminmkdir /scratch/mydir/utl32k_cdb_pdbs_output--run upgrade (must have sys pwd)$ORACLE_HOME/perl/bin/perl $ORACLE_HOME/rdbms/admin/catcon.pl -u SYS --force_pdb_mode 'UPGRADE' -d $ORACLE_HOME/rdbms/admin -l '/tmp/utl32k_cdb_pdbs_output' -b utl32k_cdb_pdbs_output utl32k.sql--Resonse was: catcon.pl: completed successfully
--Log back in as sysdba to CDBshutdown immediate;startup; exit;mkdir /tmp/utlrp_cdb_pdbs_outputcd $ORACLE_HOME/rdbms/admin--recompile objects (must have sys pwd)$ORACLE_HOME/perl/bin/perl $ORACLE_HOME/rdbms/admin/catcon.pl -u SYS --force_pdb_mode 'READ WRITE' -d $ORACLE_HOME/rdbms/admin -l '/tmp/utlrp_cdb_pdbs_output' -b utlrp_cdb_pdbs_output utlrp.sql
@ViscosityNA
Long Name Identifiers
• Table Name to 128 bytes• Column Name to 128 bytes
SQL> create table ECOUG_oracle_users_are_super_cool_in_RALEIGH_NC_in_2018_tab (oracle_database_12c_release_2_is_available_for_general_availability_column_1 integer);
Table created.
Long Table Name
Long Column Name
Partitioning
@ViscosityNA
Partitioning OverviewAdditional Features
• Convert Non-Partitioned Table to a Partitioned Table
• Read-Only Partitions
• Multi-Column List Partition
• Split Partition with Online Maintenance
• Create a Partitioned External Table– Support to map partitioned Hive tables into the Oracle Database ecosystem as well as providing declarative
partitioning on top of any Hadoop Distributed File System (HDFS) based data store.– External Tables Can Access Data Stored in Hadoop Data Sources Including HDFS and Hive
@ViscosityNA
Big Data Innovations
• External tables can be partitioned– using any partitioning technique
• Partition pruning– For faster query performance
• Basic partition maintenance– Add, drop, exchange
Partitioned External Tables
SQL
Thanks Oracle: Graphics
Big Data Innovations
External tables can be partitioned▪using any partitioning technique
Partition pruning▪For faster query performance
Basic partition maintenance▪Add, drop, exchange
Partitioned External Tables
SQL
Thanks Oracle: Graphics
In 18c: Inline and In-Memory External Tables18c
Oracle Database
@ViscosityNA
PartitioningConvert Non-Partitioned Table To A Partitioned Table Example
• ALTER TABLE mytable MODIFYPARTITION BY RANGE (tab_id) INTERVAL (25) ( PARTITION p1 VALUES LESS THAN (100), PARTITION p2 VALUES LESS THAN (1000))ONLINEUPDATE INDEXES( IDX1_tab_id LOCAL (PARTITION ip1 VALUES LESS THAN (MAXVALUE)));
• With ONLINE option, zero downtime conversion to Partitioning Strategy
@ViscosityNA
PartitioningRead-Only Partitions Example
• CREATE TABLE mytable (tab_id NUMBER(10) NOT NULL, tab_desc VARCHAR2(20)) READ WRITE PARTITION BY RANGE (tab_id) ( PARTITION mytable_p1 VALUES LESS THAN (100),PARTITION mytable_p2 VALUES LESS THAN (1000) READ ONLY) );
• Old Method: Make tablespace read-only
• Implications: Simplified Backups, Tiering of Data
@ViscosityNA
PartitioningMulti-Column List Partitions Example
• CREATE TABLE mytable (tab_id NUMBER(10) NOT NULL, tab_desc VARCHAR2(20), tab_code VARCHAR2(2), tab_channel NUMBER(2)) PARTITION BY LIST (tab_code, tab_channel)( PARTITION mytable_p1 VALUES ( (‘AB’,10), (‘AC’,20) ), PARTITION mytable_p2 VALUES (DEFAULT) );
PartitioningSplit Partitions in 12.2
ALTER TABLE mytable
SPLIT PARTITION p1 at (100)
INTO (PARTITION p1_1, PARTITION p1_2) ONLINE;
(Can Split Sub-Partitions too – both in 12cR2)
In 18c: Alter Table Merge Partition Online & Alter Table Merge Subpartition Online
18cOracle
Database
PartitioningMerge Partitions Example in 18c
Merge Range Partitions:ALTER TABLE four_seasons
MERGE PARTITIONS quarter_one, quarter_two
INTO PARTITION quarter_two UPDATE INDEXES ONLINE;
Merge List Partitions:ALTER TABLE q1_sales_by_region
MERGE PARTITIONS q1_northcentral, q1_southcentral
INTO PARTITION q1_central STORAGE(MAXEXTENTS 20) ONLINE;
June 13, 2018 256
• With UPDATE INDEXES clause, the indexes remain usable during the move operation
18cOracle
Database
@ViscosityNA
PartitioningMisc New Features
• Automatic List Partitioning – The automatic list partitioning method enables list
partition creation on demand.
• Deferred Segment Creation for Automatic List Partitions and Interval Subpartitions – Saving disk space when partition and subpartition
creation is in the presence of data.
• Creating a Table for Exchange with a Partitioned Table – Tables can be created with FOR EXCHANGE WITH clause,
to exactly match the definition of the partitioned table for partition exchange command.
@ViscosityNA
Online Table MoveZero DownTime
• ALTER TABLE ... MOVE ... ONLINE
• ALTER TABLE ... MOVE PARTITION ... ONLINE
• ALTER TABLE ... MOVE SUBPARTITION ... ONLINE
• ALTER TABLE consultant_details MOVE ONLINECOMPRESS TABLESPACE data_ts1UPDATE INDEXES (idx1 TABLESPACE index_ts1,
idx2 TABLESPACE index_ts2);
• Table move operation now also supports automatic index maintenance as part of the move.
• With UPDATE INDEXES clause, the indexes remain usable during the move operation
Data GuardMaximum Availability Architcture
“Disaster strikes without warning.> Data loss strikes without warning.”
@ViscosityNA
Evolution of Data Guard
261
Oracle Version Big Feature AddedOracle 7.3 Hot Standby
Oracle 8i Read-Only Physical StandbyManaged Recovery
Oracle 9i Logical Standby, Switchover/FailoverAutomatic Gap ResolutionCascaded Redo
Oracle 10g Real-time applyStandby Redo Logs FSFOFlashback Database on DG
Oracle 11g Active Data GuardRedo CompressionSnapshot StandbyRolling Transient UpgradesRMAN Duplicate from Active Database
Oracle 12.1.0.1 Far SyncFast Sync (LOG_ARCHIVE_DEST_n attributes SYNC and NOAFFIRM)Data Guard Broker Switchover EnhancementsSYSDG RoleOnline Standby Database File RenameSignificantly Improved Rolling Upgrades (DBMS_ROLLING)
@ViscosityNA
More DG 12.1 New Features Overview
• Resumeable Switchover
• Can do DML operations on Temporary tables on ADG instances
• Can use sequences on ADG• Cache • NoOrder
• Can do Incremental Updates over TNS from the standby database
• Do not need using current logfile for real-time apply• DEFAULT: alter database recover
managed standby database using current logfile disconnect;
• Can move location of an online data file … moves on the primary database do not affect the standby
26
@ViscosityNA
Data Guarddbca
• Create standby databases with DBCA– Must use command line dbca interface– Can only create from Non Multi-tenant primary
database– Cannot do RAC– dbca -createDuplicateDB
-gdbName global_database_name -primaryDBConnectionString
easy_connect_string_to_primary-sid database_system_identifier[-createAsStandby
[-dbUniqueName db_unique_name_for_standby]]
[-customScripts scripts_list]
• -createAsStandby followed by dbUniqueName For Standby
• [-customScripts scripts_list]
• List of scripts to be executed• Oracle will execute the scripts in the
order they are listed
– No Need for TNSNAMES.ORA entry– Can use easy connect string– "host[:port][/service_name][:server][/instance_name]"
@ViscosityNA
Data Guarddbca
$ dbca -silent -createDuplicateDB \-gdbName viscorcl \-primaryDBConnectionString rac01:1521/viscorcl \-sid viscorcl -createAsStandby \-dbUniqueName sviscorcEnter SYS user password: Listener config step 33% complete Auxiliary instance creation 66% complete RMAN duplicate 100% complete Look at the log file "/u01/app/oracle/cfgtoollogs/dbca/sviscorc/viscorc.log" for further details.
@ViscosityNA
Data GuardNoLogging & MIRA
NoLogging on Primary• Nologging blocks are recorded in the control
file on the physical standby database• On the StandbyRMAN RECOVER DATABASE NONLOGGED BLOCK
• After switchover, the old primary database must be in a mounted state
Multiple Instance Redo Apply (MIRA)• Can run Redo Apply in some or all of the
standby instances• Redo Apply scales as wide as standby RAC
configuration• ALTER DATABASE RECOVER MANAGED
STANDBY DATABASE command now accepts a new INSTANCES [ ALL | integer] clause
• All the instances must be in the same mounted or open mode
• cannot specify which RAC instance(s) will perform the redo apply
Standby NologgingStandby Nologging tells the database not to log operations that qualify to be done without logging.Standby Nologging tells the database to send the data blocks created by the Nologging operation to each qualifying standby database in Data Guard configurationThis typically results in those standbys NOT having invalid blocks.You can set standby no logging for load performance or data availability in the following statements:▪ ALTER DATABASE▪ ALTER PLUGGABLE DATABASE▪ CREATE DATABASE▪ CREATE CONTROLFILE
266
18cOracle
Database
Standby NologgingDatabase nologging extended for better use with Oracle Active Data Guard environment
(without significantly increasing the amount of redo generated). There are two new nologging modes:
Standby Nologging for Load Performance – Standbys receive non-logged data changes(minimum impact on loading speed at). Non-logged blocks automatically resolved by managed standby recovery. Standby Nologging for Data Availability - Standbys have data when primary load commits
(at the cost of throttling the speed of loading data at the primary), which means the standbys never have any non-logged blocks to worry about. Nologging can be used when loading data into your production databases without
compromising the integrity of Data Guard standby databases, pick your level of synchronization between primary & standby databases.
267
18cOracle
Database
@ViscosityNAviscosityna.com
Automatic Correction of Non-logged Blocks at a Data Guard Standby Database
2 Modes
• Standby Nologging for Data Availability - commit of a loading operation is delayed until all standby have applied data
SQL> ALTER DATABASE SET STANDBY NOLOGGING FOR DATA AVAILABILITY;
• Standby Nologging for Load Performance
SQL> ALTER DATABASE SET STANDBY NOLOGGING FOR LOAD PERFORMANCE;
268
@ViscosityNA
Data GuardIn-Memory with Active Data Guard
In-Memory with Active Data Guard• IM option can be configured on the primary database, on
an ADG standby database, or on both the primary and the ADG standby databases
• The INMEMORY_ADG_ENABLED parameter needs to be enabled – By default, the INMEMORY_ADG_ENABLED parameter is
set to true. • For RAC configuration, this parameter must be set to the
same value across all the RAC instances
@ViscosityNA
Data GuardBroker Support for Redo Transport of Different Endianness to ZDLRA
ZDLRA
• Can manage a remote redo destination that has a different endianess than the primary database
• Consider cross platform migrations with the ZDLRA and the ability to synchronize databases of heterogeneous configurations with different endianness
• Significantly improve the flexibility of migrating databases from one platform to another with the ZDLRA.
@ViscosityNA
Data GuardSubset Standbys
• In 12.1, ENABLED_PDBS_ON_STANDBY initialization parameter only supported two values: all PDBs or none
• The ENABLED_PDBS_ON_STANDBY parameter is only applicable on the physical standby database – can accept a list of PDB names or a glob pattern such as “VNAPDB?” or “VNAPDB*a”,
“VNAPDB2”– Glob pattern rules are similar to regular expression rules in common UNIX shells – asterisk (*) and question mark (?) wildcard characters are supported.
• The question mark (?) represents a single unknown character; – the asterisk (*) represents matches to any number of unknown characters. – This parameter also accepts a minus sign (-) which can be used as the first character in a
PDB name to designate that the PDB should be excluded on the standby database
@ViscosityNA
PDB Switchover Clause
• Reverses the roles between a refreshable clone PDB and a primary PDB. • The former Refreshable clone PDB becomes the primary PDB, which can
now be opened in read write mode. • The formerly primary PDB now is the refreshable clone and can only be
opened in READ ONLY mode.• This command must be executed from the primary PDB.• The dblink must point to the root CDB where the refreshable clone PDB
resides.
alter pluggable database refresh mode auto every 2 minutes from new_pdb@dblink switchover;
June 11, 2018 272
18cOracle
Database
Multitenant
• Container managed database virtualization
• Manage Many as one (Great!)• Patching, Backup, Security, Online
Cloning, Online Relocation273
Oracle 12c Oracle Database 18c
• Per-PDB Switchover• Transportable Backups• Snapshot Carousel• Faster Upgrades
18cOracle
Database
@ViscosityNA
PDB
• Hot Clones– Oracle 12.2 Multitenant option, fully integrates the
concept of “hot clones” with the ability to perform on-line cloning of PDBs.
• With hot clones, the source database is still open for read-write mode.
• All PDB clones in Oracle 12.2 are hot clones and will be referred to as clones.
• Read-Only Refreshable PDBs– On Oracle 12.2, PDBs can be cloned while the
source PDB is online. – With Refreshable PDBs, we can have the PDB refresh
data from the source PDB with delta changes, since the last refresh automatically (define in nnn Minutes) or on demand.
Poor Man’s ADG?
@ViscosityNA
PDB Hot Clone
• PDB Hot Clone– Online test master instantiation
CRM
Oracle Cloud
Pricing Retail
On-Premises
275
Hot Clone
Snap Clone
Snap Clone
CRM CRM Dev1CRM Dev2
Developers
@ViscosityNA
PDB Refresh
• PDB Hot Clone– Online test master instantiation
• PDB Refresh– Incremental refresh of clone with latest
data
CRM
Oracle Cloud
Pricing Retail
On-Premises
276
CRM
Snap Clone
Snap Clone
CRM Dev1CRM Dev2
Developers
TIME
Changes made to database
Cloned version no longer in sync
Only changes copied and applied
@ViscosityNA
PDB Relocate• PDB Relocate
– Oracle offers a new RELOCATE clause to the CREATE PLUGGABLE DATABASE, to “relocate” a PDB from one container database (CDB) to another container database.
– The PDB can be relocated to another CDB on the same server, within the same data center or across data centers.
– While the relocation process is occurring, database connections still persist on the original PDB. When the statement completes, there will be two transactionally consistent PDBs running.
• When the PDB is ready, the relocated PDB will be brought online on the new target CDB.
@ViscosityNA
• PDB Hot Clone – Online test master instantiation
• PDB Refresh– Incremental refresh of clone with latest data
• PDB Relocate– Relocate with no downtime
278
PDB Relocate
104
CRM
HR
Oracle Cloud
Pricing Retail
On-Premises
CRM
@ViscosityNA
Proxy PDBCREATE PLUGGABLE DATABASE proxy_pdb1 AS PROXY FROM other_pdb_from_another_cdb@proxy_link;
ALTER PLUGGABLE DATABASE proxy_pdb1 OPEN;
Notes:– Essentially an EMPTY PDB with SYSTEM, SYSAUX, TEMP and UNDO
tablespaces copied to the local instance – Need to consider network performance considerations– DB link is used for the initial creation of the proxy PDB– Has full DDL support (unlike DB Links)– All DML and DDL occur on the remote DB
• ALTER DATABASE and ALTER PLUGGABLE DATABASE commands refer to the proxy DB only and not the referenced PDB
– CONTAINERS clause executes on the remote DB
@ViscosityNA
PDB Use Cases
• Proxy– Move Databases from on-premise to the
Cloud and missed a batch job• Security company asked us to keep
SharePlex/GG on the source database just in case they missed something for end of the month and end of the quarter
– Monitor Production Databases from a single database environment
• Leverage Containers in clause to monitor all databases with a single SQL statement
@ViscosityNA
Refresh-able PDB
READ-ONLY PDB• Does not replace Active Data Guard but it
can be a poor man’s solution– Can tolerate 15-30 minute delay in data
Never Refresh DEV Again• Golden image production is refreshed on set
interval– Snapshot / clone from the refreshed PDB– Provision full size copy of PDB from refreshed PDB– Create multiple environments with just few
commands
@ViscosityNA Oracle Confidential – Internal/Restricted/Highly Restricted
PDB Restore Points
– What is a PDB Restore Point• A user-defined name associated with an SCN corresponding to the time the
restore point was created unique to the PDB
– Normal Restore Point• A label for an SCN or point in time• Stored in the control file• Ages out
– Guaranteed Restore Point• A restore point for which the database is guaranteed to retain the flashback
logs for a flashback operation.• Stored in the controlfile• Must be explicitly dropped
– Clean Restore Point• A PDB restore point that is created when the PDB is closed and when there are
no outstanding transactions for that PDB• Only applies to CDBs that use shared undo
282
@ViscosityNA
• Flashback PDB• Per-PDB character set• 4k PDBs per CDB
(4,096 - increased from 252)• AWR data at PDB level• Memory & I/O resource prioritization in
addition to CPU• Configurable isolation via
Lockdown Profiles• PDB-level failover capability with
Data Guard Broker
Isolation with Economies of Scale
RetailPricing
Multitenant Container
@ViscosityNA
PDBCPU Count, Max PDBs, Localized AWR, PDBAs & Character Set
• PDB CPU Count– With Oracle 12.2, we can set the CPU_COUNT
initialization parameters at the PDB level. – In Oracle 12.1, CPU limits were imposed on the PDB
as part of the CDB Resource Plan definition.
• 4096 PDBs per CDB– When PDBs were first introduced in Oracle 12.1, the
number of PDBs per CDB was 252– Now it has increased 4,096.
• Localized AWR– Having the AWR at the PDB level,
allows for a granular level of tuning and diagnostics.
• PDBAs– Oracle now introduces the concept
of the Pluggable DBAs (PDBAs), so that each PDB can be potentially maintained by a PDB Administrator.
• PDBS with Different Character Sets– In Oracle 12.2, CDBs can have PDBs
with different character sets, as long as the root container’s character set is the superset of all of the PDB character sets.
@ViscosityNA
PDB I/O Rate Limits
• 2 new PDB parameters– MAX_IOPS: maximum I/O requests per second – MAX_MBPS: maximum MegaBytes per second of I/O– Parameters can be dynamically altered
• Parameters can only be set at the PDB level on non-Exadata systems– Setting at the root level results in an error– Setting on Exadata results in an error
Feature
@ViscosityNA
Dealing with Shared Access
• Network • Administrative
• Common user or object
• System • FilePDB OS CREDENTIAL
PATH PREFIX & CREATE_FILE_DEST
PDB LOCKDOWN PROFILES
@ViscosityNA
• Declarative way to restrict a PDB’s access to:– Network– Administrative features– Common users and objects
• Scope of restrictions is PDB-wide
Configurable Isolation
@ViscosityNA
Lockdown Profiles: Apply Limits to PrivilegesPDB_LOCKDOWN initialization parameter to enable the a PDB lockdown profile
• Lockdown profiles are complementary to grants
• Grants alone are “all or nothing”
• Lockdown profiles add granular control of the capabilities enabled by the grant
grant alter system to pdb_user;
alter lockdown profile p1 disable statement=(‘ALTER SYSTEM’) clause=(‘SET’) option= ALL EXCEPT(‘plsql_code_type’,’plsql_debug’,’plsql_warnings’);
• Scope of ‘alter system’– cursor_sharing– ddl_lock_timeout– optimizer_mode– parallel_degree_limit– plsql_code_type– plsql_debug– plsql_warnings– resource_manager_plan– skip_unused_indexes– …
• Scope of ‘alter system’– cursor_sharing– ddl_lock_timeout– optimizer_mode– parallel_degree_limit– plsql_code_type– plsql_debug– plsql_warnings– resource_manager_plan– skip_unused_indexes– …
@ViscosityNA
• Limit Init.ORA Parameters
• Set any Min/Max values on Init Parameter
• ALTER LOCKDOWN PROFILE Lock_init_PROFILE DISABLE STATEMENT = ('ALTER SYSTEM') CLAUSE = ('SET') OPTION = (’CPU_COUNT') MINVALUE = ’4' MAXVALUE = ’16';
• Others to consider:– PARALLEL_MAX_SERVERS– PGA_AGGREGATE_TARGET
• Forces Common to Login to the root CDB and change to PDB. Does not allow direct PDB connection
• ALTER LOCKDOWN PROFILE Lock_common_PROFILE DISABLE FEATURE = ('COMMON_USER_CONNECT');
• Disable anything to do with the Partitioning and/or DB Queueing Option
• ALTER LOCKDOWN PROFILE Lock_queue_PROFILE DISABLE OPTION = ('DATABASE QUEUING');
• ALTER LOCKDOWN PROFILE Lock_part_PROFILE DISABLE OPTION = ('PARTITIONING');
More Lockdown Examples
@ViscosityNA
• Run this on the Root CDB and disable all Network and OS Access
• Override at PDB level (if needed)
• ALTER LOCKDOWN PROFILE Lock_Default_profile DISABLE FEATURE = ('NETWORK_ACCESS', 'OS_ACCESS');
• Lockdown Internet
• ALTER LOCKDOWN PROFILE Lock_Internet_profile DISABLE FEATURE = ('UTL_HTTP', 'UTL_SMTP');
• Disable Alter Database and Alter Pluggable Database
• ALTER LOCKDOWN PROFILE Lock_Alter_profile DISABLE STATEMENT = ('ALTER DATABASE', 'ALTER PLUGGABLE DATABASE');
• ALTER LOCKDOWN PROFILE Lock_System_profile DISABLE STATEMENT = ('ALTER SYSTEM') CLAUSE = ('SET') OPTION= (’NLS_DATE_FORMAT');
Lock out OS Access and Network Access Set as Default PDB Lockdown
@ViscosityNA
Planning For Upgrading to 18c Helpful MOS Notes
To BottomOracle 18c - Complete checklist for Manual Upgrade for Multi-tenant Architecture Oracle
Databases from 12.1.x.x to 18.x.x.x (Doc ID 2422161.1)
Oracle DB 18c - Complete Checklist for Manual Upgrades to Non-CDB Oracle Database 18c (Doc
ID 2418045.1)
Oracle 18c - Complete Checklist for Upgrading to Oracle Database 18c (18.x) using DBUA (Doc ID
2418576.1)
• ORAchk - Health Checks for the Oracle Stack – MOS 1268927.2
@ViscosityNA
Oracle Database 18cSimplified Version Number Timelines With RUs and RURs
• 3 digit format– Year.Update.Revision
• Year is the last 2 digits of year a release is delivered– e.g. 18 will be used for the release date ships in late 2017 or early 2018
• Update tracks Release Update (RU)
• Revision tracks the associated RU Revision levels (0,1,2)
@ViscosityNA
Oracle Database 18cSample Version Number Timelines With RUs and RURs
Production April July October January April July18.1.0 18.2.0 18.3.0 18.4.0 18.5.0 & 19.1.0 18.6.0 & 19.2.0 19.3.0
18.2.1 18.3.1 18.4.1 18.5.1? 19.2.1
18.2.2 18.3.2 18.4.2 18.5.2 ?
In 3 years, you may run either:• 18.12• 19.5 • 20.1 with additional RU or RUR.
18cOracle
Database
18.1.0Production
18.2.0First
Release Update
18.2.1First
Release UpdateRevision
@ViscosityNA
Oracle Database 19cSample Version Number Timelines With RUs and RURs
January April July October 201919.1.0 & 18.5.0 19.2.0 & 18.6.0 19.3.0 & 18.7.0 19.4.0 & 18.8.0
18.4.1 18.5.1 19.2.1 19.2.2
18.3.2 18.4.2 18.5.2
19cOracle
Database
Thanks for your undivided attention!
To receive the slides for this presentation, please contact Charles Kim at
Facebook.com/ViscosityNA
Linkedin.com/company/Viscosity-North-America
@ViscosityNA
Viscosity North America
Facebook.com/ViscosityNA
@Viscosity_NA
Follow Us Online!
308