SQL Server Performance

count the number of stored procedures

Discussion in 'SQL Server 2008 General Developer Questions' started by crprajan, Feb 23, 2009.

  1. crprajan New Member

    How to count the number of stored procedures inside a database using an sql query?
    please help
  2. johnson_ef Member

    HI Rajan,
    Try this:select
    * from sys.procedures -- to list out all the SPs in a databaseselect
    COUNT(*) from sys.procedures -- to get the count of the SPs in a database
    Regards
    -Johnson
  3. Madhivanan Moderator

    Alsoselect
    COUNT(*) from information_schema.routines where
    routine_type='procedure'
  4. FrankKalis Moderator

    Homework question? [;)]
  5. crprajan New Member

    Hey! Thank you very much. It is working fine
  6. crprajan New Member

    Thank you so much. It is working fine
  7. Sandy New Member

    you can also use this..select
    count(*) from sys.sysobjectswhere
    xtype = 'P'
    Thanks,
    Sandy.

Share This Page