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 |
|
cruxmagi
Starting Member
38 Posts |
Posted - 2008-07-25 : 09:06:37
|
| Could you tell me how to count the count of existing storedprocedures.For example if my "test" database has 10 atoredprocedures,how can i get the 10 using qry |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2008-07-25 : 09:17:52
|
| select count(*) from sysobjects where xtype='p'MadhivananFailing to plan is Planning to fail |
 |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2008-07-25 : 09:17:53
|
[code]select count(*) from sys.procedures[/code] KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
VGuyz
Posting Yak Master
121 Posts |
Posted - 2008-07-25 : 09:18:11
|
| By using the below query,you can get the stored procedure in your databaseselect * from sys.procedures this query returns some of the system procedures.You can check it out with SP_helptext stored_procedure_name |
 |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2008-07-25 : 09:18:40
|
by 1 sec KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
cruxmagi
Starting Member
38 Posts |
Posted - 2008-07-25 : 09:28:46
|
quote: Originally posted by madhivanan select count(*) from sysobjects where xtype='p'MadhivananFailing to plan is Planning to fail
The above query is failed to count the CLR procedures |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-07-25 : 10:36:18
|
quote: Originally posted by cruxmagi
quote: Originally posted by madhivanan select count(*) from sysobjects where xtype='p'MadhivananFailing to plan is Planning to fail
The above query is failed to count the CLR procedures
select count(*) from sys.objects where type in('p','pc') |
 |
|
|
|
|
|