Previous Topic

Next Topic

Book Contents

Book Index

Manage Procedure or Trigger

This window is used for creating, displaying and altering a procedures, triggers, functions and some other objects. It is one of the forms of the Manage Object window. That section has general information about this window, including the use of the buttons and menu items.

This window is part of the Administration Component of AQT.

You can activate this window in the following ways:

The following is an example of the window for creating a DB2 stored procedure:

Manage Procedure

The window consists of three parts:

General Properties of the Procedure or Trigger

Displays the miscellaneous properties of the procedure / trigger. The properties you see here will be different depending on your database type.

Procedure Parameters

Click on the Parameters tab to enter the procedure parameters (eg. the parameters used when invoking the stored procedure).

This tab is only visible for procedures (and not functions or triggers), only for some databases. Also, for Oracle, it is only displayed for Create Procedure and not for Alter Procedure.

Text of Procedure or Trigger

This has the text of your trigger or stored procedure.

When you are creating a procedure, AQT will generate the header part of the procedure definition (eg. the Create Procedure clause). In the Procedure Text, you only need to enter the body of your procedure.

If you in doubt as to what AQT is generating versus what you have to enter, click on Preview SQL.

AQT doesn't provide any help with the syntax of creating stored procedures - for this you will need to consult the documentation for your database.

Warning - Altering a Procedure, Trigger or Function

When you alter a Procedure, Trigger or Function, AQT will do this by dropping the existing object then creating it with your new definition. If the Create fails, you will no longer have the object in your database.

In this case, do not exit this window or hit Refresh - otherwise the object will be gone forever.

You must correct the definition so that the object is created successfully. If you cannot do this, do a Preview and save the Create statement in a file to correct at a later time.

This warning does not apply to Oracle (for which AQT uses Create or Replace Procedure) or SQL Server (for which AQT uses Alter Procedure).

Advanced Query Tool
© 2023 Cardett Associates Ltd. All rights reserved.