Chapter 5 Building Triggers and Procedures


Generating Triggers and Procedures

You can create or modify database triggers and procedures directly using an ODBC driver or indirectly using a script.

Steps To generate triggers and procedures:

  1. Select Database→Generate Database to open the Database Generation window, and specify the standard options, including whether you want to generate a script or generate directly to an ODBC connection.

    For detailed information about using this window, see the "Generating a Database" section in the "Generating a Database from a PDM" chapter.
  2. Select "Triggers & Procedures (with Permissions)" from the Settings set list in the Quick Launch groupbox at the bottom of the window. This settings set specifies standard options for generating triggers and procedures.

    or:

    Click the Options tab and click on Trigger in the left-hand pane to display the trigger generation options. Change the default options as appropriate.

    For detailed information about settings sets, see the "Quick launch selection and settings sets" section in the "Generating a Database from a PDM" chapter.
  3. [optional] Click the Selection tab and select the Table or Procedure subtab at the bottom of the page. Select the tables or procedures that you want to generate for. Note that if you want to generate a trigger script for tables owned by a particular owner, you can select an owner from the Owner list.
  4. Click OK to begin the generation.

 


Copyright (C) 2005. Sybase Inc. All rights reserved.