SYSPROCEDURE system table

CREATE TABLE SYS.SYSPROCEDURE (
	proc_id	 UNSIGNED INT NOT NULL,
	creator	 UNSIGNED INT NOT NULL,
	proc_name	 CHAR(128) NOT NULL,
	proc_defn	 LONG VARCHAR,
	remarks	 LONG VARCHAR,
	replicate	 CHAR(1) NOT NULL,
	srvid	 INT NOT NULL,
	source	 LONG VARCHAR,
	avg_num_rows	 FLOAT,
	avg_costs	 FLOAT,
	stats	 LONG BINARY,
	PRIMARY KEY ( proc_id ),
	UNIQUE ( proc_name, creator ),
	FOREIGN KEY ( creator ) REFERENCES
		SYS.SYSUSERPERM ( user_id )
)

Each procedure in the database is described by one row in SYSPROCEDURE.

proc_id Each procedure is assigned a unique number (the procedure number) that is the primary key for SYSPROCEDURE.

creator This user number identifies the owner of the procedure. The name of the user can be found by looking in SYSUSERPERM.

proc_name Name of the procedure. One creator cannot have two procedures with the same name.

proc_defn Command used to create the procedure.

remarks A comment string.

replicate Holds a Y if the procedure is a primary data source in a Replication Server installation, and an N if not.

srvid If a procedure on a remote database server, indicates the remote server.

source Contains the original source for the procedure if the PRESERVE_SOURCE_FORMAT option is ON. It is used to maintain the appearance of the original text. For more information, see “PRESERVE_SOURCE_FORMAT option [database]”.

avg_num_rows Information collected for use in query optimization when the procedure appears in the FROM clause.

avg_cost Information collected for use in query optimization when the procedure appears in the FROM clause.

stats Information collected for use in query optimization when the procedure appears in the FROM clause.