Oracle SQL Developer: You're Doing it Wrong!

Jeff Smith
Jeff SmithDistinguished Product Manager at Oracle Corp
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
SQLDevYou’re Doing it Wrong
Jeff Smith
Senior Principal Product Manager
Jeff.d.smith@oracle.com || @thatjeffsmith
Database Tools, Oracle Corp
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 © 2014 Oracle and/or its affiliates. All rights reserved. |
Oracle SQL Developer, Major Feature Areas
 PL/SQL IDE
 SQL editor
 GUI for browsing and managing database objects
 Ad Hoc reporting
 Database Design & Data Modeling
 Database Administration
 3rd Party RDBMS Migrations to Oracle
 Deploy and Administer Oracle REST Data Services
 REST Enablement of the Database
 Command Line Interface
Copyright © 2017, Oracle and/or its affiliates. All rights reserved.
6
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. |

 Top 15 Download on OTN
 Telling Your Friends 
5,000,000+
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
 KILL ALL THE BUGS!
18.2/3
 PL/SQL
Injection
Detection
 Cloud data
Loads
 Nested
Connections
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
You’re doing it wrong.
All wrong.
Do you even SQLDev?
Provocative Statement!
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Huge Product, Most Folks are Self-Taught…
…it’s our fault, not yours.
 PL/SQL IDE
 SQL editor
 GUI for browsing and managing database objects
 Ad Hoc reporting
 Database Design & Data Modeling
 Database Administration
 3rd Party RDBMS Migrations to Oracle
 Deploy and Administer Oracle REST Data Services
 REST Enablement of the Database
 Command Line Interface
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Jeff’s Driving School
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Wrong Way: Not using the Right Tool
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Command Line can be faster, simpler!
 <TAB> complete
 file names, keywords, and
 object names!
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
SQL Statement & Script History – access with Up/Down Key
 Sensitive commands,
connect black-listed
 Defaults to last 100
 Avail from session to
session per OS user
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Use ALIAS feature to create new Commands
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Get your files, whichever way you want them
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Custom Formats, just add JavaScript
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Auto-Replace/Spell Checking in SQLcl
 Uses SCRIPT/JS
 Looks for ‘bad’ text
 Replaces before
sending to JDBC
 Shows corrected SQL
with Output
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Wrong Way: Digging around the Connections Tree
Tree Basics:
 use the keyboard to navigate
 use connection folders
 hide things! OR
 don’t use the tree at all!
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Right Way: Trim the Tree
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Right Way: Using Database Search
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Right Way: Ctrl+Click into the Object
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Right Way: Try the Schema Browser
Right-click on your Connection, open the schema browser
 drop down pickers vs tree
 full features
 client side filtering
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Wrong Way: Loading Scripts/Copy/Pasting Code
Code your frequently
used SQL and
scripts directly into
the product:
Code Snippets
 …or Auto-Replace
 Reports
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
 Automatic = suggestions as
you type
 Manual = suggestions as you
ask for them (ctrl+space)
 drag and drop from tree to
generate code
Wrong Way: Manual Coding
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
 Adjust delay
 Suppress automatic
suggestions
OR
 Turn off completely and
use keyboard, on demand
with CTRL+Spacebar
Wrong Way: Getting Mad at the Pop-ups
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Bonus: Get Help/Examples with Commands!
 peak into Docs for sample code
on your function/command
 click on ‘book’ to go straight
to the DOCS page for that
function/command
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Right way: keyboard through SQL History
Wrong Way: F8/Using the History Panel
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Wrong Way: Session Trace to get SQL Developer’s SQL
Right way: use the Statements panel
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
I love it when a plan comes
together!!
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Wrong Way: Explain Plan
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Right Way: Use Cached Plans or DBMS_XPLAN or AutoTrace
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Plans/AutoTrace – generate & compare side by side!
Hit the drop-down control next to Plan Button to
access cached plans from v$sql_plan
Pin Plan, Gen Plan, Right-Click >
Compare for Side By Side View
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
 enable things you want to see in
your plans, like
QBLOCK_NAME
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
PUT
THE
MOUSE
DOWN
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Wrong Way: 7 Clicks to get CSV
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
 Add Comment
 Execute via F5 (Script)
 Comment labels match grid
export formatter labels
 ONLY works in SQLDev…
& SQLcl 
Right Way: Write Straight to CSV + Spool
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Wrong Way: Running on Default Preferences
 Open Object on Single Click
 Code Editor Font
 Grid in checkerboard
 Display NULL As
 Shortcut Keys
 PL/SQL Syntax Colors
Ten Minute Video
Right way: tweak SQLDev to work the way you want it to
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Wrong Way: Ignoring the DBA Panel
 View Menu
 ‘DBA’
 Adding new
things every
release
 Not JUST for
developers
anymore
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Watch Database Activity
 agent-less
 ZERO DB objects
 a ‘fancy’ report
 no history
● no alerts
● drill-downs
We’re making more of
these 
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Wrong Way: Data In and Out of Excel
 XLS vs XLSX
 Importing
 External/SQLDR
 Ctrl+C vs Shift+…
 Multiple tables to
different workbooks
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Right Way: Some Excel Tips
 XLSX faster than XLS
 CSV faster than XLSX
 CSV => External Table
better for large imports
 Ctrl+Shift+C => Copy
Data + Column Headers
 Export multiple tables to a
single XLSX file = use the
Database Export Wizard
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
The Tips in Blog/Video Format
 thatjeffsmith.com
 @thatjeffsmith
 youtube/user/thatjeffsmith
Oracle SQL Developer: You're Doing it Wrong!
1 of 43

More Related Content

Similar to Oracle SQL Developer: You're Doing it Wrong!(20)

UKOUG UKOUG
UKOUG
Kellyn Pot'Vin-Gorman1.5K views
AWR and ASH in an EM12c WorldAWR and ASH in an EM12c World
AWR and ASH in an EM12c World
Kellyn Pot'Vin-Gorman662 views
Session at Oredev 2016.Session at Oredev 2016.
Session at Oredev 2016.
Geertjan Wielenga327 views
Imworld.roImworld.ro
Imworld.ro
Geertjan Wielenga360 views
Slovenian Oracle User GroupSlovenian Oracle User Group
Slovenian Oracle User Group
Geertjan Wielenga289 views
AWR and ASH Deep DiveAWR and ASH Deep Dive
AWR and ASH Deep Dive
Kellyn Pot'Vin-Gorman2K views
IOUG at Coors Field ASH and AWR in EM12c!IOUG at Coors Field ASH and AWR in EM12c!
IOUG at Coors Field ASH and AWR in EM12c!
Kellyn Pot'Vin-Gorman754 views
Marcin Szałowicz - MySQL WorkbenchMarcin Szałowicz - MySQL Workbench
Marcin Szałowicz - MySQL Workbench
Women in Technology Poland314 views
Database as a Service, Collaborate 2016Database as a Service, Collaborate 2016
Database as a Service, Collaborate 2016
Kellyn Pot'Vin-Gorman432 views
Module 1: JavaScript BasicsModule 1: JavaScript Basics
Module 1: JavaScript Basics
Daniel McGhan1.2K views
Developer day v2Developer day v2
Developer day v2
AiougVizagChapter1.5K views
What is DevOps?What is DevOps?
What is DevOps?
jeckels2.5K views

Oracle SQL Developer: You're Doing it Wrong!

  • 1. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | SQLDevYou’re Doing it Wrong Jeff Smith Senior Principal Product Manager Jeff.d.smith@oracle.com || @thatjeffsmith Database Tools, Oracle Corp
  • 2. 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
  • 3. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Oracle SQL Developer, Major Feature Areas  PL/SQL IDE  SQL editor  GUI for browsing and managing database objects  Ad Hoc reporting  Database Design & Data Modeling  Database Administration  3rd Party RDBMS Migrations to Oracle  Deploy and Administer Oracle REST Data Services  REST Enablement of the Database  Command Line Interface
  • 4. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. 6 SQL Developer Snapshot Time Tested Launched in 2005 An Industry Standard 5M+ Oracle DBAs & Developers Always Improving Quarterly Releases 4
  • 5. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |   Top 15 Download on OTN  Telling Your Friends  5,000,000+
  • 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  KILL ALL THE BUGS! 18.2/3  PL/SQL Injection Detection  Cloud data Loads  Nested Connections
  • 8. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | You’re doing it wrong. All wrong. Do you even SQLDev? Provocative Statement!
  • 9. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Huge Product, Most Folks are Self-Taught… …it’s our fault, not yours.  PL/SQL IDE  SQL editor  GUI for browsing and managing database objects  Ad Hoc reporting  Database Design & Data Modeling  Database Administration  3rd Party RDBMS Migrations to Oracle  Deploy and Administer Oracle REST Data Services  REST Enablement of the Database  Command Line Interface
  • 10. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Jeff’s Driving School
  • 11. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Wrong Way: Not using the Right Tool
  • 12. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Command Line can be faster, simpler!  <TAB> complete  file names, keywords, and  object names!
  • 13. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | SQL Statement & Script History – access with Up/Down Key  Sensitive commands, connect black-listed  Defaults to last 100  Avail from session to session per OS user
  • 14. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Use ALIAS feature to create new Commands
  • 15. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Get your files, whichever way you want them
  • 16. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Custom Formats, just add JavaScript
  • 17. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Auto-Replace/Spell Checking in SQLcl  Uses SCRIPT/JS  Looks for ‘bad’ text  Replaces before sending to JDBC  Shows corrected SQL with Output
  • 18. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Wrong Way: Digging around the Connections Tree Tree Basics:  use the keyboard to navigate  use connection folders  hide things! OR  don’t use the tree at all!
  • 19. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Right Way: Trim the Tree
  • 20. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Right Way: Using Database Search
  • 21. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Right Way: Ctrl+Click into the Object
  • 22. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Right Way: Try the Schema Browser Right-click on your Connection, open the schema browser  drop down pickers vs tree  full features  client side filtering
  • 23. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Wrong Way: Loading Scripts/Copy/Pasting Code Code your frequently used SQL and scripts directly into the product: Code Snippets  …or Auto-Replace  Reports
  • 24. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |  Automatic = suggestions as you type  Manual = suggestions as you ask for them (ctrl+space)  drag and drop from tree to generate code Wrong Way: Manual Coding
  • 25. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |  Adjust delay  Suppress automatic suggestions OR  Turn off completely and use keyboard, on demand with CTRL+Spacebar Wrong Way: Getting Mad at the Pop-ups
  • 26. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Bonus: Get Help/Examples with Commands!  peak into Docs for sample code on your function/command  click on ‘book’ to go straight to the DOCS page for that function/command
  • 27. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Right way: keyboard through SQL History Wrong Way: F8/Using the History Panel
  • 28. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Wrong Way: Session Trace to get SQL Developer’s SQL Right way: use the Statements panel
  • 29. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | I love it when a plan comes together!!
  • 30. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Wrong Way: Explain Plan
  • 31. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Right Way: Use Cached Plans or DBMS_XPLAN or AutoTrace
  • 32. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Plans/AutoTrace – generate & compare side by side! Hit the drop-down control next to Plan Button to access cached plans from v$sql_plan Pin Plan, Gen Plan, Right-Click > Compare for Side By Side View
  • 33. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |  enable things you want to see in your plans, like QBLOCK_NAME
  • 34. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | PUT THE MOUSE DOWN
  • 35. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Wrong Way: 7 Clicks to get CSV
  • 36. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |  Add Comment  Execute via F5 (Script)  Comment labels match grid export formatter labels  ONLY works in SQLDev… & SQLcl  Right Way: Write Straight to CSV + Spool
  • 37. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Wrong Way: Running on Default Preferences  Open Object on Single Click  Code Editor Font  Grid in checkerboard  Display NULL As  Shortcut Keys  PL/SQL Syntax Colors Ten Minute Video Right way: tweak SQLDev to work the way you want it to
  • 38. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Wrong Way: Ignoring the DBA Panel  View Menu  ‘DBA’  Adding new things every release  Not JUST for developers anymore
  • 39. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Watch Database Activity  agent-less  ZERO DB objects  a ‘fancy’ report  no history ● no alerts ● drill-downs We’re making more of these 
  • 40. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Wrong Way: Data In and Out of Excel  XLS vs XLSX  Importing  External/SQLDR  Ctrl+C vs Shift+…  Multiple tables to different workbooks
  • 41. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Right Way: Some Excel Tips  XLSX faster than XLS  CSV faster than XLSX  CSV => External Table better for large imports  Ctrl+Shift+C => Copy Data + Column Headers  Export multiple tables to a single XLSX file = use the Database Export Wizard
  • 42. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | The Tips in Blog/Video Format  thatjeffsmith.com  @thatjeffsmith  youtube/user/thatjeffsmith