SELECT
name, definition
FROM sys.sql_modules AS m
INNER JOIN sys.all_objects AS o ON m. object_id = o. object_id
WHERE o. [ type ] = ' P '
FROM sys.sql_modules AS m
INNER JOIN sys.all_objects AS o ON m. object_id = o. object_id
WHERE o. [ type ] = ' P '