Database Development uses the Eclipse launch configuration mechanism to run stored procedures, triggers, and Adaptive Server Anywhere/Sybase IQ user-defined functions and events.
The tooling creates a launch configuration automatically using the name, connection profile name and type, and object type from the procedural 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 procedural objects.
To create a launch configuration for a procedural object:
Expand the Adaptive Server Anywhere, Adaptive Server Enterprise, or Sybase IQ connection profile in Database Explorer and open a stored procedure, trigger, user-defined function or event in SQL Editor, either by double-clicking the object or by selecting it, right-clicking it, and selecting Edit.
Select Run|Run from the Sybase WorkSpace toolbar to invoke the Launch Configuration wizard.
The Create, Manage, and Run Configuration 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.
Click New under the Configurations explorer.
Enter a unique name for the launch configuration in the Name field.
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.
For Ad hoc SQL, modify the SQL statement in the Run dialog manually, or click SQL to use Visual SQL.
(Optional) Click Configure Parameter... and assign values to any parameters in the Configure Parameters dialog.
To revert all values to their defaults click Load Defaults. Click 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.
(Optional) Click the Options tab and click User customize to override any connection-level option preferences.
(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 procedural object you are launching.
Common launch configuration attributes
Field | Explanation |
---|---|
Save as | Specify where to save the launch configuration:
|
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:
|
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. |
Click Apply to accept launch configuration changes, or Revert to reset them.
Click Run to execute the procedural object.
SQL Editor displays the object if it is not open already. Results appear in SQL Results view.
Setting Connection-Level Option Preferences
Send your feedback on this help topic to Sybase Tech Pubs: pubs@sybase.com