# Creating a Launch Configuration for Routine Objects

Database Development uses the Eclipse launch configuration mechanism to run stored procedures.

The tooling creates a launch configuration automatically using the name, connection profile name and type, and object type from the routine object. You can create additional launch configurations with different launch properties. For example, you can specify different parameters or ad hoc SQL statements. Creating your own launch configurations is optional, but it can help you do more consistent, robust, and efficient iterative testing of routine objects.

1. Expand the database connection profile in Database Explorer and open a stored procedure in SQL Editor, either by double-clicking the object or by selecting it, right-clicking it, and selecting Edit.
2. Select Run > Run from the Eclipse toolbar to invoke the Run wizard.

   The Create, manage, and run configurations page appears. The tooling tries to connect using the connection profile and database in your most recent run. If that database is not available, the Error dialog appears. Click OK to continue.

3. Enter a unique name for the launch configuration in the Name field.
4. On the Main tab, specify the object for which you are creating a launch configuration:

   - Select a connection profile from the Profile drop-down list and a database from the Database drop-down list in the Profile frame.

   - Click the object type in the Type frame.

     The type determines which fields you complete in the remaining steps.

   - Click Browse, and select the object to be launched.

5. For Ad hoc SQL, modify the SQL statement in the Run dialog manually.
6. (Optional) Click Configure Parameter... and assign values to any parameters in the Configure Parameters dialog.
7. To revert all values to their defaults, click Load Defaults and then OK to return to the Create, Manage, and Run Configuration dialog.

   Database Development tooling tries to convert any value you enter that does not meet requirements for the parameter. Make sure the converted value is correct.

8. (Optional) Click the Common tab to set attributes that are common among most objects you can run in Eclipse.

   These values apply only to the routine object you are launching.

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

   Save as

   Specify where to save the launch configuration:

   - Choose Local file to make it available to this project only.

   - Choose 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 Browse Workspace to select a project resource to which to redirect output.

   - Click Browse 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 | Click to control whether the object runs in the foreground or background.

9. Click Apply to accept launch configuration changes, or Revert to reset them.
10. Click Run to execute the routine object.

    SQL Editor displays the object if it is not open already. Results appear in SQL Results view.

Related concepts
Routine Objects
Related tasks
Running a Routine Object