SQL list a Databases Stored Procedures
SQL list a Databases Stored Procedures
As an Accidental DBA, I don’t do specific tasks regular enough to remember where or how to find things. Case in point stored procedures. I believe I have looked them up twice in the past year. Each time I have had to Google how to find them. Hopefully the next time I need to do this I either remember or remember to look here.
Without further ado, this is where you can find a databases stored procedures.
- Open SMSS
- Expand databases
- Expand databases
- Expand Programmability
- Open Stored Procedurs
And there you go, a list of stored procedures stored in the database.
Or Run this SQL Script
USE Database_MSCRM
SELECT obj.Name as SPName,
modu.definition as SPDefinition,
obj.create_date as SPCreationDate
FROM sys.sql_modules modu
INNER JOIN sys.objects obj
ON modu.object_id = obj.object_id
WHERE obj.type = 'P'
ORDER BY SPName
http://www.sqlservercurry.com/2009/03/list-all-stored-procedures-of-database.html
Enjoy
Jeff