May 12, 2017 at 1:20 am
Hi Experts,
Could you please provide me some inputs on how to get sql agent service start up time.
Thanks in advance.
May 12, 2017 at 1:26 am
chinna.sp3025 - Friday, May 12, 2017 1:20 AMHi Experts,Could you please provide me some inputs on how to get sql agent service start up time.
Thanks in advance.
If you have the relevant permissions then:SELECT *
FROM sys.dm_server_services
WHERE
ServiceName LIKE 'SQL Server Agent%'
May 12, 2017 at 3:27 am
PB_BI - Friday, May 12, 2017 1:26 AMchinna.sp3025 - Friday, May 12, 2017 1:20 AMHi Experts,Could you please provide me some inputs on how to get sql agent service start up time.
Thanks in advance.
If you have the relevant permissions then:
SELECT *
FROM sys.dm_server_services
WHERE
ServiceName LIKE 'SQL Server Agent%'
Thank you for the reply.
Last_startup_time showing as Null , any info on this ?
Thanks in advace.
May 12, 2017 at 4:56 am
chinna.sp3025 - Friday, May 12, 2017 3:27 AMPB_BI - Friday, May 12, 2017 1:26 AMchinna.sp3025 - Friday, May 12, 2017 1:20 AMHi Experts,Could you please provide me some inputs on how to get sql agent service start up time.
Thanks in advance.
If you have the relevant permissions then:
SELECT *
FROM sys.dm_server_services
WHERE
ServiceName LIKE 'SQL Server Agent%'Thank you for the reply.
Last_startup_time showing as Null , any info on this ?
Thanks in advace.
I think it was a bug in certain earlier versions, but since you have posted in the 2016 forum I thought that it would work.
Try this:SELECT program_name, login_time
FROM sys.sysprocesses
WHERE program_name = 'SQLAgent - Generic Refresher'
May 12, 2017 at 7:44 am
another way would be to look for agent startup in eventlog. here is a way to parse the log with powershell.get-eventlog -logname system -source "service control manager" -message "*SQL Server Agent*running*"
May 12, 2017 at 8:52 am
Please use below command to read the agent start time from Agent Error Log.
EXEC master.dbo.xp_readerrorlog 0, 2, "SQLSERVERAGENT starting under"
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply