SlideShare a Scribd company logo
Copyright @ 2007, John Jay King 1
John Jay King
King Training Resources
john@kingtraining.com
Download this paper and code examples from:
http://www.kingtraining.com
Introducing
Oracle’s SQL Developer
Copyright @ 2007, John Jay King 2
Session Objectives
• Become aware of Oracle’s SQL Developer
product and its features
• Be able to create, modify, and test both SQL and
PL/SQL using SQL Developer
• Use SQL Developer’s Object Browser to examine
and/or alter existing objects and to create new
objects
• Debug stored PL/SQL Procedures and Functions
using SQL Developer
• Customize SQL Developer to your personal
preferences
Copyright @ 2007, John Jay King 3
Oracle SQL Developer
• Oracle has released the free SQL Developer tool
(formerly known as Project Raptor) and it is super!
• If you have ever used the Free Toad tool or PL/SQL
Developer this tool will feel familiar; plus it has more
features and supports Oracle 10g too!
• SQL Developer is a Java-based GUI tool
(works in Windows, Unix, and Linux)
– Power of SQL*Plus without a local Oracle client installation
– Intuitive software; not completely new, based upon JDeveloper
– Provides features often found only in expensive third-party
software including:
• GUI browsing of database objects, creation, deletion, alteration
• Debugging complete with breakpoints
• Query execution
• Database reporting
• Multiple connections
• Tuning features
Copyright @ 2007, John Jay King 4
Where Can I Get It?
• SQL Developer is freely downloadable from
Oracle using the following URL:
http://www.oracle.com/technology/products/
database/sql_developer/index.html
– Current release as of March 2007 is 1.1.2
– Release 1.2 scheduled for mid-2007
• Two versions are available:
– Product with Java 1.5 embedded (about 65mb)
– Product using installed Java 1.5 (about 39mb)
Copyright @ 2007, John Jay King 5
Is the “Install” Complex?
• Taking a page from many open-source products,
SQL Developer installs by simply “unzipping” the
file downloaded from Oracle
– No registry entries in Windows
– No desktop/startbar manipulation in Windows
– No need for Oracle Client or “tnsnames.ora” file
– Not an “installed windows program” no need to
uninstall or back-out anything, simply delete the
install directory
• I find it useful to create a Windows shortcut but it
is not necessary
Copyright @ 2007, John Jay King 6
Major Features
• Major features of SQL Developer include:
– SQL Worksheet for writing/testing SQL, PL/SQL,
and script files
– GUI object navigator allowing creation, deletion,
and alteration of Oracle objects
(yours and those you have access to)
– PL/SQL debugging including breakpoints and
manipulation of variables
– Multiple connections
– Explain Plan
Copyright @ 2007, John Jay King 7
Starting SQL Developer
• Execute the “sqldeveloper.exe” program
(found in the unzipped sqldeveloper directory)
– Requires Java 1.5 (or later) for execution
– Excellent tutorials and help are part of the install and also available on
Oracle’s website
– First execution asks if you want to migrate settings from earlier installation
– First execution also asks which file types to associate with SQL Developer
Copyright @ 2007, John Jay King 8
Initial Screen
– Upon entry the screen above appears
– Right-click on “Connections” and choose
“New Database Connection”
Copyright @ 2007, John Jay King 9
New Connection Dialog
– Enter a connection name (you choose)
– Enter Userid and Password (if shop security permits)
– Enter Hostname, Port, and SID/Service name (get from DBA)
– Choose “Test” to test, then “Connect”
Copyright @ 2007, John Jay King 10
SQL Developer Options
• After logging in to a connection, SQL Developer shows three subpanels:
– Expandable list of the objects associated with the connected Schema/Userid
– SQL Worksheet
– Results area
Copyright @ 2007, John Jay King 11
SQL Worksheet
• The SQL Worksheet area has a dialog box where SQL may be keyed,
viewed, and modified along with an expandable “snippets” panel providing
code fragments
• Note the “pull-down” showing the Connection that will be used to execute
any SQL, PL/SQL, or script in the Worksheet
Copyright @ 2007, John Jay King 12
Testing SQL
• Enter SQL to test
• SQL Toolbar
– Execute Statement (F9)
– Run Script (F5)
– Commit (F2)
– Rollback (F3)
– Cancel (Ctrl+Q)
– SQL History (F9)
– Execute Explain Plan (F6)
– Clear (Ctrl+D)
– Current Connection
pulldown
(if no Connection is
selected, other icons
are disabled/grayed-
out)
Copyright @ 2007, John Jay King 13
Execute Statement
• If only one statement is in SQL Worksheet, select “Execute Statement” to
run it
• If more than one statement is coded, position the cursor in the statement
to be executed (or highlight the statement), then select “Execute
Statement”
– To expand the SQL area to a full-screen; double-click the
“Connection” tab (double-click again to shrink back)
Copyright @ 2007, John Jay King 14
Statement Execution Results
• The “Results” tab shows the results of a single-statement
execution
Copyright @ 2007, John Jay King 15
Snippets
• SQL Developer provides many “snippets” of code that may be
included via drag & drop or code completion
Copyright @ 2007, John Jay King 16
Run Script
• If multiple SQL, PL/SQL, or script statements are to be
executed together, select “Run Script”
• Results show up in the “Script Output” tab
Copyright @ 2007, John Jay King 17
Script Output
• When a script is executed, the results show up in the “Script
Output” tab
Copyright @ 2007, John Jay King 18
DBMS_OUTPUT.PUT_LINE
• If DBMS_OUTPUT.PUT_LINE was used in executed SQL
(or a script) it will show up in the DBMS_OUTPUT tab
• DBMS_OUTPUT must be enabled prior to running your test
(you may wish to increase the buffer size too)
Copyright @ 2007, John Jay King 19
OWA Output
• OWA output will show up in the OWA OUTPUT tab
• OWA OUTPUT must be enabled prior to running your test
Copyright @ 2007, John Jay King 20
Connection Objects
• The objects accessible to the
Userid/Schema used to make
a connection are available
for browsing via the
object navigator
• This navigator follows the
usual pattern
– Expand
– Contract
• Objects available are those
belonging to the connection
Userid/Schema (user_) and
objects available in some way
to the Userid/Schema (all_)
Copyright @ 2007, John Jay King 21
“Browsing” a Table
• Selecting an object (EMP table below) displays a multi-tab
panel containing various bits of information about the table
– Columns
– Data
– Indexes
– Constraints
– Grants
– Statistics
– Column Statistics
– Triggers
– Dependencies
– Details
– SQL
(double-click Table Name (EMP) tab to expand/contract display)
Copyright @ 2007, John Jay King 22
Object Context Menu
• Right-click on an object to display its
“Context Menu” (table menu shown)
– The Edit option opens a dialog
to view/modify the table definition
– Other options open additional
menus allowing the user to issue
commands graphically rather than
from the command line
Copyright @ 2007, John Jay King 23
Table Edit Panel
Copyright @ 2007, John Jay King 24
Table Options
• Choose “Table” to see the list of table manipulation options
Copyright @ 2007, John Jay King 25
Export Options
• Choose “Export Data” to list table export options
Copyright @ 2007, John Jay King 26
Index Options
• Choose “Index” to create or modify indexes
Copyright @ 2007, John Jay King 27
Statistics Option
• Choose “Statistics” to use DBMS_STATS to gather statistics
or validate structures
– After choosing Gather Statistics a dialog appears allowing you to
change the sample size and view/copy the PL/SQL code
Copyright @ 2007, John Jay King 28
Constraints Option
• Choose “Constraint” to view or alter table constraints
Copyright @ 2007, John Jay King 29
Triggers Option
• Choose “Triggers” to build or alter table triggers
(builds skeleton DDL that may be modified in SQL Workspace)
Copyright @ 2007, John Jay King 30
Object Type Context Menu
• Right-click on an object type to display its “Context Menu”
• Here is the “Context Menu” for Tables
Copyright @ 2007, John Jay King 31
Create Table (Simple)
• Choose “Create Table”
to display a panel for
creating a standard
table
• Choose “Add Column”
or “Remove Column”
as desired
Copyright @ 2007, John Jay King 32
Create Table (Advanced)
• Choose “Create Table”
to display a panel for
creating a standard
table, then mark the
“Advanced” box to
display other options
including:
– External tables
– IOT
– Global Temporary
Table
(panel changes for
each table type)
Copyright @ 2007, John Jay King 33
Create Materialized View
• From the
Materialized View
context menu
choose “Create
Materialized View”
to build an
MVIEW by filling
in the blanks!
Copyright @ 2007, John Jay King 34
Other Users’ Stuff
• At the bottom of the object
navigator, the “Other Users”
option lists the Userid/Schema
names that have one or more
objects available to you
• Expand a Userid/Schema to see
the objects exposed to you
Copyright @ 2007, John Jay King 35
Stored PL/SQL
• As you might imagine, selecting Packages, Procedures,
Functions, or Triggers allows you to display and/or alter
existing stored PL/SQL
• Context menus for each type of stored PL/SQL allow you to
create new objects using the same “paint by the numbers”
approach used for Tables and Materialized Views
Copyright @ 2007, John Jay King 36
Select Existing PL/SQL
Copyright @ 2007, John Jay King 37
PL/SQL Context Menu
• Right-Click on a PL/SQL object to display the following
context menu
Copyright @ 2007, John Jay King 38
PL/SQL Debugging
• SQL Developer allows:
– Setting and/or removal of breakpoints
– Monitoring and manipulation of variables
• “Compile for Debug” must be executed to make an
object available for debugging
• Once compiled for Debugging, whenever executed in
“Debug” mode the code will stop where directed
Copyright @ 2007, John Jay King 39
Compilation Icons
• When editing PL/SQL code
the icons shown here appear
– Run
– Debug
– Compile
– Compile for Debug
(PL/SQL name in navigator is italicized after Compile for Debug)
Copyright @ 2007, John Jay King 40
Debugging Run Dialog
• The debugging “Run”
option creates an
anonymous PL/SQL to
test the selected
PL/SQL
• Parameter values are
initially set to “null” so
you must provide the
values you wish to test
Copyright @ 2007, John Jay King 41
Debugging Display
Copyright @ 2007, John Jay King 42
Debug Subpanels
• The debugging pane shows four important
subpanels
– Breakpoints Displays breakpoints,
context menu allows
new breakpoints
– Smart Data Displays breakpoint variables
(double-click value to alter)
– Data Displays all variables
(double-click value to alter)
– Watches Displays or add "watches"
Copyright @ 2007, John Jay King 43
Debug Menu
• When editing or testing PL/SQL compiled
for debugging, the “Debug” menu option
appears
Copyright @ 2007, John Jay King 44
Debugging Icons
• The “Debugging” tab provides a set of icons for controlling
the debug session
– Find Execution Point
– Resume
– Step Over
– Step Into
– Step to End of Method
– Pause
– Terminate
– Garbage Collection
Copyright @ 2007, John Jay King 45
Breakpoints
• While debugging, breakpoints may be set/unset by clicking in
the margin to the left of the PL/SQL text
or by using the context menu
Copyright @ 2007, John Jay King 46
Data Modification
• Smart Data and Data panels allow
viewing and/or alteration of values
• Double-click on a variable’s value
to display the alteration dialog
Copyright @ 2007, John Jay King 47
Data Context
• Instead of double-clicking on a data item, right-click to display
the context menu
Copyright @ 2007, John Jay King 48
Explain Plan
• Use the “Explain Plan” icon or menu option to show
the proposed plan for a statement
Copyright @ 2007, John Jay King 49
Built-In Reports
• Oracle has built many of
the types of reports
routinely created from the
catalog and V$ views into
SQL Developer
– Some DBA-oriented
– Some Developer-oriented
• Before you create your
own reports, look to see
what’s available here first!
Copyright @ 2007, John Jay King 50
Tons of Docs
• SQL Developer provides:
– Great context-oriented help (F1 key)
– Via the Help menu a comprehensive discussion of
SQL Developer
– Via the Help menu excellent references for SQL
and PL/SQL
– Online documentation and “support” via the Oracle
website and many blogs
Copyright @ 2007, John Jay King 51
“Customization”
• The “Tools->Preferences” menu option provides a fairly
comprehensive set of tools to fine-tune SQL Developer to
your needs
Copyright @ 2007, John Jay King 52
Should Others Worry?
• Free products should worry lots, Oracle’s SQL Developer:
– Supports current SQL & PL/SQL
– Provides unlimited free licenses
– Licenses do not “die” periodically
– Supports many features usually
available only in “pay for” products:
e.g. PL/SQL debugging, custom
reporting, and more!
• The better pay-for products are probably safe for a while…
• This product needs a logo!
Copyright @ 2007, John Jay King 53
Wrapping it all Up
• Oracle’s SQL Developer tool is an excellent
addition to every Oracle DBA or Developer’s tool
belt
• If Oracle keeps improving this product and keeps it
free -- it may put some other products out of
business
Copyright @ 2007, John Jay King 54
Training Days 2008
Mark your calendar for:
February 13-14, 2008!
Copyright @ 2007, John Jay King 55For more information visit www.odtug.com or call 910-452-7444
ODTUG Kaleidoscope
June 18 – 21, 2007
Pre-conference Hands-on Training - June 16 – 17
Hilton Daytona Beach Oceanfront Resort
Daytona, Florida
WOW-Wide Open World, Wide Open Web!
Copyright @ 2007, John Jay King 56
IOUG-Collaborate in Denver, April 2008
Start Planning for Next Year!
IOUG-Collaborate 2008
Copyright @ 2007, John Jay King 57
Introducing Oracle’s SQL Developer
To contact the author:
John King
King Training Resources
6341 South Williams Street
Littleton, CO 80121-2627 USA
1.800.252.0652 - 1.303.798.5727
Email: john@kingtraining.com
Today’s slides and examples are on the web:Today’s slides and examples are on the web:
http://www.kingtraining.com
Thanks for your attention!
▬
Please fill out session Evaluations

More Related Content

PDF
SQL Intro
PPTX
Forms 6i guide
PPTX
Tips and Tricks for Toad
PDF
Toad tipstricksexpertinsight
PDF
Access Data from XPages with the Relational Controls
PPTX
Oracle Database Security For Developers
PPT
Oracle forms les07
PDF
Oracle SQL Part1
SQL Intro
Forms 6i guide
Tips and Tricks for Toad
Toad tipstricksexpertinsight
Access Data from XPages with the Relational Controls
Oracle Database Security For Developers
Oracle forms les07
Oracle SQL Part1

What's hot (12)

PDF
Toad for-oracle-release-notes 142
PPT
Oracle forms les06
PPT
PDF
SQL Cockpit 3.1 - Overview
PDF
Oracle advanced queuing
PPT
Controlling User Access -Data base
PDF
SQLcl the next generation of SQLPlus?
PPT
Including Constraints -Oracle Data base
PPT
Oracle forms les02
PPT
forms builder
PPT
PDF
Jdom how it works & how it opened the java process
Toad for-oracle-release-notes 142
Oracle forms les06
SQL Cockpit 3.1 - Overview
Oracle advanced queuing
Controlling User Access -Data base
SQLcl the next generation of SQLPlus?
Including Constraints -Oracle Data base
Oracle forms les02
forms builder
Jdom how it works & how it opened the java process
Ad

Viewers also liked (11)

PPTX
SQL Server Days 2014 - How to (not) torment your fellow SSIS developer
PPTX
Oracle SQL Developer Tips & Tricks
DOC
Subqueries views stored procedures_triggers_transactions
PPTX
Sap hana for_finance_lo_b_kod
PPTX
Sql saturday 448 Tips developer SQL 2012
PPTX
SQL Developer for DBAs
PPTX
Oracle SQL Developer Top 10 Tips & Tricks
PPTX
PL/SQL All the Things in Oracle SQL Developer
PPTX
Pennsylvania Banner User Group Webinar: Oracle SQL Developer Tips & Tricks
PDF
24 Productivity Habits of Successful People - by @prdotco
PDF
12 Days of Productivity
SQL Server Days 2014 - How to (not) torment your fellow SSIS developer
Oracle SQL Developer Tips & Tricks
Subqueries views stored procedures_triggers_transactions
Sap hana for_finance_lo_b_kod
Sql saturday 448 Tips developer SQL 2012
SQL Developer for DBAs
Oracle SQL Developer Top 10 Tips & Tricks
PL/SQL All the Things in Oracle SQL Developer
Pennsylvania Banner User Group Webinar: Oracle SQL Developer Tips & Tricks
24 Productivity Habits of Successful People - by @prdotco
12 Days of Productivity
Ad

Similar to Oracle sql developer_slides (20)

PPTX
Is SQLcl the Next Generation of SQL*Plus?
PPT
Plantilla oracle
PDF
Sql developer - Powerful Free tool for Developers and DBA's
PPT
ow-123123123123123123123123123123123123123
PPTX
android sqlite
PPT
Rajnish singh(presentation on oracle )
PPT
kjdiakdnfdifjadsjkjklljlldasgjdjdljgfldjgldjgldjgl.ppt
PPT
ow.ppt
PPTX
20180929 jssug 10_a5_sql_mk2
PPTX
Products.intro.forum version
PPTX
SAP BO and Teradata best practices
PPTX
Oracle Database 12c - New Features for Developers and DBAs
PPTX
Oracle Database 12c - New Features for Developers and DBAs
PPT
XPages -Beyond the Basics
PPTX
MySQL 5.7 New Features for Developers
PPTX
Generating Code with Oracle SQL Developer Data Modeler
PPTX
PowerShellForDBDevelopers
PDF
MOUG17: SQLT Utility for Tuning - Practical Examples
Is SQLcl the Next Generation of SQL*Plus?
Plantilla oracle
Sql developer - Powerful Free tool for Developers and DBA's
ow-123123123123123123123123123123123123123
android sqlite
Rajnish singh(presentation on oracle )
kjdiakdnfdifjadsjkjklljlldasgjdjdljgfldjgldjgldjgl.ppt
ow.ppt
20180929 jssug 10_a5_sql_mk2
Products.intro.forum version
SAP BO and Teradata best practices
Oracle Database 12c - New Features for Developers and DBAs
Oracle Database 12c - New Features for Developers and DBAs
XPages -Beyond the Basics
MySQL 5.7 New Features for Developers
Generating Code with Oracle SQL Developer Data Modeler
PowerShellForDBDevelopers
MOUG17: SQLT Utility for Tuning - Practical Examples

Recently uploaded (20)

PPTX
Cell Structure & Organelles in detailed.
PPTX
UNDER FIVE CLINICS OR WELL BABY CLINICS.pptx
PPTX
Pharmacology of Heart Failure /Pharmacotherapy of CHF
PDF
Pre independence Education in Inndia.pdf
PDF
PSYCHOLOGY IN EDUCATION.pdf ( nice pdf ...)
PDF
Open folder Downloads.pdf yes yes ges yes
PDF
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
PDF
102 student loan defaulters named and shamed – Is someone you know on the list?
PDF
Mark Klimek Lecture Notes_240423 revision books _173037.pdf
PDF
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
PDF
English Language Teaching from Post-.pdf
PDF
Electrolyte Disturbances and Fluid Management A clinical and physiological ap...
PDF
01-Introduction-to-Information-Management.pdf
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
PPTX
The Healthy Child – Unit II | Child Health Nursing I | B.Sc Nursing 5th Semester
PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PPTX
Onica Farming 24rsclub profitable farm business
PPTX
Open Quiz Monsoon Mind Game Prelims.pptx
PDF
2.FourierTransform-ShortQuestionswithAnswers.pdf
Cell Structure & Organelles in detailed.
UNDER FIVE CLINICS OR WELL BABY CLINICS.pptx
Pharmacology of Heart Failure /Pharmacotherapy of CHF
Pre independence Education in Inndia.pdf
PSYCHOLOGY IN EDUCATION.pdf ( nice pdf ...)
Open folder Downloads.pdf yes yes ges yes
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
102 student loan defaulters named and shamed – Is someone you know on the list?
Mark Klimek Lecture Notes_240423 revision books _173037.pdf
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
English Language Teaching from Post-.pdf
Electrolyte Disturbances and Fluid Management A clinical and physiological ap...
01-Introduction-to-Information-Management.pdf
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
O5-L3 Freight Transport Ops (International) V1.pdf
The Healthy Child – Unit II | Child Health Nursing I | B.Sc Nursing 5th Semester
FourierSeries-QuestionsWithAnswers(Part-A).pdf
Onica Farming 24rsclub profitable farm business
Open Quiz Monsoon Mind Game Prelims.pptx
2.FourierTransform-ShortQuestionswithAnswers.pdf

Oracle sql developer_slides

  • 1. Copyright @ 2007, John Jay King 1 John Jay King King Training Resources [email protected] Download this paper and code examples from: http://www.kingtraining.com Introducing Oracle’s SQL Developer
  • 2. Copyright @ 2007, John Jay King 2 Session Objectives • Become aware of Oracle’s SQL Developer product and its features • Be able to create, modify, and test both SQL and PL/SQL using SQL Developer • Use SQL Developer’s Object Browser to examine and/or alter existing objects and to create new objects • Debug stored PL/SQL Procedures and Functions using SQL Developer • Customize SQL Developer to your personal preferences
  • 3. Copyright @ 2007, John Jay King 3 Oracle SQL Developer • Oracle has released the free SQL Developer tool (formerly known as Project Raptor) and it is super! • If you have ever used the Free Toad tool or PL/SQL Developer this tool will feel familiar; plus it has more features and supports Oracle 10g too! • SQL Developer is a Java-based GUI tool (works in Windows, Unix, and Linux) – Power of SQL*Plus without a local Oracle client installation – Intuitive software; not completely new, based upon JDeveloper – Provides features often found only in expensive third-party software including: • GUI browsing of database objects, creation, deletion, alteration • Debugging complete with breakpoints • Query execution • Database reporting • Multiple connections • Tuning features
  • 4. Copyright @ 2007, John Jay King 4 Where Can I Get It? • SQL Developer is freely downloadable from Oracle using the following URL: http://www.oracle.com/technology/products/ database/sql_developer/index.html – Current release as of March 2007 is 1.1.2 – Release 1.2 scheduled for mid-2007 • Two versions are available: – Product with Java 1.5 embedded (about 65mb) – Product using installed Java 1.5 (about 39mb)
  • 5. Copyright @ 2007, John Jay King 5 Is the “Install” Complex? • Taking a page from many open-source products, SQL Developer installs by simply “unzipping” the file downloaded from Oracle – No registry entries in Windows – No desktop/startbar manipulation in Windows – No need for Oracle Client or “tnsnames.ora” file – Not an “installed windows program” no need to uninstall or back-out anything, simply delete the install directory • I find it useful to create a Windows shortcut but it is not necessary
  • 6. Copyright @ 2007, John Jay King 6 Major Features • Major features of SQL Developer include: – SQL Worksheet for writing/testing SQL, PL/SQL, and script files – GUI object navigator allowing creation, deletion, and alteration of Oracle objects (yours and those you have access to) – PL/SQL debugging including breakpoints and manipulation of variables – Multiple connections – Explain Plan
  • 7. Copyright @ 2007, John Jay King 7 Starting SQL Developer • Execute the “sqldeveloper.exe” program (found in the unzipped sqldeveloper directory) – Requires Java 1.5 (or later) for execution – Excellent tutorials and help are part of the install and also available on Oracle’s website – First execution asks if you want to migrate settings from earlier installation – First execution also asks which file types to associate with SQL Developer
  • 8. Copyright @ 2007, John Jay King 8 Initial Screen – Upon entry the screen above appears – Right-click on “Connections” and choose “New Database Connection”
  • 9. Copyright @ 2007, John Jay King 9 New Connection Dialog – Enter a connection name (you choose) – Enter Userid and Password (if shop security permits) – Enter Hostname, Port, and SID/Service name (get from DBA) – Choose “Test” to test, then “Connect”
  • 10. Copyright @ 2007, John Jay King 10 SQL Developer Options • After logging in to a connection, SQL Developer shows three subpanels: – Expandable list of the objects associated with the connected Schema/Userid – SQL Worksheet – Results area
  • 11. Copyright @ 2007, John Jay King 11 SQL Worksheet • The SQL Worksheet area has a dialog box where SQL may be keyed, viewed, and modified along with an expandable “snippets” panel providing code fragments • Note the “pull-down” showing the Connection that will be used to execute any SQL, PL/SQL, or script in the Worksheet
  • 12. Copyright @ 2007, John Jay King 12 Testing SQL • Enter SQL to test • SQL Toolbar – Execute Statement (F9) – Run Script (F5) – Commit (F2) – Rollback (F3) – Cancel (Ctrl+Q) – SQL History (F9) – Execute Explain Plan (F6) – Clear (Ctrl+D) – Current Connection pulldown (if no Connection is selected, other icons are disabled/grayed- out)
  • 13. Copyright @ 2007, John Jay King 13 Execute Statement • If only one statement is in SQL Worksheet, select “Execute Statement” to run it • If more than one statement is coded, position the cursor in the statement to be executed (or highlight the statement), then select “Execute Statement” – To expand the SQL area to a full-screen; double-click the “Connection” tab (double-click again to shrink back)
  • 14. Copyright @ 2007, John Jay King 14 Statement Execution Results • The “Results” tab shows the results of a single-statement execution
  • 15. Copyright @ 2007, John Jay King 15 Snippets • SQL Developer provides many “snippets” of code that may be included via drag & drop or code completion
  • 16. Copyright @ 2007, John Jay King 16 Run Script • If multiple SQL, PL/SQL, or script statements are to be executed together, select “Run Script” • Results show up in the “Script Output” tab
  • 17. Copyright @ 2007, John Jay King 17 Script Output • When a script is executed, the results show up in the “Script Output” tab
  • 18. Copyright @ 2007, John Jay King 18 DBMS_OUTPUT.PUT_LINE • If DBMS_OUTPUT.PUT_LINE was used in executed SQL (or a script) it will show up in the DBMS_OUTPUT tab • DBMS_OUTPUT must be enabled prior to running your test (you may wish to increase the buffer size too)
  • 19. Copyright @ 2007, John Jay King 19 OWA Output • OWA output will show up in the OWA OUTPUT tab • OWA OUTPUT must be enabled prior to running your test
  • 20. Copyright @ 2007, John Jay King 20 Connection Objects • The objects accessible to the Userid/Schema used to make a connection are available for browsing via the object navigator • This navigator follows the usual pattern – Expand – Contract • Objects available are those belonging to the connection Userid/Schema (user_) and objects available in some way to the Userid/Schema (all_)
  • 21. Copyright @ 2007, John Jay King 21 “Browsing” a Table • Selecting an object (EMP table below) displays a multi-tab panel containing various bits of information about the table – Columns – Data – Indexes – Constraints – Grants – Statistics – Column Statistics – Triggers – Dependencies – Details – SQL (double-click Table Name (EMP) tab to expand/contract display)
  • 22. Copyright @ 2007, John Jay King 22 Object Context Menu • Right-click on an object to display its “Context Menu” (table menu shown) – The Edit option opens a dialog to view/modify the table definition – Other options open additional menus allowing the user to issue commands graphically rather than from the command line
  • 23. Copyright @ 2007, John Jay King 23 Table Edit Panel
  • 24. Copyright @ 2007, John Jay King 24 Table Options • Choose “Table” to see the list of table manipulation options
  • 25. Copyright @ 2007, John Jay King 25 Export Options • Choose “Export Data” to list table export options
  • 26. Copyright @ 2007, John Jay King 26 Index Options • Choose “Index” to create or modify indexes
  • 27. Copyright @ 2007, John Jay King 27 Statistics Option • Choose “Statistics” to use DBMS_STATS to gather statistics or validate structures – After choosing Gather Statistics a dialog appears allowing you to change the sample size and view/copy the PL/SQL code
  • 28. Copyright @ 2007, John Jay King 28 Constraints Option • Choose “Constraint” to view or alter table constraints
  • 29. Copyright @ 2007, John Jay King 29 Triggers Option • Choose “Triggers” to build or alter table triggers (builds skeleton DDL that may be modified in SQL Workspace)
  • 30. Copyright @ 2007, John Jay King 30 Object Type Context Menu • Right-click on an object type to display its “Context Menu” • Here is the “Context Menu” for Tables
  • 31. Copyright @ 2007, John Jay King 31 Create Table (Simple) • Choose “Create Table” to display a panel for creating a standard table • Choose “Add Column” or “Remove Column” as desired
  • 32. Copyright @ 2007, John Jay King 32 Create Table (Advanced) • Choose “Create Table” to display a panel for creating a standard table, then mark the “Advanced” box to display other options including: – External tables – IOT – Global Temporary Table (panel changes for each table type)
  • 33. Copyright @ 2007, John Jay King 33 Create Materialized View • From the Materialized View context menu choose “Create Materialized View” to build an MVIEW by filling in the blanks!
  • 34. Copyright @ 2007, John Jay King 34 Other Users’ Stuff • At the bottom of the object navigator, the “Other Users” option lists the Userid/Schema names that have one or more objects available to you • Expand a Userid/Schema to see the objects exposed to you
  • 35. Copyright @ 2007, John Jay King 35 Stored PL/SQL • As you might imagine, selecting Packages, Procedures, Functions, or Triggers allows you to display and/or alter existing stored PL/SQL • Context menus for each type of stored PL/SQL allow you to create new objects using the same “paint by the numbers” approach used for Tables and Materialized Views
  • 36. Copyright @ 2007, John Jay King 36 Select Existing PL/SQL
  • 37. Copyright @ 2007, John Jay King 37 PL/SQL Context Menu • Right-Click on a PL/SQL object to display the following context menu
  • 38. Copyright @ 2007, John Jay King 38 PL/SQL Debugging • SQL Developer allows: – Setting and/or removal of breakpoints – Monitoring and manipulation of variables • “Compile for Debug” must be executed to make an object available for debugging • Once compiled for Debugging, whenever executed in “Debug” mode the code will stop where directed
  • 39. Copyright @ 2007, John Jay King 39 Compilation Icons • When editing PL/SQL code the icons shown here appear – Run – Debug – Compile – Compile for Debug (PL/SQL name in navigator is italicized after Compile for Debug)
  • 40. Copyright @ 2007, John Jay King 40 Debugging Run Dialog • The debugging “Run” option creates an anonymous PL/SQL to test the selected PL/SQL • Parameter values are initially set to “null” so you must provide the values you wish to test
  • 41. Copyright @ 2007, John Jay King 41 Debugging Display
  • 42. Copyright @ 2007, John Jay King 42 Debug Subpanels • The debugging pane shows four important subpanels – Breakpoints Displays breakpoints, context menu allows new breakpoints – Smart Data Displays breakpoint variables (double-click value to alter) – Data Displays all variables (double-click value to alter) – Watches Displays or add "watches"
  • 43. Copyright @ 2007, John Jay King 43 Debug Menu • When editing or testing PL/SQL compiled for debugging, the “Debug” menu option appears
  • 44. Copyright @ 2007, John Jay King 44 Debugging Icons • The “Debugging” tab provides a set of icons for controlling the debug session – Find Execution Point – Resume – Step Over – Step Into – Step to End of Method – Pause – Terminate – Garbage Collection
  • 45. Copyright @ 2007, John Jay King 45 Breakpoints • While debugging, breakpoints may be set/unset by clicking in the margin to the left of the PL/SQL text or by using the context menu
  • 46. Copyright @ 2007, John Jay King 46 Data Modification • Smart Data and Data panels allow viewing and/or alteration of values • Double-click on a variable’s value to display the alteration dialog
  • 47. Copyright @ 2007, John Jay King 47 Data Context • Instead of double-clicking on a data item, right-click to display the context menu
  • 48. Copyright @ 2007, John Jay King 48 Explain Plan • Use the “Explain Plan” icon or menu option to show the proposed plan for a statement
  • 49. Copyright @ 2007, John Jay King 49 Built-In Reports • Oracle has built many of the types of reports routinely created from the catalog and V$ views into SQL Developer – Some DBA-oriented – Some Developer-oriented • Before you create your own reports, look to see what’s available here first!
  • 50. Copyright @ 2007, John Jay King 50 Tons of Docs • SQL Developer provides: – Great context-oriented help (F1 key) – Via the Help menu a comprehensive discussion of SQL Developer – Via the Help menu excellent references for SQL and PL/SQL – Online documentation and “support” via the Oracle website and many blogs
  • 51. Copyright @ 2007, John Jay King 51 “Customization” • The “Tools->Preferences” menu option provides a fairly comprehensive set of tools to fine-tune SQL Developer to your needs
  • 52. Copyright @ 2007, John Jay King 52 Should Others Worry? • Free products should worry lots, Oracle’s SQL Developer: – Supports current SQL & PL/SQL – Provides unlimited free licenses – Licenses do not “die” periodically – Supports many features usually available only in “pay for” products: e.g. PL/SQL debugging, custom reporting, and more! • The better pay-for products are probably safe for a while… • This product needs a logo!
  • 53. Copyright @ 2007, John Jay King 53 Wrapping it all Up • Oracle’s SQL Developer tool is an excellent addition to every Oracle DBA or Developer’s tool belt • If Oracle keeps improving this product and keeps it free -- it may put some other products out of business
  • 54. Copyright @ 2007, John Jay King 54 Training Days 2008 Mark your calendar for: February 13-14, 2008!
  • 55. Copyright @ 2007, John Jay King 55For more information visit www.odtug.com or call 910-452-7444 ODTUG Kaleidoscope June 18 – 21, 2007 Pre-conference Hands-on Training - June 16 – 17 Hilton Daytona Beach Oceanfront Resort Daytona, Florida WOW-Wide Open World, Wide Open Web!
  • 56. Copyright @ 2007, John Jay King 56 IOUG-Collaborate in Denver, April 2008 Start Planning for Next Year! IOUG-Collaborate 2008
  • 57. Copyright @ 2007, John Jay King 57 Introducing Oracle’s SQL Developer To contact the author: John King King Training Resources 6341 South Williams Street Littleton, CO 80121-2627 USA 1.800.252.0652 - 1.303.798.5727 Email: [email protected] Today’s slides and examples are on the web:Today’s slides and examples are on the web: http://www.kingtraining.com Thanks for your attention! ▬ Please fill out session Evaluations