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.
| 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 AthalyeIndia."The IMPOSSIBLE is often UNTRIED" |
 |
|
|
shallu1_gupta
Constraint Violating Yak Guru
394 Posts |
Posted - 2007-07-10 : 07:25:53
|
| select count(*) from sysobjects where xtype = 'P' |
 |
|
|
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] |
 |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2007-07-10 : 07:27:28
|
 KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
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. |
 |
|
|
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] |
 |
|
|
|
|
|