System Procedures

SAP® Adaptive Server® Enterprise system procedures are similar to the stored procedures that you create using the Transact-SQL® language, but are supplied in SAP® ASE to use for updating and getting reports from system tables.

System procedures are created by installmaster at installation. They are located in the sybsystemprocs database, and owned by the system administrator. Use sp_version to determine which version of installmaster was most recently run.

Some system procedures can only run in a specific database, but many of them can run in any database. You can create your own system procedures to execute from any database.

You can declare up to 10,000 variables in a stored procedure.

All system procedures:
  • Execute at isolation level 1.

  • Report a return status that indicates whether or not they completed successfully, and if they did not, the reasons for failure.

    The following example means that the procedure executed successfully:
    return status = 0 

    The examples in this book do not include the return status.

For more information:
  • About creating your own system procedures, see the System Administration Guide.

  • About the return values for system procedures, see Return Values in the Transact-SQL User’s Guide.