December 17, 2015 at 12:51 pm
Hi Guys,
Anyone have any custom script to get a list of all SPs in all user databases excluding system SPs.
Thanks in advance.
Regards,
SQLisAwe5oMe.
December 17, 2015 at 1:08 pm
Try something like this...
CREATE TABLE #procList (procCatalog VARCHAR(256), procSchema VARCHAR(256), procName VARCHAR(256))
INSERT INTO #procList
EXEC sp_MSforeachdb
'SELECT ROUTINE_CATALOG, ROUTINE_SCHEMA, ROUTINE_NAME
FROM ?.information_schema.routines
WHERE routine_type = ''PROCEDURE'''
SELECT * FROM #procList WHERE procCatalog NOT IN ('msdb','master')
DROP TABLE #procList
December 17, 2015 at 1:16 pm
You can query sys.procedures as well.
December 17, 2015 at 9:48 pm
This can also help to list procedure
select * from sys.all_objects where type='p' and is_ms_shipped=0
but it does not list system procedures:
December 17, 2015 at 9:53 pm
Thank you all.
Regards,
SQLisAwe5oMe.
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply