# Creating a Launch Configuration for Routine Objects

Use the launch configuration feature to run stored procedures, triggers, and ad hoc queries. Creating your own launch configurations is optional, but it can help you perform more consistent, robust, and efficient iterative testing of routine objects.

DTP creates a launch configuration automatically using the name, connection profile name and type, and object type. You can create additional launch configurations with different launch properties. For example, you can specify different parameters or ad hoc SQL statements.

1. Select Run > Run Configurations from the main menu.
2. Click New Launch Configuration.

   You can also choose an existing launch configuration by selecting it in the left pane. You can edit it, or duplicate it and use it as a basis for a new configuration.

3. Enter a unique Name for the launch configuration.
4. On the Main tab, select a connection Profile and a Database.
5. Select the object Type.
6. If basing the launch configuration on an existing object, click Browse to select the object.
7. In the Run box, complete the execution information.

   Object | Description
   --- | ---
   Stored procedures | Click Configure Parameter, and assign values to any parameters.
   Triggers | Enter an INSERT, UPDATE, or DELETE statement, or click SQL to visually build the statement using SQL Query Builder.
   Ad hoc SQL | Enter the SQL statement, or click SQL to visually build the statement using SQL Query Builder.

8. (Optional) Click the Options tab to set additional preferences, if the database server support this feature.
9. (Optional) Click the Common tab to set other attributes for this object.

   Table 1. Common launch configuration attributes
   Field | Explanation
   --- | ---

   Save As

   Specify where to save the launch configuration:

   - Select Local File to make it available to this project only.

   - Select Shared File to make it available to other projects.

   Display in Favorites Menu | Click Debug or Run to display the configuration in a Favorites menu.
   Console Encoding | (Optional) Click Other, and select an encoding to override Export Format preferences.
   Standard Input and Output: Allocate Console | Select Allocate Console if the object requires input (default).

   Standard Input and Output: File

   (Optional) Click File to choose a location for file output:

   - Click Workspace to select a project resource to which to redirect output.

   - Click File System to save the output as a file.

   - Click Variables to select and configure a variable for output.

   Standard Input and Output: Append | (Optional) Click Append to append output from each launch to the existing file. Otherwise, each launch overwrites previous output.
   Launch in Background | Indicates that the object runs in the background.

10. Click Apply to accept launch configuration changes.
11. Click Run to execute the object.

    Results appear in SQL Results view.

Related concepts
Routine Objects
Related tasks
Running a Routine Object
Viewing SQL Results