Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 user stored procedures

Author  Topic 

msrs

32 Posts

Posted - 2007-07-10 : 07:17:23
Dear all,
How to find out how many user stored procedures are there in a single Database in sql server.


Thanks,
msrs

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2007-07-10 : 07:24:49
[code]select Count(*) from information_schema.routines where routine_type = 'PROCEDURE'[/code]

Harsh Athalye
India.
"The IMPOSSIBLE is often UNTRIED"
Go to Top of Page

shallu1_gupta
Constraint Violating Yak Guru

394 Posts

Posted - 2007-07-10 : 07:25:53
select count(*) from sysobjects where xtype = 'P'
Go to Top of Page

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2007-07-10 : 07:26:52
[code]select count(*) from sysobjects where xtype = 'P'[/code]


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2007-07-10 : 07:27:28



KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page

msrs

32 Posts

Posted - 2007-07-10 : 07:38:52
i know this query but it will return all stored procedures(userdefined sp,system sp) in the database,
but i want only userdefined sp.any body plz answer my question.
Go to Top of Page

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2007-07-10 : 07:43:35
[code]select count(*) from sysobjects where xtype = 'P' and category <> 2[/code]


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page
   

- Advertisement -