Set up a new procedure on a Sybase IQ server.
Prerequisites
- Authenticate with Sybase IQ using an account that has DBA or Resource authority.
- If you have DBA authority, you can create any type of procedure and assign any user as the owner.
- If you have Resource authority, you can create only Watcom SQL or Transact-SQL procedures (not external procedures), and all procedures you create are owned by you.
- (Optional) If you are creating a Java procedure, install the required Java classes and JAR files in the database. (You can create the procedure if the classes and JAR files are not installed, but Sybase IQ cannot execute the procedure.)
- (Optional) If you are creating a procedure that relies on a non-Java external environment, copy the library that contains the external procedure to a location accessible to the Sybase IQ server. (You can create the procedure if the library is not accessible to Sybase IQ, but Sybase IQ cannot execute the procedure.)
Task- In the Perspective Resources view, select the resource and select .
- In the Administration Console, expand .
- Select Procedures, click the drop-down arrow that appears to the right, and select New.
- In the Create Procedure wizard, select the Sybase IQ resource on which the procedure is to reside.
- Select a user or group to own the procedure.
- Enter a name for the procedure.
- Select the language or SQL dialect for the procedure. If you choose External environment, use the drop-down menu to select an environment.
- Check Use SQL template to insert a hardcoded SQL template. Leave the box unchecked to retrieve generated SQL from the back end.
- On the SQL page, edit the code provided by the wizard.
- For Watcom SQL and Transact-SQL, define input parameters in the format provided.
- For Watcom SQL, define the result in the format provided.
- For external languages, fill in the external name in the format provided.
- Enter procedure statements.
- Make any other changes needed to complete your procedure.
- (Optional) Enter a comment describing the procedure.
Comments can include both HTML and Javadoc tags, so you can incorporate them into your generated database documentation.
- Click Finish to save the procedure.
The new procedure appears in the Procedures list in the right pane of the Administration Console.