Diese Präsentation wurde erfolgreich gemeldet.
Wir verwenden Ihre LinkedIn Profilangaben und Informationen zu Ihren Aktivitäten, um Anzeigen zu personalisieren und Ihnen relevantere Inhalte anzuzeigen. Sie können Ihre Anzeigeneinstellungen jederzeit ändern.

Oracle SQL Developer: You're Doing it Wrong!

749 Aufrufe

Veröffentlicht am

In this tongue-in-cheek presentation, we show you the 'right' way to use Oracle SQL Developer. Here are some tips and tricks to get you happier and more productive working with Oracle Database.

Veröffentlicht in: Software
  • Als Erste(r) kommentieren

Oracle SQL Developer: You're Doing it Wrong!

  1. 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. 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. 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. 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. 5. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |   Top 15 Download on OTN  Telling Your Friends  5,000,000+
  6. 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. 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. 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. 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. 10. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Jeff’s Driving School
  11. 11. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Wrong Way: Not using the Right Tool
  12. 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. 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. 14. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Use ALIAS feature to create new Commands
  15. 15. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Get your files, whichever way you want them
  16. 16. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Custom Formats, just add JavaScript
  17. 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. 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. 19. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Right Way: Trim the Tree
  20. 20. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Right Way: Using Database Search
  21. 21. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Right Way: Ctrl+Click into the Object
  22. 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. 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. 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. 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. 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. 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. 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. 29. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | I love it when a plan comes together!!
  30. 30. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Wrong Way: Explain Plan
  31. 31. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Right Way: Use Cached Plans or DBMS_XPLAN or AutoTrace
  32. 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. 33. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |  enable things you want to see in your plans, like QBLOCK_NAME
  34. 34. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | PUT THE MOUSE DOWN
  35. 35. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Wrong Way: 7 Clicks to get CSV
  36. 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. 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. 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. 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. 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. 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. 42. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | The Tips in Blog/Video Format  thatjeffsmith.com  @thatjeffsmith  youtube/user/thatjeffsmith

×