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 |
|
kotsas
Yak Posting Veteran
65 Posts |
Posted - 2002-03-01 : 04:46:12
|
| when I start trace to see sql statements that are executing, for stored procedures I receive only exec 'procedure name'. I like to trace sql statements inside stored procedure?How can I do that?Thanks |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2002-03-01 : 06:51:58
|
| I'm pretty sure this is not possible because the stored procedure is executed as a single entity, not as a bunch of T-SQL statements. I don't even know why you'd want to trace the statements within. If you need to know what's going on in the SP then test it with SET SHOWPLAN ON. |
 |
|
|
Teroman
Posting Yak Master
115 Posts |
Posted - 2002-03-01 : 07:16:57
|
| In the profiler properties you can select the events you wish to see, including the start and end of individual statements. Its on its own tab, the second one i think.If you dont see the events you want you can get a whole load more by going:Tools -> OptionsHere there is an option to show all event classes, just pick the ones you need so you dont get overwhelmed.col |
 |
|
|
kotsas
Yak Posting Veteran
65 Posts |
Posted - 2002-03-01 : 07:17:40
|
| i want to see percent of read and write activity |
 |
|
|
Teroman
Posting Yak Master
115 Posts |
Posted - 2002-03-01 : 08:00:11
|
| Um, I dont think its too crazy to recommend the Data Columns tab, it has reads and writes as options, pretty sure they are picked as default.No percentages, but I'm sure if you save it to a table a bit of basic maths wont prove too taxing.col |
 |
|
|
kotsas
Yak Posting Veteran
65 Posts |
Posted - 2002-03-01 : 08:08:51
|
| what i want to say is that I will count number of select, update, insert,delete to find read and write activity |
 |
|
|
efelito
Constraint Violating Yak Guru
478 Posts |
Posted - 2002-03-01 : 09:53:20
|
| I thought you could see the individual statements within a stored proc by adding the SP:StmtStarting and SP:StmtCompleted Events from the Stored Procedures Events section. I could be wrong as I've never tried this but that was my understanding.Jeff BanschbachConsultant, MCDBA |
 |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2002-03-01 : 10:10:49
|
Nice call Jeff, you're absolutely right! I totally missed those two. |
 |
|
|
|
|
|
|
|