Change Management for Oracle Database with SQLcl

Jeff Smith
Jeff SmithDistinguished Product Manager at Oracle Corp
Copyright © 2019 Oracle and/or its affiliates. All rights reserved. |
Jeff Smith
Master Product Manager
Jeff.d.smith@oracle.com || @thatjeffsmith
Database Tools, Oracle Corp
1
Application Schema Lifecycle Management
with Oracle SQLcl
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Not Just THAT SQLDev Guy…
• Database Development Tools team
• Product manager/story teller
• I bother help people online, everywhere
• Contact me for a free remote presentation for your group/company
– Jeff.d.smith@oracle.com
– @thatjeffsmith
– https://www.thatjeffsmith.com
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
thatJeffSmith on
• 60+ Videos
• Feature demos
• Tips & Tricks
• Short & Long Form
– SQL Developer
– SQLcl
– Data Modeler
– ORDS
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
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, and timing of any features or
functionality described for Oracle’s products remains at the sole discretion of Oracle.
5
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
v3..vNUpgrade v2Deploy v1
Back to v2 ??? Rollback!
Problem: App Schema Lifecyle Management …
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
1. Home grown solution
2. Hand-crafted scripts
3. Liquibase|Flyway
4. Something else?
Poll: How are you doing this today?
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
For Free
• less code
• familiar, friendly interface
• we’ll handle dependency ordering
• track changes for downgrades
Our Solution: Leverage Liquibase & make it easy
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Liquibase – “Source Control for your Database”
• open source
• deploy versions for your Oracle schema
• go forwards or backwards
• ‘changesets’
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Liquibase – changesets
• XML
• JSON
• YAML
• SQL
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Liquibase – controller/master => lots of changelogs
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Liquibase – DATABASECHANGELOG TABLE
“Liquibase uses the DATABASECHANGELOG table to track which changeSets have been ran.”
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
• Executable via command line,
• Apache Ant,
• Apache Maven,
• servlet container,
• Spring Framework.
Liquibase – How it runs
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Liquibase – Built into Developer Cloud Service
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Liquibase – Gives you a lot, for FREE, but…
• …you write the upgrade AND rollback code for each db changelog
• You worry about the order of changelogs to be applied
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
16
The SQL Developer Family
Time Tested
Launched in
2005
An Industry Standard
5M+ Oracle DBAs
& Developers
Always Improving
Quarterly
Releases
4
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
SQLcl – a Modern CLI for Oracle Database
• 25MB download, only requires a JRE
• SQL*Plus features, but much, much more
• Updated quarterly
• 11gR2 & Higher
• Avail in OCI YUM, OTN,
and DB $ORACLE_HOME
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Liquibase – “Source Control for your Database”
• An Open Source project – made easy with SQLcl, for free
• GEN schema/object as LB changelogs (XML via DBMS_METADATA)
• Objects automatically sorted for
creation/updates
• Easily rollback to previous state
• Preview proposed DDL for an UPDATE
• NEW for v19.2
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Help & Documentation Examples
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
How it works
• Liquibase (lb) command is built into SQLcl
• Use DBMS_METADATA to generate XML used in changelogs
• Collects for connected USER, writes to $SQL_PATH
• On deployment:
– we capture current status and write to table for a rollback
– use our parser to scrape the XML and determine creation order
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Let’s do a demo: capture and deploy
• Create a directory to hold our changelogs
• Login as the schema we want to capture
• >lb genschema
• Login as the schema we want to deploy to
• >lb update <file.xml> false
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Scenario: Adding a Column for v2
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Scenario: Adding a Column > Changelog
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Scenario: Adding a Column > Push It
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Scenario: Adding a Column > Rollback!
• No code written to handle
rollback!
• ‘5’ arbitrary large number – I
want everything undone
• DESC > INFO when you need
terse screenshots 
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Real Scenario: Capture, Destroy, Deploy ORDS + APEX
• Stood up APEX and ORDS 19.x
• LB GENSCHEMA for both
• DROP USER APEX_... CASCADE;
• LB UPDATE to bring them back!
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
You don’t have to use SQLcl, just stick this in your classpath
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Application Express (APEX) / RESTful Services?
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Availability
• LB command scheduled for SQLcl version 19.2
• Coming to you, SOON
• Follow @oraclesqlcl for
updates & product news
1 of 29

Recommended

Build a High Available NFS Cluster Based on CephFS - Shangzhong Zhu by
Build a High Available NFS Cluster Based on CephFS - Shangzhong ZhuBuild a High Available NFS Cluster Based on CephFS - Shangzhong Zhu
Build a High Available NFS Cluster Based on CephFS - Shangzhong ZhuCeph Community
257 views23 slides
Smart monitoring how does oracle rac manage resource, state ukoug19 by
Smart monitoring how does oracle rac manage resource, state ukoug19Smart monitoring how does oracle rac manage resource, state ukoug19
Smart monitoring how does oracle rac manage resource, state ukoug19Anil Nair
1.7K views55 slides
Dynamic Reconfiguration of Apache ZooKeeper by
Dynamic Reconfiguration of Apache ZooKeeperDynamic Reconfiguration of Apache ZooKeeper
Dynamic Reconfiguration of Apache ZooKeeperDataWorks Summit
14.4K views51 slides
Ceph Day London 2014 - Best Practices for Ceph-powered Implementations of Sto... by
Ceph Day London 2014 - Best Practices for Ceph-powered Implementations of Sto...Ceph Day London 2014 - Best Practices for Ceph-powered Implementations of Sto...
Ceph Day London 2014 - Best Practices for Ceph-powered Implementations of Sto...Ceph Community
3.2K views31 slides
IBM Power9 Features and Specifications by
IBM Power9 Features and SpecificationsIBM Power9 Features and Specifications
IBM Power9 Features and Specificationsinside-BigData.com
11.2K views28 slides
Oracle Fleet Patching and Provisioning Deep Dive Webcast Slides by
Oracle Fleet Patching and Provisioning Deep Dive Webcast SlidesOracle Fleet Patching and Provisioning Deep Dive Webcast Slides
Oracle Fleet Patching and Provisioning Deep Dive Webcast SlidesLudovico Caldara
462 views40 slides

More Related Content

What's hot

Oracle Extended Clusters for Oracle RAC by
Oracle Extended Clusters for Oracle RACOracle Extended Clusters for Oracle RAC
Oracle Extended Clusters for Oracle RACMarkus Michalewicz
12.6K views38 slides
Preparing for EBS R12.2-upgrade-full by
Preparing for EBS R12.2-upgrade-fullPreparing for EBS R12.2-upgrade-full
Preparing for EBS R12.2-upgrade-fullBerry Clemens
15.1K views63 slides
ORACLE 12C DATA GUARD: FAR SYNC, REAL-TIME CASCADE STANDBY AND OTHER GOODIES by
ORACLE 12C DATA GUARD: FAR SYNC, REAL-TIME CASCADE STANDBY AND OTHER GOODIESORACLE 12C DATA GUARD: FAR SYNC, REAL-TIME CASCADE STANDBY AND OTHER GOODIES
ORACLE 12C DATA GUARD: FAR SYNC, REAL-TIME CASCADE STANDBY AND OTHER GOODIESLudovico Caldara
9.8K views18 slides
AskTom: How to Make and Test Your Application "Oracle RAC Ready"? by
AskTom: How to Make and Test Your Application "Oracle RAC Ready"?AskTom: How to Make and Test Your Application "Oracle RAC Ready"?
AskTom: How to Make and Test Your Application "Oracle RAC Ready"?Markus Michalewicz
1.5K views20 slides
Oracle SQLcl by
Oracle SQLcl Oracle SQLcl
Oracle SQLcl Barry McGillin
1.6K views114 slides
Performance optimization for all flash based on aarch64 v2.0 by
Performance optimization for all flash based on aarch64 v2.0Performance optimization for all flash based on aarch64 v2.0
Performance optimization for all flash based on aarch64 v2.0Ceph Community
253 views16 slides

What's hot(20)

Oracle Extended Clusters for Oracle RAC by Markus Michalewicz
Oracle Extended Clusters for Oracle RACOracle Extended Clusters for Oracle RAC
Oracle Extended Clusters for Oracle RAC
Markus Michalewicz12.6K views
Preparing for EBS R12.2-upgrade-full by Berry Clemens
Preparing for EBS R12.2-upgrade-fullPreparing for EBS R12.2-upgrade-full
Preparing for EBS R12.2-upgrade-full
Berry Clemens15.1K views
ORACLE 12C DATA GUARD: FAR SYNC, REAL-TIME CASCADE STANDBY AND OTHER GOODIES by Ludovico Caldara
ORACLE 12C DATA GUARD: FAR SYNC, REAL-TIME CASCADE STANDBY AND OTHER GOODIESORACLE 12C DATA GUARD: FAR SYNC, REAL-TIME CASCADE STANDBY AND OTHER GOODIES
ORACLE 12C DATA GUARD: FAR SYNC, REAL-TIME CASCADE STANDBY AND OTHER GOODIES
Ludovico Caldara9.8K views
AskTom: How to Make and Test Your Application "Oracle RAC Ready"? by Markus Michalewicz
AskTom: How to Make and Test Your Application "Oracle RAC Ready"?AskTom: How to Make and Test Your Application "Oracle RAC Ready"?
AskTom: How to Make and Test Your Application "Oracle RAC Ready"?
Markus Michalewicz1.5K views
Performance optimization for all flash based on aarch64 v2.0 by Ceph Community
Performance optimization for all flash based on aarch64 v2.0Performance optimization for all flash based on aarch64 v2.0
Performance optimization for all flash based on aarch64 v2.0
Ceph Community 253 views
Oracle APEX, Oracle Autonomous Database, Always Free Oracle Cloud Services by Michael Hichwa
Oracle APEX, Oracle Autonomous Database, Always Free Oracle Cloud ServicesOracle APEX, Oracle Autonomous Database, Always Free Oracle Cloud Services
Oracle APEX, Oracle Autonomous Database, Always Free Oracle Cloud Services
Michael Hichwa3K views
Module 2: Managing Work Items in Rational Team Concert by IBM Rational software
Module 2: Managing Work Items in Rational Team ConcertModule 2: Managing Work Items in Rational Team Concert
Module 2: Managing Work Items in Rational Team Concert
What to Expect From Oracle database 19c by Maria Colgan
What to Expect From Oracle database 19cWhat to Expect From Oracle database 19c
What to Expect From Oracle database 19c
Maria Colgan11.9K views
Introduction into Ceph storage for OpenStack by OpenStack_Online
Introduction into Ceph storage for OpenStackIntroduction into Ceph storage for OpenStack
Introduction into Ceph storage for OpenStack
OpenStack_Online12.4K views
Oracle RAC - New Generation by Anil Nair
Oracle RAC - New GenerationOracle RAC - New Generation
Oracle RAC - New Generation
Anil Nair1.4K views
Autoscaling Flink with Reactive Mode by Flink Forward
Autoscaling Flink with Reactive ModeAutoscaling Flink with Reactive Mode
Autoscaling Flink with Reactive Mode
Flink Forward921 views
Access Denied: Real-World Use Cases for APEX and Real Application Security by Jim Czuprynski
Access Denied: Real-World Use Cases for APEX and Real Application SecurityAccess Denied: Real-World Use Cases for APEX and Real Application Security
Access Denied: Real-World Use Cases for APEX and Real Application Security
Jim Czuprynski215 views
Ebs 12.2 con9021_pdf_9021_0001 by jucaab
Ebs 12.2 con9021_pdf_9021_0001Ebs 12.2 con9021_pdf_9021_0001
Ebs 12.2 con9021_pdf_9021_0001
jucaab5.8K views
LOBS, BLOBS, CLOBS: Dealing with Attachments in APEX by Enkitec
LOBS, BLOBS, CLOBS: Dealing with Attachments in APEXLOBS, BLOBS, CLOBS: Dealing with Attachments in APEX
LOBS, BLOBS, CLOBS: Dealing with Attachments in APEX
Enkitec6.8K views
Ceph Block Devices: A Deep Dive by Red_Hat_Storage
Ceph Block Devices:  A Deep DiveCeph Block Devices:  A Deep Dive
Ceph Block Devices: A Deep Dive
Red_Hat_Storage7.3K views
The State of HBase Replication by HBaseCon
The State of HBase ReplicationThe State of HBase Replication
The State of HBase Replication
HBaseCon9.1K views
Calling SOAP and REST API's from PL/SQL by venkata20k
Calling SOAP and REST API's from PL/SQLCalling SOAP and REST API's from PL/SQL
Calling SOAP and REST API's from PL/SQL
venkata20k3.4K views

Similar to Change Management for Oracle Database with SQLcl

MySQL Cluster as Transactional NoSQL (KVS) by
MySQL Cluster as Transactional NoSQL (KVS)MySQL Cluster as Transactional NoSQL (KVS)
MySQL Cluster as Transactional NoSQL (KVS)Ryusuke Kajiyama
1.1K views51 slides
Mastering DevOps With Oracle by
Mastering DevOps With OracleMastering DevOps With Oracle
Mastering DevOps With OracleKelly Goetsch
35K views96 slides
What's New in Oracle SQL Developer for 2018 by
What's New in Oracle SQL Developer for 2018What's New in Oracle SQL Developer for 2018
What's New in Oracle SQL Developer for 2018Jeff Smith
504 views43 slides
MySQL Server Defaults by
MySQL Server DefaultsMySQL Server Defaults
MySQL Server DefaultsMorgan Tocker
2.3K views27 slides
Suffering from Chronic Patching Pain? Get Relief with Fleet Maintenance [CON6... by
Suffering from Chronic Patching Pain? Get Relief with Fleet Maintenance [CON6...Suffering from Chronic Patching Pain? Get Relief with Fleet Maintenance [CON6...
Suffering from Chronic Patching Pain? Get Relief with Fleet Maintenance [CON6...Timothy Schubert
679 views55 slides
MySQL 5.6, news in 5.7 and our HA options by
MySQL 5.6, news in 5.7 and our HA optionsMySQL 5.6, news in 5.7 and our HA options
MySQL 5.6, news in 5.7 and our HA optionsTed Wennmark
1K views62 slides

Similar to Change Management for Oracle Database with SQLcl (20)

MySQL Cluster as Transactional NoSQL (KVS) by Ryusuke Kajiyama
MySQL Cluster as Transactional NoSQL (KVS)MySQL Cluster as Transactional NoSQL (KVS)
MySQL Cluster as Transactional NoSQL (KVS)
Ryusuke Kajiyama1.1K views
Mastering DevOps With Oracle by Kelly Goetsch
Mastering DevOps With OracleMastering DevOps With Oracle
Mastering DevOps With Oracle
Kelly Goetsch35K views
What's New in Oracle SQL Developer for 2018 by Jeff Smith
What's New in Oracle SQL Developer for 2018What's New in Oracle SQL Developer for 2018
What's New in Oracle SQL Developer for 2018
Jeff Smith504 views
MySQL Server Defaults by Morgan Tocker
MySQL Server DefaultsMySQL Server Defaults
MySQL Server Defaults
Morgan Tocker2.3K views
Suffering from Chronic Patching Pain? Get Relief with Fleet Maintenance [CON6... by Timothy Schubert
Suffering from Chronic Patching Pain? Get Relief with Fleet Maintenance [CON6...Suffering from Chronic Patching Pain? Get Relief with Fleet Maintenance [CON6...
Suffering from Chronic Patching Pain? Get Relief with Fleet Maintenance [CON6...
Timothy Schubert679 views
MySQL 5.6, news in 5.7 and our HA options by Ted Wennmark
MySQL 5.6, news in 5.7 and our HA optionsMySQL 5.6, news in 5.7 and our HA options
MySQL 5.6, news in 5.7 and our HA options
Ted Wennmark1K views
NoSQL and SQL - Why Choose? Enjoy the best of both worlds with MySQL by Andrew Morgan
NoSQL and SQL - Why Choose? Enjoy the best of both worlds with MySQLNoSQL and SQL - Why Choose? Enjoy the best of both worlds with MySQL
NoSQL and SQL - Why Choose? Enjoy the best of both worlds with MySQL
Andrew Morgan3.4K views
Introduction to MySQL by Ted Wennmark
Introduction to MySQLIntroduction to MySQL
Introduction to MySQL
Ted Wennmark917 views
A Step by Step Introduction to the MySQL Document Store by Dave Stokes
A Step by Step Introduction to the MySQL Document StoreA Step by Step Introduction to the MySQL Document Store
A Step by Step Introduction to the MySQL Document Store
Dave Stokes82 views
Using MySQL Enterprise Monitor for Continuous Performance Improvement by Mark Matthews
Using MySQL Enterprise Monitor for Continuous Performance ImprovementUsing MySQL Enterprise Monitor for Continuous Performance Improvement
Using MySQL Enterprise Monitor for Continuous Performance Improvement
Mark Matthews731 views
OUGLS 2016: Guided Tour On The MySQL Source Code by Georgi Kodinov
OUGLS 2016: Guided Tour On The MySQL Source CodeOUGLS 2016: Guided Tour On The MySQL Source Code
OUGLS 2016: Guided Tour On The MySQL Source Code
Georgi Kodinov318 views
MySQL Day Paris 2016 - State Of The Dolphin by Olivier DASINI
MySQL Day Paris 2016 - State Of The DolphinMySQL Day Paris 2016 - State Of The Dolphin
MySQL Day Paris 2016 - State Of The Dolphin
Olivier DASINI1.9K views
NoSQL no MySQL 5.7 by MySQL Brasil
NoSQL no MySQL 5.7NoSQL no MySQL 5.7
NoSQL no MySQL 5.7
MySQL Brasil1.2K views
REST Enabling Your Oracle Database by Jeff Smith
REST Enabling Your Oracle DatabaseREST Enabling Your Oracle Database
REST Enabling Your Oracle Database
Jeff Smith45.3K views
Oracle SQL Developer for the DBA by Jeff Smith
Oracle SQL Developer for the DBAOracle SQL Developer for the DBA
Oracle SQL Developer for the DBA
Jeff Smith12.8K views
MySQL 5.7 -- SCaLE Feb 2014 by Dave Stokes
MySQL 5.7 -- SCaLE Feb 2014MySQL 5.7 -- SCaLE Feb 2014
MySQL 5.7 -- SCaLE Feb 2014
Dave Stokes932 views
MySQL in OPC(Oracle Public Cloud) by Ramana Yeruva
MySQL in OPC(Oracle Public Cloud)MySQL in OPC(Oracle Public Cloud)
MySQL in OPC(Oracle Public Cloud)
Ramana Yeruva311 views
Oracle Enterprise Manager for MySQL by Mario Beck
Oracle Enterprise Manager for MySQLOracle Enterprise Manager for MySQL
Oracle Enterprise Manager for MySQL
Mario Beck757 views
Alta Disponibilidade no MySQL 5.7 by MySQL Brasil
Alta Disponibilidade no MySQL 5.7Alta Disponibilidade no MySQL 5.7
Alta Disponibilidade no MySQL 5.7
MySQL Brasil1.1K views

More from Jeff Smith

Oracle REST Data Services: POUG Edition by
Oracle REST Data Services: POUG EditionOracle REST Data Services: POUG Edition
Oracle REST Data Services: POUG EditionJeff Smith
547 views66 slides
Oracle SQL Developer Tips and Tricks: Data Edition by
Oracle SQL Developer Tips and Tricks: Data EditionOracle SQL Developer Tips and Tricks: Data Edition
Oracle SQL Developer Tips and Tricks: Data EditionJeff Smith
4.3K views42 slides
RESTful Services for your Oracle Autonomous Database by
RESTful Services for your Oracle Autonomous DatabaseRESTful Services for your Oracle Autonomous Database
RESTful Services for your Oracle Autonomous DatabaseJeff Smith
5.7K views28 slides
Oracle SQLcl: Formatting your Query Results by
Oracle SQLcl: Formatting your Query ResultsOracle SQLcl: Formatting your Query Results
Oracle SQLcl: Formatting your Query ResultsJeff Smith
5.1K views18 slides
Debugging PL/SQL from your APEX Applications with Oracle SQL Developer by
Debugging PL/SQL from your APEX Applications with Oracle SQL DeveloperDebugging PL/SQL from your APEX Applications with Oracle SQL Developer
Debugging PL/SQL from your APEX Applications with Oracle SQL DeveloperJeff Smith
5.6K views28 slides
Oracle Database Management REST API by
Oracle Database Management REST APIOracle Database Management REST API
Oracle Database Management REST APIJeff Smith
4.7K views18 slides

More from Jeff Smith(20)

Oracle REST Data Services: POUG Edition by Jeff Smith
Oracle REST Data Services: POUG EditionOracle REST Data Services: POUG Edition
Oracle REST Data Services: POUG Edition
Jeff Smith547 views
Oracle SQL Developer Tips and Tricks: Data Edition by Jeff Smith
Oracle SQL Developer Tips and Tricks: Data EditionOracle SQL Developer Tips and Tricks: Data Edition
Oracle SQL Developer Tips and Tricks: Data Edition
Jeff Smith4.3K views
RESTful Services for your Oracle Autonomous Database by Jeff Smith
RESTful Services for your Oracle Autonomous DatabaseRESTful Services for your Oracle Autonomous Database
RESTful Services for your Oracle Autonomous Database
Jeff Smith5.7K views
Oracle SQLcl: Formatting your Query Results by Jeff Smith
Oracle SQLcl: Formatting your Query ResultsOracle SQLcl: Formatting your Query Results
Oracle SQLcl: Formatting your Query Results
Jeff Smith5.1K views
Debugging PL/SQL from your APEX Applications with Oracle SQL Developer by Jeff Smith
Debugging PL/SQL from your APEX Applications with Oracle SQL DeveloperDebugging PL/SQL from your APEX Applications with Oracle SQL Developer
Debugging PL/SQL from your APEX Applications with Oracle SQL Developer
Jeff Smith5.6K views
Oracle Database Management REST API by Jeff Smith
Oracle Database Management REST APIOracle Database Management REST API
Oracle Database Management REST API
Jeff Smith4.7K views
Oracle REST Data Services: Options for your Web Services by Jeff Smith
Oracle REST Data Services: Options for your Web ServicesOracle REST Data Services: Options for your Web Services
Oracle REST Data Services: Options for your Web Services
Jeff Smith15.8K views
Oracle SQL Developer Data Modeler - for SQL Server by Jeff Smith
Oracle SQL Developer Data Modeler - for SQL ServerOracle SQL Developer Data Modeler - for SQL Server
Oracle SQL Developer Data Modeler - for SQL Server
Jeff Smith2.8K views
Oracle SQL Developer: You're Doing it Wrong! by Jeff Smith
Oracle SQL Developer: You're Doing it Wrong!Oracle SQL Developer: You're Doing it Wrong!
Oracle SQL Developer: You're Doing it Wrong!
Jeff Smith1.7K views
REST Enabling your Oracle Database (2018 Update) by Jeff Smith
REST Enabling your Oracle Database (2018 Update)REST Enabling your Oracle Database (2018 Update)
REST Enabling your Oracle Database (2018 Update)
Jeff Smith3.5K views
Social Media - Why a Database Person Should Care by Jeff Smith
Social Media  - Why a Database Person Should CareSocial Media  - Why a Database Person Should Care
Social Media - Why a Database Person Should Care
Jeff Smith1K views
Oracle SQL Developer Reports by Jeff Smith
Oracle SQL Developer ReportsOracle SQL Developer Reports
Oracle SQL Developer Reports
Jeff Smith2.9K views
Oracle SQL Developer: 3 Features You're Not Using But Should Be by Jeff Smith
Oracle SQL Developer: 3 Features You're Not Using But Should BeOracle SQL Developer: 3 Features You're Not Using But Should Be
Oracle SQL Developer: 3 Features You're Not Using But Should Be
Jeff Smith3.1K views
Pennsylvania Banner User Group Webinar: Oracle SQL Developer Tips & Tricks by Jeff Smith
Pennsylvania Banner User Group Webinar: Oracle SQL Developer Tips & TricksPennsylvania Banner User Group Webinar: Oracle SQL Developer Tips & Tricks
Pennsylvania Banner User Group Webinar: Oracle SQL Developer Tips & Tricks
Jeff Smith1K views
Debugging PL/SQL with Oracle SQL Developer by Jeff Smith
Debugging PL/SQL with Oracle SQL DeveloperDebugging PL/SQL with Oracle SQL Developer
Debugging PL/SQL with Oracle SQL Developer
Jeff Smith20.1K views
All of the Performance Tuning Features in Oracle SQL Developer by Jeff Smith
All of the Performance Tuning Features in Oracle SQL DeveloperAll of the Performance Tuning Features in Oracle SQL Developer
All of the Performance Tuning Features in Oracle SQL Developer
Jeff Smith17.9K views
If You Oracle Then You Should Twitter Too by Jeff Smith
If You Oracle Then You Should Twitter TooIf You Oracle Then You Should Twitter Too
If You Oracle Then You Should Twitter Too
Jeff Smith3.2K views
SQLcl overview - A new Command Line Interface for Oracle Database by Jeff Smith
SQLcl overview - A new Command Line Interface for Oracle DatabaseSQLcl overview - A new Command Line Interface for Oracle Database
SQLcl overview - A new Command Line Interface for Oracle Database
Jeff Smith47.3K views
Oracle SQL Developer for SQL Server? by Jeff Smith
Oracle SQL Developer for SQL Server?Oracle SQL Developer for SQL Server?
Oracle SQL Developer for SQL Server?
Jeff Smith2.6K views
My Favorite Oracle SQL Developer Data Modeler Features by Jeff Smith
My Favorite Oracle SQL Developer Data Modeler FeaturesMy Favorite Oracle SQL Developer Data Modeler Features
My Favorite Oracle SQL Developer Data Modeler Features
Jeff Smith1.4K views

Recently uploaded

Special_edition_innovator_2023.pdf by
Special_edition_innovator_2023.pdfSpecial_edition_innovator_2023.pdf
Special_edition_innovator_2023.pdfWillDavies22
17 views6 slides
Unit 1_Lecture 2_Physical Design of IoT.pdf by
Unit 1_Lecture 2_Physical Design of IoT.pdfUnit 1_Lecture 2_Physical Design of IoT.pdf
Unit 1_Lecture 2_Physical Design of IoT.pdfStephenTec
12 views36 slides
TouchLog: Finger Micro Gesture Recognition Using Photo-Reflective Sensors by
TouchLog: Finger Micro Gesture Recognition  Using Photo-Reflective SensorsTouchLog: Finger Micro Gesture Recognition  Using Photo-Reflective Sensors
TouchLog: Finger Micro Gesture Recognition Using Photo-Reflective Sensorssugiuralab
19 views15 slides
Future of Indian ConsumerTech by
Future of Indian ConsumerTechFuture of Indian ConsumerTech
Future of Indian ConsumerTechKapil Khandelwal (KK)
21 views68 slides
Vertical User Stories by
Vertical User StoriesVertical User Stories
Vertical User StoriesMoisés Armani Ramírez
14 views16 slides
The details of description: Techniques, tips, and tangents on alternative tex... by
The details of description: Techniques, tips, and tangents on alternative tex...The details of description: Techniques, tips, and tangents on alternative tex...
The details of description: Techniques, tips, and tangents on alternative tex...BookNet Canada
127 views24 slides

Recently uploaded(20)

Special_edition_innovator_2023.pdf by WillDavies22
Special_edition_innovator_2023.pdfSpecial_edition_innovator_2023.pdf
Special_edition_innovator_2023.pdf
WillDavies2217 views
Unit 1_Lecture 2_Physical Design of IoT.pdf by StephenTec
Unit 1_Lecture 2_Physical Design of IoT.pdfUnit 1_Lecture 2_Physical Design of IoT.pdf
Unit 1_Lecture 2_Physical Design of IoT.pdf
StephenTec12 views
TouchLog: Finger Micro Gesture Recognition Using Photo-Reflective Sensors by sugiuralab
TouchLog: Finger Micro Gesture Recognition  Using Photo-Reflective SensorsTouchLog: Finger Micro Gesture Recognition  Using Photo-Reflective Sensors
TouchLog: Finger Micro Gesture Recognition Using Photo-Reflective Sensors
sugiuralab19 views
The details of description: Techniques, tips, and tangents on alternative tex... by BookNet Canada
The details of description: Techniques, tips, and tangents on alternative tex...The details of description: Techniques, tips, and tangents on alternative tex...
The details of description: Techniques, tips, and tangents on alternative tex...
BookNet Canada127 views
PharoJS - Zürich Smalltalk Group Meetup November 2023 by Noury Bouraqadi
PharoJS - Zürich Smalltalk Group Meetup November 2023PharoJS - Zürich Smalltalk Group Meetup November 2023
PharoJS - Zürich Smalltalk Group Meetup November 2023
Noury Bouraqadi127 views
Transcript: The Details of Description Techniques tips and tangents on altern... by BookNet Canada
Transcript: The Details of Description Techniques tips and tangents on altern...Transcript: The Details of Description Techniques tips and tangents on altern...
Transcript: The Details of Description Techniques tips and tangents on altern...
BookNet Canada136 views
Automating a World-Class Technology Conference; Behind the Scenes of CiscoLive by Network Automation Forum
Automating a World-Class Technology Conference; Behind the Scenes of CiscoLiveAutomating a World-Class Technology Conference; Behind the Scenes of CiscoLive
Automating a World-Class Technology Conference; Behind the Scenes of CiscoLive
Serverless computing with Google Cloud (2023-24) by wesley chun
Serverless computing with Google Cloud (2023-24)Serverless computing with Google Cloud (2023-24)
Serverless computing with Google Cloud (2023-24)
wesley chun11 views
STPI OctaNE CoE Brochure.pdf by madhurjyapb
STPI OctaNE CoE Brochure.pdfSTPI OctaNE CoE Brochure.pdf
STPI OctaNE CoE Brochure.pdf
madhurjyapb14 views
Igniting Next Level Productivity with AI-Infused Data Integration Workflows by Safe Software
Igniting Next Level Productivity with AI-Infused Data Integration Workflows Igniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration Workflows
Safe Software263 views
Business Analyst Series 2023 - Week 3 Session 5 by DianaGray10
Business Analyst Series 2023 -  Week 3 Session 5Business Analyst Series 2023 -  Week 3 Session 5
Business Analyst Series 2023 - Week 3 Session 5
DianaGray10248 views

Change Management for Oracle Database with SQLcl

  • 1. Copyright © 2019 Oracle and/or its affiliates. All rights reserved. | Jeff Smith Master Product Manager Jeff.d.smith@oracle.com || @thatjeffsmith Database Tools, Oracle Corp 1 Application Schema Lifecycle Management with Oracle SQLcl
  • 2. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Not Just THAT SQLDev Guy… • Database Development Tools team • Product manager/story teller • I bother help people online, everywhere • Contact me for a free remote presentation for your group/company – Jeff.d.smith@oracle.com – @thatjeffsmith – https://www.thatjeffsmith.com
  • 3. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | thatJeffSmith on • 60+ Videos • Feature demos • Tips & Tricks • Short & Long Form – SQL Developer – SQLcl – Data Modeler – ORDS
  • 4. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
  • 5. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | 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, and timing of any features or functionality described for Oracle’s products remains at the sole discretion of Oracle. 5
  • 6. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | v3..vNUpgrade v2Deploy v1 Back to v2 ??? Rollback! Problem: App Schema Lifecyle Management …
  • 7. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 1. Home grown solution 2. Hand-crafted scripts 3. Liquibase|Flyway 4. Something else? Poll: How are you doing this today?
  • 8. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | For Free • less code • familiar, friendly interface • we’ll handle dependency ordering • track changes for downgrades Our Solution: Leverage Liquibase & make it easy
  • 9. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Liquibase – “Source Control for your Database” • open source • deploy versions for your Oracle schema • go forwards or backwards • ‘changesets’
  • 10. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Liquibase – changesets • XML • JSON • YAML • SQL
  • 11. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Liquibase – controller/master => lots of changelogs
  • 12. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Liquibase – DATABASECHANGELOG TABLE “Liquibase uses the DATABASECHANGELOG table to track which changeSets have been ran.”
  • 13. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | • Executable via command line, • Apache Ant, • Apache Maven, • servlet container, • Spring Framework. Liquibase – How it runs
  • 14. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Liquibase – Built into Developer Cloud Service
  • 15. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Liquibase – Gives you a lot, for FREE, but… • …you write the upgrade AND rollback code for each db changelog • You worry about the order of changelogs to be applied
  • 16. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 16 The SQL Developer Family Time Tested Launched in 2005 An Industry Standard 5M+ Oracle DBAs & Developers Always Improving Quarterly Releases 4
  • 17. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | SQLcl – a Modern CLI for Oracle Database • 25MB download, only requires a JRE • SQL*Plus features, but much, much more • Updated quarterly • 11gR2 & Higher • Avail in OCI YUM, OTN, and DB $ORACLE_HOME
  • 18. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Liquibase – “Source Control for your Database” • An Open Source project – made easy with SQLcl, for free • GEN schema/object as LB changelogs (XML via DBMS_METADATA) • Objects automatically sorted for creation/updates • Easily rollback to previous state • Preview proposed DDL for an UPDATE • NEW for v19.2
  • 19. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Help & Documentation Examples
  • 20. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | How it works • Liquibase (lb) command is built into SQLcl • Use DBMS_METADATA to generate XML used in changelogs • Collects for connected USER, writes to $SQL_PATH • On deployment: – we capture current status and write to table for a rollback – use our parser to scrape the XML and determine creation order
  • 21. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Let’s do a demo: capture and deploy • Create a directory to hold our changelogs • Login as the schema we want to capture • >lb genschema • Login as the schema we want to deploy to • >lb update <file.xml> false
  • 22. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Scenario: Adding a Column for v2
  • 23. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Scenario: Adding a Column > Changelog
  • 24. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Scenario: Adding a Column > Push It
  • 25. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Scenario: Adding a Column > Rollback! • No code written to handle rollback! • ‘5’ arbitrary large number – I want everything undone • DESC > INFO when you need terse screenshots 
  • 26. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Real Scenario: Capture, Destroy, Deploy ORDS + APEX • Stood up APEX and ORDS 19.x • LB GENSCHEMA for both • DROP USER APEX_... CASCADE; • LB UPDATE to bring them back!
  • 27. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | You don’t have to use SQLcl, just stick this in your classpath
  • 28. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Application Express (APEX) / RESTful Services?
  • 29. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Availability • LB command scheduled for SQLcl version 19.2 • Coming to you, SOON • Follow @oraclesqlcl for updates & product news

Editor's Notes

  1. This is a Safe Harbor Front slide, one of two Safe Harbor Statement slides included in this template. One of the Safe Harbor slides must be used if your presentation covers material affected by Oracle’s Revenue Recognition Policy To learn more about this policy, e-mail: Revrec-americasiebc_us@oracle.com For internal communication, Safe Harbor Statements are not required. However, there is an applicable disclaimer (Exhibit E) that should be used, found in the Oracle Revenue Recognition Policy for Future Product Communications. Copy and paste this link into a web browser, to find out more information.   http://my.oracle.com/site/fin/gfo/GlobalProcesses/RevRec/Policies/cnt2321729.pdf For all external communications such as press release, roadmaps, PowerPoint presentations, Safe Harbor Statements are required. You can refer to the link mentioned above to find out additional information/disclaimers required depending on your audience.