Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to debug a stored procedure?
Message
 
 
À
24/05/2012 17:13:35
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Stored procedures, Triggers, UDFs
Versions des environnements
SQL Server:
SQL Server 2005
Divers
Thread ID:
01544351
Message ID:
01544355
Vues:
27
>>>How do you debug a stored procedure which is called from .NET method? That is, I would like to see the variables passed and some other values.
>>>
>>>TIA
>>
>>You can run a profiler to get the exact call of this SP. Then you should be able to debug it from SSMS using that call.
>>
>>Also, are you able to debug from VS directly?
>
>I will have to read on how to run a profiler; I don't know how. Neither do I know if/how to debug from VS. A lot to learn.
>Thank you.

Simply go to Tools menu and select Profiler. Run the trace at the moment you're calling your SP in .NET. Stop the trace (click on stop button). Grab the exact command you'll see at the bottom pane. Copy this commant to SSMS and run to see result. Then put a breakpoint on that call and call Debug instead of Execute to debug it.
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform