Answered by:
Print Progress for the Query

Question
Answers
-
SQL server does not offer any inbuilt functionality to achieve this. What you could do is create an audit table and log it
create table tblAudit(Procname varchar(100), startTime Datetime, endtime Datetime)
insert into tblAudit(Procname ,startTime ) values('MyProcedure1',getdate())
EXEC MyProcedure1
update tblAudit set endtime =getdate() where Procname ='MyProcedure1'
insert into tblAudit(Procname ,startTime ) values('MyProcedure2',getdate())
EXEC MyProcedure2
update tblAudit set endtime =getdate() where Procname ='MyProcedure2'
or you could use SQL profiler..
vt
Please mark answered if I've answered your question and vote for it as helpful to help other user's find a solution quicker
- Edited by v.vt Wednesday, August 13, 2014 9:38 PM
- Proposed as answer by Elvis LongMicrosoft contingent staff, Moderator Wednesday, August 20, 2014 9:58 AM
- Marked as answer by Kalman TothModerator Friday, August 22, 2014 12:36 AM
-
If you are looking for this in your DEV you can use this
SELECT GETDATE() EXEC MyProcedure1 SELECT GETDATE() EXEC MyProcedure2 SELECT GETDATE()
or You could use Statistics TimeSatheesh
My Blog | How to ask questions in technical forum
- Proposed as answer by Elvis LongMicrosoft contingent staff, Moderator Wednesday, August 20, 2014 9:57 AM
- Marked as answer by Kalman TothModerator Friday, August 22, 2014 12:36 AM
-
You can use Sql Server Profiler for this purposes it provides a lot of useful info along the each executed query and Stored procedure as well
SQL Profiler displays the execution time for each event
An other straightforward way:
print convert(varchar, getdate(), 21) EXEC MyProcedure1 print convert(varchar, getdate(), 21) EXEC MyProcedure2 print convert(varchar, getdate(), 21)
Please Mark This As Answer if it helps to solve the issue
- Proposed as answer by Elvis LongMicrosoft contingent staff, Moderator Wednesday, August 20, 2014 9:57 AM
- Marked as answer by Kalman TothModerator Friday, August 22, 2014 12:36 AM
All replies
-
SQL server does not offer any inbuilt functionality to achieve this. What you could do is create an audit table and log it
create table tblAudit(Procname varchar(100), startTime Datetime, endtime Datetime)
insert into tblAudit(Procname ,startTime ) values('MyProcedure1',getdate())
EXEC MyProcedure1
update tblAudit set endtime =getdate() where Procname ='MyProcedure1'
insert into tblAudit(Procname ,startTime ) values('MyProcedure2',getdate())
EXEC MyProcedure2
update tblAudit set endtime =getdate() where Procname ='MyProcedure2'
or you could use SQL profiler..
vt
Please mark answered if I've answered your question and vote for it as helpful to help other user's find a solution quicker
- Edited by v.vt Wednesday, August 13, 2014 9:38 PM
- Proposed as answer by Elvis LongMicrosoft contingent staff, Moderator Wednesday, August 20, 2014 9:58 AM
- Marked as answer by Kalman TothModerator Friday, August 22, 2014 12:36 AM
-
If you are looking for this in your DEV you can use this
SELECT GETDATE() EXEC MyProcedure1 SELECT GETDATE() EXEC MyProcedure2 SELECT GETDATE()
or You could use Statistics TimeSatheesh
My Blog | How to ask questions in technical forum
- Proposed as answer by Elvis LongMicrosoft contingent staff, Moderator Wednesday, August 20, 2014 9:57 AM
- Marked as answer by Kalman TothModerator Friday, August 22, 2014 12:36 AM
-
You can use Sql Server Profiler for this purposes it provides a lot of useful info along the each executed query and Stored procedure as well
SQL Profiler displays the execution time for each event
An other straightforward way:
print convert(varchar, getdate(), 21) EXEC MyProcedure1 print convert(varchar, getdate(), 21) EXEC MyProcedure2 print convert(varchar, getdate(), 21)
Please Mark This As Answer if it helps to solve the issue
- Proposed as answer by Elvis LongMicrosoft contingent staff, Moderator Wednesday, August 20, 2014 9:57 AM
- Marked as answer by Kalman TothModerator Friday, August 22, 2014 12:36 AM