February 23, 2009 at 4:27 am
How to count the number of stored procedures inside a database using sql query?
please help
February 23, 2009 at 4:59 am
use Sysobjects
SELECT COUNT(*) FROM sys.sysobjects
WHERE xtype = 'p'
February 23, 2009 at 6:32 am
Or, to avoid system tables which can and do change:
SELECT COUNT(*)
FROM INFORMATION_SCHEMA.ROUTINES AS r
WHERE ROUTINE_TYPE = 'PROCEDURE'
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
February 23, 2009 at 7:27 am
Or, using the 2005/2008 system views
SELECT COUNT(*)
FROM sys.procedures
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
September 11, 2010 at 3:58 am
SELECT COUNT(*)
FROM sys.procedures
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply