Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Debugging PL/SQL with Oracle SQL Developer

14,851 views

Published on

An overview of how to debug your stored procedures with Oracle SQL Developer - your PL/SQL IDE.

Published in: Technology
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (2019 Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download Full EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download Full doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book THIS can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer THIS is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBooks .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story THIS Helped Ignite a Movement,-- Atomic Habits: An Easy & Proven Way to Build Good Habits & Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money THIS the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths THIS Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here

Debugging PL/SQL with Oracle SQL Developer

  1. 1. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Oracle SQL Developer PL/SQL Debugging Jeff Smith Jeff.d.smith@oracle.com || @thatjeffsmith Senior Principal Product Manager Database Development Tools Group Oracle Confidential – Internal/Restricted/Highly Restricted
  2. 2. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |  Gentle Introduction to Debugging  Worksheet vs Procedure Editor  Debug Demo  How it works – boring architectural stuff  Advanced Debugger ‘Tricks’ Today’s Mission: Debugging PL/SQL < 5 Minutes
  3. 3. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |  FREE Oracle Database IDE/GUI  Windows, OS X, *NIX  More than 4,000,000 users worldwide  My Oracle Support available via your DB license
  4. 4. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |  Project Raptor 2005 ~ Oracle SQL Developer v1.0 2006  1.5 2008  2.1 2009  3.0 2011  3.1, 3.2 2012  4.0 2013  4.0.3 2014  4.1 May 2015 Release History
  5. 5. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |  Run program, see what happens  Add a bunch of DBMS_OUTPUT code  Use your IDE to ‘step’ interactively through the PL/SQL program(s) What do we mean by ‘Debug?’
  6. 6. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |  After the fact  Extra Coding  Not interactive  Don’t forget to remove before Production DBMS_OUTPUT is Better than Nothing
  7. 7. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |  Confirm required PRIVS (DEBUG CONNECT SESSION)  If 12c, configure Access Control (Fine Grained Access)  Open Code – in the Procedure Editor  Compile for DEBUG  Click the big ‘Bug’ button How to Launch a Debug Session
  8. 8. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |  Set a Breakpoint! OR  Configure Preferences  Start Debugging: Step Over Some Tips
  9. 9. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Breakpoints ‘Pauses’ execution on a specific line OR If a condition is met
  10. 10. 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
  11. 11. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | See where you’ve been and where you’re going Mind the Call Stack
  12. 12. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Remote/External Debugging
  13. 13. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Listen for Debug Requests
  14. 14. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | execute DBMS_DEBUG_JDWP.CONNECT_TCP('127.0.0.1',4000); create or replace FUNCTION GET_EMP_NAME ( ID IN NUMBER ) RETURN VARCHAR2 AS name varchar2(100); BEGIN select first_name||' '||last_name into name from employees where employee_id = ID; RETURN name; END GET_EMP_NAME; Setup Debugger in your Application (hard way)
  15. 15. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Just set an ENV VARIABLE! ORA_DEBUG_JDWP=host=mypc;port= 1234 Enable Application for debugging (the EASY way)
  16. 16. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Advantages over SQL Worksheet:  Package body, jump to Spec and vice versa  ‘Breadcrumbs’  Highlighted compiler errors and warnings by default Procedure Editor – a PL/SQL aware IDE
  17. 17. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | SQL Developer Resources • SQL Developer on OTN – www.oracle.com/sqldeveloper • Feature Exchange – sqldeveloper.oracle.com • Forums – https://forums.oracle.com/forums/forum.jspa?forumID=260 • Oracle Learning Library – www.oracle.com/oll

×