Sets or shows procedure options.
sp_procoption [[@ProcName =] 'procedure']
[,[@OptionName =] 'option']
[,[@OptionValue =] 'value']
0 (success) or error number (failure)
Execute sp_procoption without procedure to display the list of available procedure options for all stored procedures.
Column name | Data type | Description |
---|---|---|
Option Status | int | Whether the option is on or off, or true or false |
Procedure Name | sysname | Name of the procedure |
Owner Name | nchar | Owner of the procedure |
Proc Type | char(2) | Procedure type: P or X |
Execute sp_procoption with option_name but without a value to display status for the procedure specified.
If no parameters are specified, sp_procoption returns this result set:
Available Proc Options Change-ability
----------------------------------- --------------
startup change-able
Execute permissions default to members of the sysadmin and setupadmin fixed server roles. Startup procedures must be owned by the database owner in the master database.