You are on page 1of 20

PL/SQL Developer

by
Allroundautomation

PL/SQL Developer

The PL/SQL Editor

Integrated Debugger

Query Builder

PL/SQL Beautifier

SQL Window

Command Window

Reports

Project

Object Browser

Performance Optimizing

HTML Manuals

Non-PL/SQL Objects

Template List

Compare User Objects

Export User Objects

Tools

Export User Objects

Multi-threaded IDE

Easy Installation

Systemrequirements

PL/SQL Developer
PL/SQL Developer is an Integrated Development Environment that is specifically targeted at the development of stored
program units for Oracle Databases. Over time we have seen more and more business logic and application logic move
into the Oracle Server, so that PL/SQL programming has become a significant part of the total development process.
PL/SQL Developer focuses on ease of use, code quality and productivity, key advantages during Oracle application
development.

All development tasks can be performed from within PL/SQL Developer's IDE. On the left side you see the Object
Browser, which provides access to all database objects that are relevant to PL/SQL development. On the right side you
see a Program Editor, a Table Definition Editor, and a SQL Window.
The following are major features of PL/SQL Developer:

Powerful PL/SQL Editor With its Syntax Highlighting, SQL and PL/SQL help, Object Descriptions, Code Assistant,
Compiler Hints, PL/SQL Beautifier, Code Contents, Browse Buttons, Hyperlink Navigation, Macro Library and many other
sophisticated features, the editor will even appeal to the most demanding user. Information is automatically presented to
ou when you need it, or is at most one click away.

The PL/SQL Editor

The PL/SQL Editor offers all features you expect from a modern development tool. It provides multi-level undo & redo,
bookmarks, block indent & unindent, powerful find & replace with regular expressions, a macro recorder and library,
column editing, and more.
The PL/SQL Editor also offers a wide range of assistance to the programmer. There is context sensitive help through
Oracle's on-line HTML Manuals: just press F1 when the cursor is on a keyword to perform an indexed search in your
personal selection of manuals.
Right-click on a database object and you will see a context sensitive Object Popup Menu. From this popup menu you can
view the properties or a description of the object. If the object is a program unit, you can view or edit the source. If it is a
table or view, you can query or edit the data.
The Code Assistant automatically provides information about database objects as you type their name. In the screenshot
above you can see that all columns of the emp table are displayed when the cursor is located after the "." of the table
name. You can now select a column name, or continue typing to filter the column list. The Code Assistant will provide a
parameter list for functions and procedures, will display a list of all elements of packages, will display a column list for
tables and views, and will display all objects owned by a user.
Compiler Hints will help you increase the quality of your code, and can help you find errors that you would normally only
find at run-time. You will receive hints about unused declarations (e.g. a local variable that is not used), unused value
assignments, comparisons with NULL, functions without a return statement, and implicit date conversions.
The PL/SQL Beautifier allows you to format your PL/SQL code through a user-defined set of rules. Your code can
automatically be beautified when you compile, save, or open a file.
The Code Contents shows all functions, procedures, variables, constants, types, parameters, and exceptions defined in a
program unit. This is most useful in large package or type bodies, which can contain thousands of lines of code. You can
quickly navigate through such a source file by clicking on an element in the Code Contents.
The Browse Buttons allow you to browse back and forward between bookmarks that are automatically maintained as you
navigate through your PL/SQL code. Whenever you jump to an absolute location, a navigation bookmark is added. This
happens when you search, click on a compilation error, click in the Code Contents, or move to the start or the end of the
source.
Hyperlink Navigation allows you to quickly find an object declaration. Press the Control key and click on an object name in
the editor, and you will navigate to its declaration. This can be a variable, a parameter, a type, a function or procedure
call, a view, an exception, and so on.
The PL/SQL Editor can also be used to edit Java Source code in an Oracle8i database.

Integrated Debugger (requires Oracle 7.3.4 or later)


The integrated debugger offers all features you could wish for: Step In, Step Over, Step Out, Run Until Exception,
Breakpoints, View & Set Variables, View Call Stack, and so on. You can debug any program unit without making any
modification to it, including triggers and Oracle8 object types.

The Integrated Debugger is a very powerful tool for those problems that are hard to fix. And yet it is very easy to use. No
extra actions or conversions are needed and no limitations exist. Just execute the program unit in the Debugger and step
through your code. You can step into any program unit, including triggers and types. Breakpoints can be set or removed
by simply clicking in the left margin of the Debugger or Program Editor. You can additionally define conditions and
messages for breakpoints.
Variable values can be examined in the Debugger by moving the mouse cursor over the variable name in the source. In
the screenshot above, the mouse cursor is moved over the 'p_DeptNo' variable and its value is automatically displayed in
a popup. You can set the value of a variable in a similar way.
When an exception occurs, the Debugger will take you to the line that causes it and you are able to view variable values
at the time of the exception. This can obviously be very helpful to find the cause of the exception.
On Oracle8i or later, you can use the Test Window's Trace facility to trace the execution of your PL/SQL code. You can
configure which events you want to trace: Calls, Exceptions, SQL, or even every executed line of PL/SQL code.

Query Builder
The graphical Query Builder makes it easy to create new select statements or modify existing ones. Just drag and drop
tables and views, select columns for the field list, where clause and order by clause, join tables based on foreign key
constraint definitions, and you're done.

The Query Builder can be used from within any editor to create or modify select statements. Simply drag tables and views
from the Object Browser on the left, and drop them into the work area on the right. If foreign key constraints exist between
the tables, you are automatically asked if they should be used for join conditions.
The columns can be selected for the field list, where clause and order by clause in the bottom section of the Query
Builder.
For a select ... into statement, you can select PL/SQL variables from the context of the PL/SQL Editor that started the
Query Builder. All global and local variables from the PL/SQL program unit can simply be selected from a list.
Various preferences affect the layout of the generated select statement, such as alignment, margin, case, and so on.

PL/SQL Beautifier
The PL/SQL Beautifier allows you to format your SQL and PL/SQL code through a user-defined set of rules. Your code
can automatically be beautified when you compile, save, or open a file. This feature will increase your coding productivity
and will improve the readability of your PL/SQL code if you are working in large project teams.

The PL/SQL Beautifier allows you to format your SQL and PL/SQL code through a user-defined set of rules. Your code
can automatically be beautified when you compile, save, or open a file.
This feature will increase your productivity, since you do not have worry about the format of your code when you create it,
or reformat it when you make modifications. The PL/SQL Beautifier will also improve the readability of your code, due to
its consistency. This is most important when you work in large project teams. If you frequently spend several minutes
reformatting your colleague's code before making any real modifications, then you know what we are talking about.

SQL Window
The SQL Window allows you to enter any SQL statement and view or edit the results in a grid, which supports a Query
By Example mode to search specific records in a result set. You can easily recall previously executed SQL statements
from a history buffer. The SQL editor provides the same powerful features as the PL/SQL Editor.

With the SQL Window you can execute any SQL statement. You can recall, edit and re-execute all previously executed
statements. For select statements you can view the results in a grid or in a single record form, and can update, insert or
delete records easily. The Query By Example mode makes it easy to search specific records in the result set. The results
(or a selection of the results) can also be printed, copied to the clipboard or saved as a CSV, TSV, XML or HTML file.
The Linked Query feature makes it easy to query a parent record or child records of the selected record, based on foreign
key definitions. Just press the Linked Query button, select the foreign key from the list, and a query for the corresponding
record(s) is executed in the same SQL Window or in a new one.
The SQL Editor has the same powerful features as the PL/SQL Editor. For optimization purposes you can view the
resource usage of each executed SQL statement on the Statistics page.

Command Window
To develop and execute SQL scripts you can use PL/SQL Developer's Command Window. This window has the same
look and feel as SQL*Plus, and additionally has a built-in script editor with corresponding syntax highlighting. Now you
can develop your scripts without the "edit script / save it / switch to SQL*Plus / run script" cycle, and without leaving the
comfortable PL/SQL Developer IDE.

The Command Window can be used to develop and execute SQL scripts, using the familiar SQL*PLus command syntax.
The built-in editor is a comfortable environment to develop your scripts, using SQL*Plus, SQL and PL/SQL syntax
highlighting. It has the same powerful features as the PL/SQL Editor, such as the Code Assistant, the Object Popup
Menu, and so on. You can quickly switch between the script editor and the command line by clicking on the tabs at the top
of the window.
Just like with SQL*Plus you can interactively type single commands and SQL statements on the command line. Error
messages are displayed in red, and the error location is underlined in red as well. This makes it easy to find and identify
errors.

Reports
To run reports against your application data or against the Oracle dictionary, you can use PL/SQL Developer's built-in
Report functionality. There are a number of standard reports, and you can easily create your own custom reports. These
custom reports can be saved in a report file, which can in turn be included in the reports menu. This makes it very easy to
run your own frequently used custom reports. You can use the Query Reporter freeware tool to run your reports without
PL/SQL Developer, and to run them from the command-line.

The Report Window is very easy to use, and yet it can provide all information that is available in your own application
tables or in the Oracle Dictionary in a structured layout that is pleasant to the eye.
At design-time you merely need to provide a select statement that provides the data. You can of course use the powerful
features of the SQL Editor and the Query Builder to write this select statement.
You can use an advanced form of substitution variables in your SQL, so that you can provide some input when the report
is run. For each variable you can specify a description, hint, data type, default value, selection list, checkbox values, and
so on.
After you are satisfied with the query of the report, you can modify the layout of its result set. You can define master/detail
and break structures, change colors, fonts, alignment, descriptions, and so on. The layout is formatted in HTML, which
allows you to use any HTML and CSS attributes. You can use a Style Library to define commonly used report styles.
The report results can be saved in an HTML file, so that you can view it through a Browser at a later time, or include it in a
document, or send it to others. The design-interface of the report will be hidden when you run a report, so that you can
focus on the information.
The security options of a report allow you to provide reports to others that need to be executed through a privileged
Oracle account (e.g. SYS), without providing the password of this account.

Projects
To organize your work you can use PL/SQL Developer's built-in project concept. A project consists of a collection of
source files, database objects, notes, and options. It allows you to work within the scope of a specific set of items, instead
of a complete database or schema. This makes it easy to find the project items you need, to compile all project items, or
to move a project from one location or database to another.

The project keeps track of a lot of project specific information. You can define how you want to connect when this project
is opened, you can define the items that make up the project, you can keep notes for the project, and the desktop
configuration is maintained. If you reopen a project, all items that were opened when the project was previously closed will
be opened at the same position.
The project items can be source files of PL/SQL program units, Test Scripts, SQL Scripts, Reports, and so on. A project
item can also be an object that is stored in the database, and that does not have a representation in a source file. For
each item you can define if it should be included in the compilation process of the project.

Object Browser
This configurable tree-view displays all information that is relevant to PL/SQL development. Use it to get object
descriptions, to view object definitions, to create test scripts for the debugger, to enable and disable triggers and
constraints, to recompile invalid objects, to query or edit table or view data, to search for text in object sources, to drag
and drop object names into an editor, and so on. The Object Browser additionally displays dependencies among objects,
and lets you recursively expand these dependant objects (e.g. package references view, view references table, and son
on).

You can keep the Object Browser available at all times in PL/SQL Developer. It gives you access to all information that is
relevant to PL/SQL development:

Create, duplicate, view, edit, rename and drop objects.

View properties and descriptions of functions, procedures, packages, types, triggers, java sources, tables,
constraints, indexes, views, sequences, and so on.

View reference information: which objects are referenced by an object, and which objects does an object
reference. You can also quickly compile all referencing objects that have become invalid.

Enable and disable triggers and constraints.

View user privileges, role privileges and synonyms for all objects.

Query and edit the data of tables and views.

Find objects by searching for text in the database source.


You can configure which objects are visible in the Object Browser by defining Browser Filters. You can easily switch
between these filters with a dropdown list. In the screenshot to the left a filter called 'My objects' is used, which displays all
objects that are owned by the current user.
You can also configure which object types (folders) are be visible in the Object Browser, and in which order they appear.
The 'Recent Objects' folder makes it easy to find objects you have recently used.

Performance Optimizing
1. PL/SQL Profiler
To optimize the performance to your SQL and PL/SQL code, you can use the PL/SQL Profiler to view timing
information of each executed line of PL/SQL code (Oracle8i and later). Furthermore you can automatically get
statistics on executed SQL statements and PL/SQL programs. These statistics can include CPU usage, block I/O,
record I/O, table scans, sorts, and so on.

The PL/SQL Profiler is a very powerful tool to help you optimize your PL/SQL code, which is available on Oracle8i and
later. For each executed line of code, the total time, maximum time, minimum time, and the number of occurrences will be
determined.
The Profiler is easily accessible in the Debugger's Test Window. Before executing a Test Script, simply press the Create
Profiler report button on the toolbar. If you subsequently execute the script, you can switch to the Profiler page to view the
report.
2. Statistics
In the SQL Window and in the Debugger's Test Window you can use the Statistics page to view the resources used by the
last executed SQL statement or program unit. This information can be a big help when optimizing your SQL or PL/SQL
code. Make a change, re-execute it, and view the statistics to determine the effects.
The screenshot above is an example of the statistics you may expect. You can use a preference setting to add any
statistic that Oracle provides. The statistics that are available depend on the version of the Oracle Server you are using.

HTML Manuals
Oracle currently supplies on-line manuals in HTML format. You can integrate these manuals into PL/SQL Developer's
environment to provide context sensitive help during editing, compilation errors, and runtime errors.

PL/SQL Developer can provide context sensitive help through Oracle's on-line HTML Manuals in three ways:

In the PL/SQL Editor and SQL Editor you can press F1 to search for the currently selected word.

In the PL/SQL Editor you can double-click on a compilation error to jump to the corresponding paragraph in the
Error Messages manual. The screenshot above is an example of this.

Whenever a runtime error occurs, a Help button allows you to jump to the corresponding paragraph in the Error
Messages manual.
You can make a selection of manuals that you want to use for context sensitive help. Manuals that are typically relevant
during PL/SQL Development are the SQL Reference, PL/SQL Reference, Error Messages, Application Developer's Guide
and Server Reference. With the proper manual selection, all information that you need is immediately available

Non-PL/SQL Objects
You can view, create and modify tables, sequences, synonyms, libraries, directories, users and roles without using any
SQL. Just enter the information in an easy to use form, and PL/SQL Developer will generate the appropriate SQL to
create or alter the object.

During PL/SQL development you will often want to view, modify or create other objects. For tables, sequences,
synonyms, libraries, directories, users and roles you can do so without using any SQL. Simply right-click on an object in
the Object Browser or in your source file, and select 'View' or 'Edit' from the popup menu.
After creating a new object, or after making changes to an existing object, the SQL statements to apply these changes to
the databases can be viewed, edited, copied, saved or exported to a Command Window. You can of course also execute
the SQL by pressing the 'Apply' button.
The screenshot above shows the columns page of table definition editor for table EMP.

Template List

PL/SQL Developer's Template List can be a real time-saver and can help you enforce standardization. Whenever you
need to insert some standard SQL or PL/SQL code into an editor, and whenever you need to create a new program file
from scratch, just click on the corresponding template.

Templates are a powerful feature to quickly insert standard SQL and PL/SQL code into an editor, or to create a new
program unit. This will not only save time (you don't need to lookup the syntax anymore), but it will also enforce
standardization. PL/SQL Developer comes with a number of pre-defined templates, but you can also define your own
templates. They are organized in a hierarchical structure, so that you can easily find the template you need. A template
can prompt a user to specify the values of certain variables. These variables can be represented as check boxes and
suggestion lists, which in turn can be populated by queries. You can also use pre-defined variables such as the date,
time, user, and so on.

Compare User Objects


After making changes to table definitions, views, program units, and so on, it may be useful to propagate these changes
to another database user, or to find out what exactly the differences are. This maybe another development environment, a
testing environment, or a production environment. The Compare User Objects function allows you to compare a selection
of objects, to visualize the differences, and to execute or save a SQL script that will apply the necessary changes.

On the Selection tab page you can select the objects you wish to compare. After making this selection, you can select the
user and database that you want to compare. When the compare operation is finished, the dialog will switch to the
Differences tab page, which will show a list of all objects that are different. This list is sorted in order of dependency.
Below the list of different objects of the target user, you see the SQL that needs to be executed to apply the changes. In
the example above, the ENAME column was changed, and the EMP_MGR_FK foreign key constraint and
EMP_MGR_CHECK check constraint were added to the EMP table.
You can display a visual line-by-line difference of the old and new source file of an object. This can be useful to view the
changes made in Program Units, or can help you determine why a specific DDL statement was generated for other object
types. You can configure which difference tool should be used. The ExamDiff utility is distributed with PL/SQL Developer,
and will be used by default:

Now you can see what the exact difference between the 2 object versions is, and why the DDL was generated by the
Compare User Objects tool.

Export User Objects


To export the DDL (Data Definition Language) statements of a selection of objects of a user, you can use the Export User
Objects tool. This way you can easily recreate the objects for another user, or you can save the file(s) as a backup.

After selecting the objects you wish to export, and selecting an output file, you can press the Export button to export the
objects.
The output file is a SQL script that is compatible with Oracle's SQL*Plus, and with PL/SQL Developer's Command
Window. The Include Privileges option can be enabled if you want to include the grants of the object privileges to other
users and roles.
You can control whether a single SQL script is created that contains the DDL for all objects, or if each object should be
exported to a specific file (with the object name as filename, and .sql as extension). In that case the output file will contain
a series of calls to these object specific files.

Tools

PL/SQL Developer includes several tools to make everyday development easier. You can recompile all invalid objects,
search for text in database sources, import and export tables, monitor dbms_alert and dbms_pipe events, view session
information, and so on.

PL/SQL Developer provides a powerful search function to find specific text in database sources. You can perform a case
sensitive search, use regular expressions, search for whole words only and limit the object types to search in. From the
object list you can immediately view, edit, recomplile or drop the object.
The actual search is performed in the background, so that you can continue doing other work while the search is running.
Search progress is indicated at the bottom of the form.

During development you will often make changes that invalidate related objects. To determine which objects are invalid
and to recompile these objects, you can use the 'Compile Invalid Objects' function. After recompilation you can quickly
determine which objects are still invalid and what compilation errors they have. From the object list you can immediately
view, edit, recomplile or drop the object.

Plug-In extensions

The functionality of PL/SQL Developer can be extended through Plug-Ins. We supply Plug-Ins on the Add-ons page that
you can download without any extra costs. Plug-Ins can be provided by Allround Automations (such as the Version
Control Plug-In or the plsqldoc Plug-In) or by other users. If you have a programming language that can create DLL's, you
can even write your own Plug-Ins.

The Version Control Plug-In provides a tight integration between the PL/SQL Developer IDE and any Version Control
System that supports the Microsoft SCC Interface Specification. This includes most popular Version Control Systems
such as Microsoft Visual SourceSafe, Merant PVCS and MKS Source Integrity. The Plug-In offers the following benefits:

Improve productivity - You can quickly perform any VCS operation on the currently opened file in the PL/SQL
Developer IDE, like check out, check in, get, add, view differences, and so on. Operations on multiple files will
immediately be reflected in PL/SQL Developer's IDE.

Minimize errors - Because you can work from one single IDE, the chance is minimized that you operate on the
wrong file or that you forget a file
When the VCS Plug-In is installed, you will get a new VCS item in the main menu that contains all relevant VCS functions.
In addition to this, the Program Window, SQL Window,Test Window and Command Window get several new VCS related
items in theircontext menu. You can check in, check out, undo check out, get, add and remove the corresponding file, if
appropriate.

This Plug-In allows you to generate HTML documentation for functions, procedures, packages, types, tables and views.
The documentation is derived from the definition and the comments of these objects, in a similar way as Javadoc for the
Java programming language.
The Plug-In also allows you to quickly view object documentation from within the PL/SQL Developer IDE, by simply
clicking on an object name in a SQL or PL/SQL source file, or from within the Object Browser. A global documentation
index and the hyperlinks within each HTML document provide easy navigation. The Plug-In offers the following benefits:

Increased documentation quality - You no longer need to create and maintain separate documentation for
your database objects, but merely need to write the appropriate comments within each object. The
documentation generation is effortless, and this ensures that the documentation is always in sync with the latest
developments. It also ensures a consistent layout of all documentation.

Increased productivity - The user of the documentation can easily find a document and related documents,
thanks to the tight integration with the PL/SQL Developer IDE and the hyperlinks. The author of the
documentation benefits from the generation process.
When the plsqldoc Plug-In is installed, you will get a new plsdoc item in the Tools menu that contains all plsqldoc
functions to generate and view documentation. These functions are also available in various popup menus and the main
toolbar.

Multi-threaded IDE
PL/SQL Developer is a multi-threaded IDE. This means that you can continue to work as SQL queries are executing,
PL/SQL programs are executing, debug sessions are running, and so on. It also means that the IDE will not "hang" if you
make a programming error: you can break execution or save your work at any time.

Easy installation
No middle-ware required other than SQL*Net. No database object installation. Just a simple one-button installation
procedure and you're ready to use it.

System requirements

PL/SQL Developer will run on Windows 95, 98, ME, NT4, 2000 and XP. The supported Oracle Server versions
are 7.x, 8.x, 8i and 9i on any platform. To connect to an Oracle database, PL/SQL Developer requires a 32-bit
SQL*Net or Net 8 or Net 9 version. Trial version You can download a fully functional 30-day trial version to try
out PL/SQL Developer yourself. If after 30 days you can't imagine how you've ever been able to work without
PL/SQL Developer.

You might also like