System Procedures

The names of all system procedures begin with “sp_”. They are located in the sybsystemprocs database, but you can run many of them in any database by issuing the stored procedure from the database or by qualifying the procedure name with the database name.

SAP-supplied system procedures (such as sp_who) are created using the installmaster installation script. Use sp_version to determine the version of installmaster that was most recently executed. See the Reference Manual: System Procedures for more information about sp_version.

If you execute a system procedure in a database other than sybsystemprocs, the procedure operates on the system tables in the database from which it was executed. For example, if the database owner of pubs2 runs sp_adduser from pubs2 or issues the command pubs2..sp_adduser, the new user is added to pubs2..sysusers. However, this does not apply to system procedures that update only tables in the master database.

Permissions on system procedures are discussed in the Reference Manual: Procedures.