| Author |
Topic |
|
hirani_prashant
Yak Posting Veteran
93 Posts |
Posted - 2008-06-14 : 02:32:35
|
| Hi,I need to debug my Store Procedures with diff parameters at regaular intervals which shows me memory usage, CPU usage and other usage.Is there any way to do this? -- RegardsPrashant Hirani |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-06-14 : 04:15:18
|
| http://www.expresscomputeronline.com/20021118/techspace1.shtmlhttp://articles.techrepublic.com.com/5100-10878_11-1043670.html |
 |
|
|
hirani_prashant
Yak Posting Veteran
93 Posts |
Posted - 2008-06-16 : 02:05:34
|
| Thanks visakh,I need to run debug some store procedures from back end side [i.e. Database] only.I need some way from sql server 2005 which executes particular SP Continuously with different parameters. Is there any scripts or say any way which fulfill my requirenments?ThanksPrashant Hirani |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-06-16 : 02:10:28
|
quote: Originally posted by hirani_prashant Thanks visakh,I need to run debug some store procedures from back end side [i.e. Database] only.I need some way from sql server 2005 which executes particular SP Continuously with different parameters. Is there any scripts or say any way which fulfill my requirenments?ThanksPrashant Hirani
Do you mean generating random param values and running sp passing them? |
 |
|
|
hirani_prashant
Yak Posting Veteran
93 Posts |
Posted - 2008-06-16 : 02:31:11
|
| yes... |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-06-16 : 02:37:15
|
| Is your param values coming from fields of some table. Or do you just want to give some values. A small background explanation of your sp & what it does might help. |
 |
|
|
hirani_prashant
Yak Posting Veteran
93 Posts |
Posted - 2008-06-16 : 02:41:22
|
| Hi,Ya mine params values coming from fields of some table.ThanksPrashant |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-06-16 : 03:41:34
|
quote: Originally posted by hirani_prashant Hi,Ya mine params values coming from fields of some table.ThanksPrashant
Then loop through the table in a random manner and get param values and pass it to sp to get result in each case. |
 |
|
|
hirani_prashant
Yak Posting Veteran
93 Posts |
Posted - 2008-06-16 : 04:45:15
|
| Hi,Thanks...Not getting you. Can you please explain in detail?? |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-06-16 : 05:35:50
|
If you table is like(ID int primary key,field1,field2,....)then useSELECT TOP 1 @ID=IDFROm TableORDER BY NEWID()WHILE @ID IS NOT NULLBEGIN SELECT @Field1=Field1,@Field2=Field2,...FROm TableWHERE ID = @IDEXEC YourProc @Field1,@Field2,....INSERT INTO #ProcessedSELECT @IDSELECT TOP 1 @ID=IDFROm TableWHERE ID NOT IN(SELECT ID FROM #Processed)ORDER BY NEWID()END it will loop trough taking random records from table and executing procedure with them. |
 |
|
|
|