September 9, 2009 at 1:07 pm
I would like to find out the account on which sql server agent is running. We can get by right clicking sql server agent or from job history.
But, I would be glad if you could share with me any script for the same.
Thanks
M&M
September 9, 2009 at 2:34 pm
There is no way to tell which account the SQL Agent is 'configured' to run as by looking in the database. It uses whatever Windows account (local, domain or system) is configured in the services applet.
The probability of survival is inversely proportional to the angle of arrival.
September 9, 2009 at 4:22 pm
Alternative method
EXECUTE master.dbo.xp_instance_regread
N'HKEY_LOCAL_MACHINE',
N'SYSTEM\CurrentControlSet\Services\SQLSERVERAGENT',
N'ObjectName',
@ServiceAccount OUTPUT,
N'no_output'
SELECT @Serviceaccount as SQLAgent_ServiceAccount
Same principle
Jason...AKA CirqueDeSQLeil
_______________________________________________
I have given a name to my pain...MCM SQL Server, MVP
SQL RNNR
Posting Performance Based Questions - Gail Shaw[/url]
Learn Extended Events
September 9, 2009 at 4:49 pm
Not a script, but you can always go to the windows services and look for it there. SQL Server Agent is the service name, I believe.
September 9, 2009 at 6:24 pm
Thank you All
This was really helpful
M&M
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply