October 23, 2012 at 1:00 pm
When you run a sql statement, in Server Management Studio, it tells you how many rows and how long it took, how do you get a stored Proc to capture this info in the Job history?
So if you have a Stored Proc that runs two statements: Select - into statement.. and an insert into statment.. it would log how long each took and how may rows each statement inserted.
October 23, 2012 at 1:47 pm
dwilliscp (10/23/2012)
When you run a sql statement, in Server Management Studio, it tells you how many rows and how long it took, how do you get a stored Proc to capture this info in the Job history?So if you have a Stored Proc that runs two statements: Select - into statement.. and an insert into statment.. it would log how long each took and how may rows each statement inserted.
Look up @@RowCount in BOL for number of rows affected.
For execution times, just capture getdate() before and after the statements are executed and do a quick calculation.
The absence of evidence is not evidence of absence.
Martin Rees
You can lead a horse to water, but a pencil must be lead.
Stan Laurel
October 24, 2012 at 12:08 pm
Ok, thanks... will do.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply