SlideShare a Scribd company logo
1 of 28
Download to read offline
Copyright © 2019 Oracle and/or its affiliates. All rights reserved. |
Debugging PL/SQL with SQL Developer
Jeff Smith
Senior Principal Product Manager
Jeff.d.smith@oracle.com || @thatjeffsmith
Database Tools, Oracle Corp
1
Copyright © 2018, 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 © 2016, 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 © 2017, Oracle and/or its affiliates. All rights reserved.
5
SQL Developer Snapshot
Time Tested
Launched in
2005
An Industry Standard
5M+ Oracle DBAs
& Developers
Always Improving
Quarterly
Releases
4
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Project Raptor
 Early Adopter on OTN
2005
1.1
 File Based PL/SQL editing
 Reports
 Ships with 11gR1
1.5.x
 Localizations -
Japanese, Spanish,
Italian, German, French,
Portuguese, Chinese, &
Koreans
 Ships with 11gR2
SQLDev v1.0
 SQL Worksheet
 Procedure Editor
 The world takes notice!
1.5
 Schema Copy/Diff/Export
 Thick connections
 Versioning
 TimesTen
2.1
 Unit Testing
 Data Modeler Viewer
 Unshared SQL Worksheets
2007 201020092006
3.0
 Full Data Modeler
 View > DBA
 SQL Tuning Advisor
 Query Builder
2008 2011 2012
3.1
 New Database DIFF
 PDF Reports
 RMAN
 Data Pump
2013
3.2
 APEX Listener / ORDS
Support
 Database 12c Support
 Schema Service Support
4.0
 Java 7
 ASH/AWR/ADDM
 Color Coded Connections
 Command line Interface
4.0.3
 Optimized Code Insight
 Oracle Big Data Appliance
2014 2015 2016
4.1
 ORDS Included/Full GUI
 instance Viewer
 SQLcl
 Copy PDB to DBaaS
 Larry live demos PDB relocate @ OOW
4.2
 Real Time SQL Monitoring
 Top SQL Report
 Formatter & Other Editor Enhancements
 Easier RESTful Services Development
2017
SQLcl
 New CLI
 Modern SQL*Plus
Release History
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
2017
2017.2
 Bug Fixes
 Sharding
 Data Guard
17.3 & 17.4
 Bug Fixes
Quarterly Releases!!!
2018
Release History
18.1
 Autonomous Data Warehouse Support
 New Welcome Screen/Connections
 SQL Injection Detection
 PL/Scope SQL Statement Support
 Better Formatting
18.2 & 3
 PL/SQL Injection
Detection
 Cloud data Loads
 SQL Developer
Web
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
What does ‘debug’ mean?
 Run and watch?
 dbms/owa OUTPUT?
 Stare at your code until you decide to get coffee?
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
 after
 code++
 observe
 clean up
DBMS/OWA_OUTPUT is not ‘bad’
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
 Coming?
 Going?
 Pause/Poke
 Play with what-if scenarios
Interactive, step-by-step experience with your code
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
The PL/SQL Debugger
 SYS.DBMS_DEBUG_JDWP
 Native SQL Developer tooling
 $0.00
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
A Tale of Two Debugging Methods
 LOCAL
Code/Session originates from SQL Developer
 REMOTE aka EXTERNAL aka Just in Time
Session kicks off and runs from your program, which then connects back
down to SQL Developer for you to debug
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
 Required PRIVS: DEBUG CONNECT SESSION &
EXECUTE for PL/SQL
 12c+ : Access Control Lists (Fine Grained Access)
 Open Code/Object in a code editor
 Compile for DEBUG
 Click the big ‘Bug’ button
Local Debugging
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
What happens next
 the DATABASE will CONNECT to your Machine
 not CLIENT => SERVER but SERVER => CLIENT
 ACL in 12c+ allows the DB to reach out on the network
 if this is a bridge too far…
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
DBMS_DEBUG (PROBE API)
DatabaseDebuggerDisableJDWP=true
CLIENT => SERVER
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
 Not officially supported
 Not as feature rich
 External debugging won’t work
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
 Set a Breakpoint! OR
 Configure Preferences
 Start Debugging: Step Over
Some Tips
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Breakpoints
‘stops’ execution on a
specific line
OR
If a condition is met
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Step Over vs Step Into
 Step Over – Executes line 51, goes to line 54
 Step Into – Opens program at line 51 for debugging
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Where do we go?
Where do we go now?
Where do we go?
Oh, oh
Where do we go?
(Where do we go now?)
Mind the Call Stack
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Remote/External Debugging – cue APEX!
 APEX runs, calls PL/SQL
 hits breakpoint
 SQLDev takes over
 do debugging
 control back to APEX
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Listen for Debug Requests
SQL Developer Client Machine IP
Make sure SQL Dev is listening when APEX rings the door bell
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Setup Debugger in your Application
execute DBMS_DEBUG_JDWP.CONNECT_TCP(‘sqldev-IP’, port);
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Remember to set a breakpoint!
Executable lines of code
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Run your APEX App
 Session trips breakpoint
APEX will ‘hang’
 SQL Developer will
‘blink’ to life
 Start debugging!
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Debug!

More Related Content

What's hot

Oracle Drivers configuration for High Availability, is it a developer's job?
Oracle Drivers configuration for High Availability, is it a developer's job?Oracle Drivers configuration for High Availability, is it a developer's job?
Oracle Drivers configuration for High Availability, is it a developer's job?Ludovico Caldara
 
Oracle APEX Introduction (release 18.1)
Oracle APEX Introduction (release 18.1)Oracle APEX Introduction (release 18.1)
Oracle APEX Introduction (release 18.1)Michael Hichwa
 
Oracle Real Application Clusters 19c- Best Practices and Internals- EMEA Tour...
Oracle Real Application Clusters 19c- Best Practices and Internals- EMEA Tour...Oracle Real Application Clusters 19c- Best Practices and Internals- EMEA Tour...
Oracle Real Application Clusters 19c- Best Practices and Internals- EMEA Tour...Sandesh Rao
 
PostgreSQL and JDBC: striving for high performance
PostgreSQL and JDBC: striving for high performancePostgreSQL and JDBC: striving for high performance
PostgreSQL and JDBC: striving for high performanceVladimir Sitnikov
 
REST Enabling Your Oracle Database
REST Enabling Your Oracle DatabaseREST Enabling Your Oracle Database
REST Enabling Your Oracle DatabaseJeff Smith
 
REST Enabling your Oracle Database (2018 Update)
REST Enabling your Oracle Database (2018 Update)REST Enabling your Oracle Database (2018 Update)
REST Enabling your Oracle Database (2018 Update)Jeff Smith
 
Oracle Forms to APEX conversion tool
Oracle Forms to APEX conversion toolOracle Forms to APEX conversion tool
Oracle Forms to APEX conversion toolScott Wesley
 
Intro to JavaScript for APEX Developers
Intro to JavaScript for APEX DevelopersIntro to JavaScript for APEX Developers
Intro to JavaScript for APEX DevelopersDaniel McGhan
 
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"?
AskTom: How to Make and Test Your Application "Oracle RAC Ready"?Markus Michalewicz
 
Oracle Real Application Clusters (RAC) 12c Rel. 2 - Operational Best Practices
Oracle Real Application Clusters (RAC) 12c Rel. 2 - Operational Best PracticesOracle Real Application Clusters (RAC) 12c Rel. 2 - Operational Best Practices
Oracle Real Application Clusters (RAC) 12c Rel. 2 - Operational Best PracticesMarkus Michalewicz
 
JSON and PL/SQL: A Match Made in Database
JSON and PL/SQL: A Match Made in DatabaseJSON and PL/SQL: A Match Made in Database
JSON and PL/SQL: A Match Made in DatabaseSteven Feuerstein
 
Understanding Oracle RAC 12c Internals OOW13 [CON8806]
Understanding Oracle RAC 12c Internals OOW13 [CON8806]Understanding Oracle RAC 12c Internals OOW13 [CON8806]
Understanding Oracle RAC 12c Internals OOW13 [CON8806]Markus Michalewicz
 
Exploring the details of APEX sessions
Exploring the details of APEX sessionsExploring the details of APEX sessions
Exploring the details of APEX sessionsMenno Hoogendijk
 
How to remove disable an oa framework personalization (doc id 304670
How to remove  disable an oa framework personalization (doc id 304670How to remove  disable an oa framework personalization (doc id 304670
How to remove disable an oa framework personalization (doc id 304670Ahmad Mkade
 
Oracle e-business suite R12 step by step Installation
Oracle e-business suite R12 step by step InstallationOracle e-business suite R12 step by step Installation
Oracle e-business suite R12 step by step InstallationOraERP
 
Odi 12c-getting-started-guide-2032250
Odi 12c-getting-started-guide-2032250Odi 12c-getting-started-guide-2032250
Odi 12c-getting-started-guide-2032250Udaykumar Sarana
 
How to make APEX print through Node.js
How to make APEX print through Node.jsHow to make APEX print through Node.js
How to make APEX print through Node.jsDimitri Gielis
 
24 define security for hcm
24 define security for hcm24 define security for hcm
24 define security for hcmmohamed refaei
 

What's hot (20)

Oracle Drivers configuration for High Availability, is it a developer's job?
Oracle Drivers configuration for High Availability, is it a developer's job?Oracle Drivers configuration for High Availability, is it a developer's job?
Oracle Drivers configuration for High Availability, is it a developer's job?
 
Oracle APEX Introduction (release 18.1)
Oracle APEX Introduction (release 18.1)Oracle APEX Introduction (release 18.1)
Oracle APEX Introduction (release 18.1)
 
Oracle Real Application Clusters 19c- Best Practices and Internals- EMEA Tour...
Oracle Real Application Clusters 19c- Best Practices and Internals- EMEA Tour...Oracle Real Application Clusters 19c- Best Practices and Internals- EMEA Tour...
Oracle Real Application Clusters 19c- Best Practices and Internals- EMEA Tour...
 
PostgreSQL and JDBC: striving for high performance
PostgreSQL and JDBC: striving for high performancePostgreSQL and JDBC: striving for high performance
PostgreSQL and JDBC: striving for high performance
 
REST Enabling Your Oracle Database
REST Enabling Your Oracle DatabaseREST Enabling Your Oracle Database
REST Enabling Your Oracle Database
 
REST Enabling your Oracle Database (2018 Update)
REST Enabling your Oracle Database (2018 Update)REST Enabling your Oracle Database (2018 Update)
REST Enabling your Oracle Database (2018 Update)
 
Oracle Forms to APEX conversion tool
Oracle Forms to APEX conversion toolOracle Forms to APEX conversion tool
Oracle Forms to APEX conversion tool
 
APEX Themes and Templates
APEX Themes and TemplatesAPEX Themes and Templates
APEX Themes and Templates
 
Intro to JavaScript for APEX Developers
Intro to JavaScript for APEX DevelopersIntro to JavaScript for APEX Developers
Intro to JavaScript for APEX Developers
 
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"?
AskTom: How to Make and Test Your Application "Oracle RAC Ready"?
 
Oracle Real Application Clusters (RAC) 12c Rel. 2 - Operational Best Practices
Oracle Real Application Clusters (RAC) 12c Rel. 2 - Operational Best PracticesOracle Real Application Clusters (RAC) 12c Rel. 2 - Operational Best Practices
Oracle Real Application Clusters (RAC) 12c Rel. 2 - Operational Best Practices
 
JSON and PL/SQL: A Match Made in Database
JSON and PL/SQL: A Match Made in DatabaseJSON and PL/SQL: A Match Made in Database
JSON and PL/SQL: A Match Made in Database
 
Understanding Oracle RAC 12c Internals OOW13 [CON8806]
Understanding Oracle RAC 12c Internals OOW13 [CON8806]Understanding Oracle RAC 12c Internals OOW13 [CON8806]
Understanding Oracle RAC 12c Internals OOW13 [CON8806]
 
Exploring the details of APEX sessions
Exploring the details of APEX sessionsExploring the details of APEX sessions
Exploring the details of APEX sessions
 
How to remove disable an oa framework personalization (doc id 304670
How to remove  disable an oa framework personalization (doc id 304670How to remove  disable an oa framework personalization (doc id 304670
How to remove disable an oa framework personalization (doc id 304670
 
Oracle e-business suite R12 step by step Installation
Oracle e-business suite R12 step by step InstallationOracle e-business suite R12 step by step Installation
Oracle e-business suite R12 step by step Installation
 
RESTful API - Best Practices
RESTful API - Best PracticesRESTful API - Best Practices
RESTful API - Best Practices
 
Odi 12c-getting-started-guide-2032250
Odi 12c-getting-started-guide-2032250Odi 12c-getting-started-guide-2032250
Odi 12c-getting-started-guide-2032250
 
How to make APEX print through Node.js
How to make APEX print through Node.jsHow to make APEX print through Node.js
How to make APEX print through Node.js
 
24 define security for hcm
24 define security for hcm24 define security for hcm
24 define security for hcm
 

Similar to Debug PL/SQL with SQL Developer

PL/SQL All the Things in Oracle SQL Developer
PL/SQL All the Things in Oracle SQL DeveloperPL/SQL All the Things in Oracle SQL Developer
PL/SQL All the Things in Oracle SQL DeveloperJeff 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!
Oracle SQL Developer: You're Doing it Wrong!Jeff Smith
 
What's New in Oracle SQL Developer for 2018
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
 
Oracle SQL Developer Tips & Tricks
Oracle SQL Developer Tips & TricksOracle SQL Developer Tips & Tricks
Oracle SQL Developer Tips & TricksJeff Smith
 
Oracle SQL Developer: 3 Features You're Not Using But Should Be
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 BeJeff Smith
 
Debugging PL/SQL with Oracle SQL Developer
Debugging PL/SQL with Oracle SQL DeveloperDebugging PL/SQL with Oracle SQL Developer
Debugging PL/SQL with Oracle SQL DeveloperJeff Smith
 
All of the Performance Tuning Features in Oracle SQL Developer
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 DeveloperJeff Smith
 
Oracle Database 12c Feature Support in Oracle SQL Developer
Oracle Database 12c Feature Support in Oracle SQL DeveloperOracle Database 12c Feature Support in Oracle SQL Developer
Oracle Database 12c Feature Support in Oracle SQL DeveloperJeff Smith
 
Oracle SQL Developer Reports
Oracle SQL Developer ReportsOracle SQL Developer Reports
Oracle SQL Developer ReportsJeff Smith
 
Oracle SQL Developer for SQL Server?
Oracle SQL Developer for SQL Server?Oracle SQL Developer for SQL Server?
Oracle SQL Developer for SQL Server?Jeff Smith
 
Pennsylvania Banner User Group Webinar: Oracle SQL Developer Tips & Tricks
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 & TricksJeff Smith
 
Oracle SQL Developer for the DBA
Oracle SQL Developer for the DBAOracle SQL Developer for the DBA
Oracle SQL Developer for the DBAJeff Smith
 
Database as a Service, Collaborate 2016
Database as a Service, Collaborate 2016Database as a Service, Collaborate 2016
Database as a Service, Collaborate 2016Kellyn Pot'Vin-Gorman
 
Big Data Management System: Smart SQL Processing Across Hadoop and your Data ...
Big Data Management System: Smart SQL Processing Across Hadoop and your Data ...Big Data Management System: Smart SQL Processing Across Hadoop and your Data ...
Big Data Management System: Smart SQL Processing Across Hadoop and your Data ...DataWorks Summit
 
SQLcl overview - A new Command Line Interface for Oracle Database
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 DatabaseJeff Smith
 
Oracle Warehouse Builder to Oracle Data Integrator 12c Migration Utility
Oracle Warehouse Builder to Oracle Data Integrator 12c Migration UtilityOracle Warehouse Builder to Oracle Data Integrator 12c Migration Utility
Oracle Warehouse Builder to Oracle Data Integrator 12c Migration UtilityNoel Sidebotham
 
Oracle database 12c_and_DevOps
Oracle database 12c_and_DevOpsOracle database 12c_and_DevOps
Oracle database 12c_and_DevOpsMaria Colgan
 
Mastering DevOps with Oracle
Mastering DevOps with Oracle Mastering DevOps with Oracle
Mastering DevOps with Oracle jeckels
 
Using MySQL Enterprise Monitor for Continuous Performance Improvement
Using MySQL Enterprise Monitor for Continuous Performance ImprovementUsing MySQL Enterprise Monitor for Continuous Performance Improvement
Using MySQL Enterprise Monitor for Continuous Performance ImprovementMark Matthews
 

Similar to Debug PL/SQL with SQL Developer (20)

PL/SQL All the Things in Oracle SQL Developer
PL/SQL All the Things in Oracle SQL DeveloperPL/SQL All the Things in Oracle SQL Developer
PL/SQL All the Things in Oracle SQL Developer
 
Oracle SQL Developer: You're Doing it Wrong!
Oracle SQL Developer: You're Doing it Wrong!Oracle SQL Developer: You're Doing it Wrong!
Oracle SQL Developer: You're Doing it Wrong!
 
What's New in Oracle SQL Developer for 2018
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
 
Oracle SQL Developer Tips & Tricks
Oracle SQL Developer Tips & TricksOracle SQL Developer Tips & Tricks
Oracle SQL Developer Tips & Tricks
 
Oracle SQL Developer: 3 Features You're Not Using But Should Be
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
 
Debugging PL/SQL with Oracle SQL Developer
Debugging PL/SQL with Oracle SQL DeveloperDebugging PL/SQL with Oracle SQL Developer
Debugging PL/SQL with Oracle SQL Developer
 
All of the Performance Tuning Features in Oracle SQL Developer
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
 
Oracle Database 12c Feature Support in Oracle SQL Developer
Oracle Database 12c Feature Support in Oracle SQL DeveloperOracle Database 12c Feature Support in Oracle SQL Developer
Oracle Database 12c Feature Support in Oracle SQL Developer
 
Oracle SQL Developer Reports
Oracle SQL Developer ReportsOracle SQL Developer Reports
Oracle SQL Developer Reports
 
Oracle SQL Developer for SQL Server?
Oracle SQL Developer for SQL Server?Oracle SQL Developer for SQL Server?
Oracle SQL Developer for SQL Server?
 
Pennsylvania Banner User Group Webinar: Oracle SQL Developer Tips & Tricks
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
 
Oracle SQL Developer for the DBA
Oracle SQL Developer for the DBAOracle SQL Developer for the DBA
Oracle SQL Developer for the DBA
 
UKOUG
UKOUG UKOUG
UKOUG
 
Database as a Service, Collaborate 2016
Database as a Service, Collaborate 2016Database as a Service, Collaborate 2016
Database as a Service, Collaborate 2016
 
Big Data Management System: Smart SQL Processing Across Hadoop and your Data ...
Big Data Management System: Smart SQL Processing Across Hadoop and your Data ...Big Data Management System: Smart SQL Processing Across Hadoop and your Data ...
Big Data Management System: Smart SQL Processing Across Hadoop and your Data ...
 
SQLcl overview - A new Command Line Interface for Oracle Database
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
 
Oracle Warehouse Builder to Oracle Data Integrator 12c Migration Utility
Oracle Warehouse Builder to Oracle Data Integrator 12c Migration UtilityOracle Warehouse Builder to Oracle Data Integrator 12c Migration Utility
Oracle Warehouse Builder to Oracle Data Integrator 12c Migration Utility
 
Oracle database 12c_and_DevOps
Oracle database 12c_and_DevOpsOracle database 12c_and_DevOps
Oracle database 12c_and_DevOps
 
Mastering DevOps with Oracle
Mastering DevOps with Oracle Mastering DevOps with Oracle
Mastering DevOps with Oracle
 
Using MySQL Enterprise Monitor for Continuous Performance Improvement
Using MySQL Enterprise Monitor for Continuous Performance ImprovementUsing MySQL Enterprise Monitor for Continuous Performance Improvement
Using MySQL Enterprise Monitor for Continuous Performance Improvement
 

More from Jeff Smith

Oracle REST Data Services: POUG Edition
Oracle REST Data Services: POUG EditionOracle REST Data Services: POUG Edition
Oracle REST Data Services: POUG EditionJeff Smith
 
Oracle SQL Developer Tips and Tricks: Data Edition
Oracle SQL Developer Tips and Tricks: Data EditionOracle SQL Developer Tips and Tricks: Data Edition
Oracle SQL Developer Tips and Tricks: Data EditionJeff Smith
 
Change Management for Oracle Database with SQLcl
Change Management for Oracle Database with SQLcl Change Management for Oracle Database with SQLcl
Change Management for Oracle Database with SQLcl Jeff Smith
 
RESTful Services for your Oracle Autonomous Database
RESTful Services for your Oracle Autonomous DatabaseRESTful Services for your Oracle Autonomous Database
RESTful Services for your Oracle Autonomous DatabaseJeff Smith
 
Oracle SQLcl: Formatting your Query Results
Oracle SQLcl: Formatting your Query ResultsOracle SQLcl: Formatting your Query Results
Oracle SQLcl: Formatting your Query ResultsJeff Smith
 
Oracle Database Management REST API
Oracle Database Management REST APIOracle Database Management REST API
Oracle Database Management REST APIJeff Smith
 
Oracle SQL Developer Data Modeler - for SQL Server
Oracle SQL Developer Data Modeler - for SQL ServerOracle SQL Developer Data Modeler - for SQL Server
Oracle SQL Developer Data Modeler - for SQL ServerJeff Smith
 
Social Media - Why a Database Person Should Care
Social Media  - Why a Database Person Should CareSocial Media  - Why a Database Person Should Care
Social Media - Why a Database Person Should CareJeff Smith
 
If You Oracle Then You Should Twitter Too
If You Oracle Then You Should Twitter TooIf You Oracle Then You Should Twitter Too
If You Oracle Then You Should Twitter TooJeff Smith
 
My Favorite Oracle SQL Developer Data Modeler Features
My Favorite Oracle SQL Developer Data Modeler FeaturesMy Favorite Oracle SQL Developer Data Modeler Features
My Favorite Oracle SQL Developer Data Modeler FeaturesJeff Smith
 
Oracle SQL Developer Data Modeler - Version Control Your Designs
Oracle SQL Developer Data Modeler - Version Control Your DesignsOracle SQL Developer Data Modeler - Version Control Your Designs
Oracle SQL Developer Data Modeler - Version Control Your DesignsJeff Smith
 
Dimensional modeling in oracle sql developer
Dimensional modeling in oracle sql developerDimensional modeling in oracle sql developer
Dimensional modeling in oracle sql developerJeff Smith
 
Oracle SQL Developer version 4.0 New Features Overview
Oracle SQL Developer version 4.0 New Features OverviewOracle SQL Developer version 4.0 New Features Overview
Oracle SQL Developer version 4.0 New Features OverviewJeff Smith
 
Oracle SQL Developer Top 10 Tips & Tricks
Oracle SQL Developer Top 10 Tips & TricksOracle SQL Developer Top 10 Tips & Tricks
Oracle SQL Developer Top 10 Tips & TricksJeff Smith
 

More from Jeff Smith (14)

Oracle REST Data Services: POUG Edition
Oracle REST Data Services: POUG EditionOracle REST Data Services: POUG Edition
Oracle REST Data Services: POUG Edition
 
Oracle SQL Developer Tips and Tricks: Data Edition
Oracle SQL Developer Tips and Tricks: Data EditionOracle SQL Developer Tips and Tricks: Data Edition
Oracle SQL Developer Tips and Tricks: Data Edition
 
Change Management for Oracle Database with SQLcl
Change Management for Oracle Database with SQLcl Change Management for Oracle Database with SQLcl
Change Management for Oracle Database with SQLcl
 
RESTful Services for your Oracle Autonomous Database
RESTful Services for your Oracle Autonomous DatabaseRESTful Services for your Oracle Autonomous Database
RESTful Services for your Oracle Autonomous Database
 
Oracle SQLcl: Formatting your Query Results
Oracle SQLcl: Formatting your Query ResultsOracle SQLcl: Formatting your Query Results
Oracle SQLcl: Formatting your Query Results
 
Oracle Database Management REST API
Oracle Database Management REST APIOracle Database Management REST API
Oracle Database Management REST API
 
Oracle SQL Developer Data Modeler - for SQL Server
Oracle SQL Developer Data Modeler - for SQL ServerOracle SQL Developer Data Modeler - for SQL Server
Oracle SQL Developer Data Modeler - for SQL Server
 
Social Media - Why a Database Person Should Care
Social Media  - Why a Database Person Should CareSocial Media  - Why a Database Person Should Care
Social Media - Why a Database Person Should Care
 
If You Oracle Then You Should Twitter Too
If You Oracle Then You Should Twitter TooIf You Oracle Then You Should Twitter Too
If You Oracle Then You Should Twitter Too
 
My Favorite Oracle SQL Developer Data Modeler Features
My Favorite Oracle SQL Developer Data Modeler FeaturesMy Favorite Oracle SQL Developer Data Modeler Features
My Favorite Oracle SQL Developer Data Modeler Features
 
Oracle SQL Developer Data Modeler - Version Control Your Designs
Oracle SQL Developer Data Modeler - Version Control Your DesignsOracle SQL Developer Data Modeler - Version Control Your Designs
Oracle SQL Developer Data Modeler - Version Control Your Designs
 
Dimensional modeling in oracle sql developer
Dimensional modeling in oracle sql developerDimensional modeling in oracle sql developer
Dimensional modeling in oracle sql developer
 
Oracle SQL Developer version 4.0 New Features Overview
Oracle SQL Developer version 4.0 New Features OverviewOracle SQL Developer version 4.0 New Features Overview
Oracle SQL Developer version 4.0 New Features Overview
 
Oracle SQL Developer Top 10 Tips & Tricks
Oracle SQL Developer Top 10 Tips & TricksOracle SQL Developer Top 10 Tips & Tricks
Oracle SQL Developer Top 10 Tips & Tricks
 

Recently uploaded

MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesMuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesManik S Magar
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPathCommunity
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...itnewsafrica
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI AgeCprime
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfIngrid Airi González
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Nikki Chapple
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS:  6 Ways to Automate Your Data IntegrationBridging Between CAD & GIS:  6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integrationmarketing932765
 
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security ObservabilityGlenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security Observabilityitnewsafrica
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 

Recently uploaded (20)

MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesMuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to Hero
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI Age
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdf
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS:  6 Ways to Automate Your Data IntegrationBridging Between CAD & GIS:  6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
 
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security ObservabilityGlenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 

Debug PL/SQL with SQL Developer

  • 1. Copyright © 2019 Oracle and/or its affiliates. All rights reserved. | Debugging PL/SQL with SQL Developer Jeff Smith Senior Principal Product Manager Jeff.d.smith@oracle.com || @thatjeffsmith Database Tools, Oracle Corp 1
  • 2. Copyright © 2018, 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 © 2016, 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 © 2017, Oracle and/or its affiliates. All rights reserved. 5 SQL Developer Snapshot Time Tested Launched in 2005 An Industry Standard 5M+ Oracle DBAs & Developers Always Improving Quarterly Releases 4
  • 6. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Project Raptor  Early Adopter on OTN 2005 1.1  File Based PL/SQL editing  Reports  Ships with 11gR1 1.5.x  Localizations - Japanese, Spanish, Italian, German, French, Portuguese, Chinese, & Koreans  Ships with 11gR2 SQLDev v1.0  SQL Worksheet  Procedure Editor  The world takes notice! 1.5  Schema Copy/Diff/Export  Thick connections  Versioning  TimesTen 2.1  Unit Testing  Data Modeler Viewer  Unshared SQL Worksheets 2007 201020092006 3.0  Full Data Modeler  View > DBA  SQL Tuning Advisor  Query Builder 2008 2011 2012 3.1  New Database DIFF  PDF Reports  RMAN  Data Pump 2013 3.2  APEX Listener / ORDS Support  Database 12c Support  Schema Service Support 4.0  Java 7  ASH/AWR/ADDM  Color Coded Connections  Command line Interface 4.0.3  Optimized Code Insight  Oracle Big Data Appliance 2014 2015 2016 4.1  ORDS Included/Full GUI  instance Viewer  SQLcl  Copy PDB to DBaaS  Larry live demos PDB relocate @ OOW 4.2  Real Time SQL Monitoring  Top SQL Report  Formatter & Other Editor Enhancements  Easier RESTful Services Development 2017 SQLcl  New CLI  Modern SQL*Plus Release History
  • 7. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | 2017 2017.2  Bug Fixes  Sharding  Data Guard 17.3 & 17.4  Bug Fixes Quarterly Releases!!! 2018 Release History 18.1  Autonomous Data Warehouse Support  New Welcome Screen/Connections  SQL Injection Detection  PL/Scope SQL Statement Support  Better Formatting 18.2 & 3  PL/SQL Injection Detection  Cloud data Loads  SQL Developer Web
  • 8. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | What does ‘debug’ mean?  Run and watch?  dbms/owa OUTPUT?  Stare at your code until you decide to get coffee?
  • 9. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |  after  code++  observe  clean up DBMS/OWA_OUTPUT is not ‘bad’
  • 10. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |  Coming?  Going?  Pause/Poke  Play with what-if scenarios Interactive, step-by-step experience with your code
  • 11. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | The PL/SQL Debugger  SYS.DBMS_DEBUG_JDWP  Native SQL Developer tooling  $0.00
  • 12. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | A Tale of Two Debugging Methods  LOCAL Code/Session originates from SQL Developer  REMOTE aka EXTERNAL aka Just in Time Session kicks off and runs from your program, which then connects back down to SQL Developer for you to debug
  • 13. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |  Required PRIVS: DEBUG CONNECT SESSION & EXECUTE for PL/SQL  12c+ : Access Control Lists (Fine Grained Access)  Open Code/Object in a code editor  Compile for DEBUG  Click the big ‘Bug’ button Local Debugging
  • 14. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | What happens next  the DATABASE will CONNECT to your Machine  not CLIENT => SERVER but SERVER => CLIENT  ACL in 12c+ allows the DB to reach out on the network  if this is a bridge too far…
  • 15. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | DBMS_DEBUG (PROBE API) DatabaseDebuggerDisableJDWP=true CLIENT => SERVER
  • 16. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |  Not officially supported  Not as feature rich  External debugging won’t work
  • 17. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
  • 18. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
  • 19. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |  Set a Breakpoint! OR  Configure Preferences  Start Debugging: Step Over Some Tips
  • 20. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Breakpoints ‘stops’ execution on a specific line OR If a condition is met
  • 21. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Step Over vs Step Into  Step Over – Executes line 51, goes to line 54  Step Into – Opens program at line 51 for debugging
  • 22. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Where do we go? Where do we go now? Where do we go? Oh, oh Where do we go? (Where do we go now?) Mind the Call Stack
  • 23. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Remote/External Debugging – cue APEX!  APEX runs, calls PL/SQL  hits breakpoint  SQLDev takes over  do debugging  control back to APEX
  • 24. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Listen for Debug Requests SQL Developer Client Machine IP Make sure SQL Dev is listening when APEX rings the door bell
  • 25. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Setup Debugger in your Application execute DBMS_DEBUG_JDWP.CONNECT_TCP(‘sqldev-IP’, port);
  • 26. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Remember to set a breakpoint! Executable lines of code
  • 27. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Run your APEX App  Session trips breakpoint APEX will ‘hang’  SQL Developer will ‘blink’ to life  Start debugging!
  • 28. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Debug!