List stored procedures
list_proceduresLists user stored procedures in a SQL Server database with line, join, and referenced object counts to identify complex ones for review.
Instructions
Lists the user stored procedures the login can see, with line count, join count and number of referenced objects as rough complexity metrics. Use it to find procedures and pick the complex ones; for one procedure's text use get_procedure_definition. definition_visible is false, and the metrics null, for a procedure whose text is hidden from the login; referenced_object_count is null when the login cannot read dependencies. SQL Server leaves out procedures the login has no permission on without an error: get_database_overview says whether that happens, check_permissions why.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| schema | No | Filter by schema name. Empty means every schema. Example: 'Feeder' | |
| database | Yes | Name of the database as registered in the configuration. |