Reputation: 2066
When I execute a SQL query (e.g., SELECT 1) in SSMS, I can see the time it took to execute in the status bar. I would like to know whether it is possible to configure SSMS to show the date time the query was executed at (for example: Executed DateTime: 2015-07-28 11:15:30, not bothered about the date/time format) on status bar or in messages tab?
Here is the bar I am talking about with the section of interest enclosed in green rectangles.
Upvotes: 2
Views: 3524
Reputation: 31
It is possible. Click on Options, click on Editor Tab and Status Bar, under Status Bar Content, for Display execution time, select End. This shows the time of day that the script completed.
This works but you won't see elapsed time unless you enable the client statistics, but that only shows after query executes. There would be no way to determine how long the query has been running.
I wish MS can have both options, elapsed and end time. Would make life so much easier.
Upvotes: 3
Reputation: 679
I was looking for something similar, and found that if you hit F4, you can get this info (and more) from the Properties Window.
Upvotes: 4
Reputation: 460
No. It is not possible. Ways around this include:
I guess the best question I can ask is why are you looking to do this? Given that SSMS executes commands you request it do - you can just take note of the time yourself or log the start/stop time to a table.
Upvotes: 0