Plsql+tips+n+tricks+2011

4,191 views
4,039 views

Published on

Toad empowers the PL/SQL professional. Get more out of Toad!

Published in: Technology
1 Comment
1 Like
Statistics
Notes
  • http://dbmanagement.info/Tutorials/PLSQL.htm
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
No Downloads
Views
Total views
4,191
On SlideShare
0
From Embeds
0
Number of Embeds
556
Actions
Shares
0
Downloads
137
Comments
1
Likes
1
Embeds 0
No embeds

No notes for slide

Plsql+tips+n+tricks+2011

  1. 1. Toad Tips & Tricks for the PL/SQL Pro <br />Toad® for Oracle<br />Tips & Tricks for the PL/SQL Professional<br />
  2. 2. Editor 201<br />Code Insight<br />Object name completion (CNTRL + Period)<br />Column Popup (Multi-Select!)<br />PL/SQL Completion<br />Too ‘Mr. Clippy’ for yourtastes? Disable thefeature!<br />VS<br />
  3. 3. Editor 201<br />SQL Recall<br />Use Named SQL for super fast recall.<br />ALT + Up/Dn to scroll through history recall list<br />Code Snippets<br />If..Then..Elsif..<br />Exceptions<br />Cursor For Loop<br />Your custom code<br />
  4. 4. Split Editor<br /><ul><li>Work with multiple sections of your file simultaneously
  5. 5. Left/Right
  6. 6. Top/Bottom</li></li></ul><li>Editor 201<br />Make/Strip Code<br />Translate Delphi, Java, C++, Perl, C#, VB, etc to SQL<br />Translate SQL to Delphi, Java, …<br />Write your own custom Code Transformation Templates<br />
  7. 7. Editor 201<br />Keyboard Shortcuts<br />Check your options!<br />Customize Toolbars<br />Hate Toad’s 80 gazillion buttons and toolbars? TURN THEM OFF <br />
  8. 8. Editor 201<br />Debugger<br />Conditional Breakpoints<br />Use Watches to change variable values and as breakpoints<br />Step into TYPE Body<br />Supports DML Triggers<br />Toad can now write your DBMS_OUTPUT instrumentation code for you!<br />
  9. 9. External Debugging<br />Debug a session that is spawned from a remote application or service.<br />Step thorough your code and view the data as it was initialized somewhere else in the world.<br /><ul><li>Your application’s session sets a DEBUG Flag with a named Identifier
  10. 10. You tell Toad which session to grab. Toad automatically steps into the code.</li></li></ul><li>Editor 201<br />Never build a DBMS_OUTPUT statement manually !<br />Right-click – Output Statements<br />Find a matching END IF, END or ) using bracketing<br />Code Folding<br />Code Refactoring<br />
  11. 11. Code Road Map – Document and Create Local Test/Development Environments – 1 Click!<br /><ul><li>Diagram Views & PL/SQL Objects
  12. 12. Generate Test Data
  13. 13. Generate DDL Scripts
  14. 14. Build HTML Reports</li></li></ul><li>PL/SQL Profiler (DBMS_ & Hierarchical Support)<br />Find out which lines take longer to run than others.<br />Identify execution bottlenecks<br />Figure out what needs tuning<br />Integrated with the Editor for instant analysis.<br />Graphs for quicker identification.<br />
  15. 15. PL/SQL Execution – View Collections<br />Return Values & Out Parameters for your PL/SQL – let Toad build DMBS_OUPUT for you<br />Example – A 2 Dimensional PL/SQL Table Package Function that returns a PL/SQL Table.<br />
  16. 16. PL/SQL Execution – View REF Cursors<br />Does your PL/SQL return a REF Cursor? Let Toad put it into a Data Grid for you.<br />
  17. 17. 3rd Party Source Code Control Integration<br />CVS<br />MSFT TFS 2005, 2008, 2010<br />MSFT Visual Source Safe<br />Perforce<br />PVCS (Serena)<br />Subversion<br />Control files or additionally control objects in the database via Toad’s Team Coding Feature<br />
  18. 18. CodeXpert – let Toad review your code before your peers laugh at you <br />Analyzes your code against Best Practices rules developed by Steven Feuerstein, Bert Scalzo, and Quest’s Oracle experts.<br /> Explains why your code is flagged and gives advice for better implementations.<br /> Can identify SQL that needs Optimized.<br />
  19. 19. Ok, you’ve written some kick-butt PL/SQL, but does it work?<br />Quest’s latest PL/SQL tool automatically tests your PL/SQL for correctness.<br /> Step 1: Tell Code Tester what your program does in PLAIN ENGLISH<br />
  20. 20. Code Tester for Oracle Writes the Test Code For You!<br /> Step 2: Sit back and relax as Code Tester generates your test code.<br />
  21. 21. Run your tests on demand to see what your programs DO and DO NOT accomplish.<br /> Step 3: Analyze the results. RED = BAD. See the Expected VS Actual Results.<br />
  22. 22. Test Performance/Scalability<br />Your stored procedure runs OK for 1 user, how will it handle 10? 50? 100?<br />Toad can answer that question, track response time to user load<br />
  23. 23. Thank you<br />Thank you<br />Questions?you<br />

×