Getting Information About Stored Procedures

To display the text used to create the procedure, execute the sp_helptext system stored procedure (in the database where the procedure exists) with the procedure name as the parameter.

Note Procedures created with the ENCRYPTION option cannot be viewed with the sp_helptext system stored procedure.

For a report on the objects referenced by a procedure, use the sp_depends system stored procedure.

To rename a procedure, use the sp_rename system stored procedure.

Permission

CREATE PROCEDURE permission defaults to the database owner, who can transfer it to other users. Permission to execute a stored procedure is given to the procedure owner, who can grant execution permission on it to other database users.