How to get list of user defined stored procs from all databases...

  • Hi All,

     I have list of my databases from master.dbo.sysobjects  and query to get list of stored proc  names from a given database like

    SELECT name

    FROM sysobjects

    WHERE 

       type ='P'

     AND 

       name not like 'dt_%' 

     ORDER BY name

    but unable to get all stored procs from All databases!!!

    Is there a way? Even looping thru each database and creating temp table is also ok. My database is SQL server 2000.

     

     

  • sp_msforeachdb '?..sp_stored_procedures'

    sp_msforeachdb is an undocumented procedure

  • EXEC sp_Msforeachdb "SELECT name FROM ?..sysobjects WHERE  type ='P' AND name not like 'dt_%'"

     

     

    -Krishnan

  • Thanks for quick reply. Now I can add my more conditons to it. Thanks again.

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply