January 8, 2009 at 4:55 pm
Where to check with what account sql server is running
January 8, 2009 at 5:10 pm
You can find the all the service accounts by looking at SQL Server 2005 Services in SQL Server Configuration Manager on the server where SQL Server is installed. Look in the "Log on as" column.
Greg
January 8, 2009 at 5:42 pm
First:
DECLARE @account varchar(100)
EXECUTE master.dbo.xp_instance_regread
N'HKEY_LOCAL_MACHINE',
N'SYSTEM\CurrentControlSet\Services\MSSQLSERVER',
N'ObjectName',
@account OUTPUT,
N'no_output'
SELECT @account as SQLServer_ServiceAccount
Second:
declare @reg_srv varchar(256),
@reg_agent varchar(256)
if serverproperty('instancename') is null
begin --default instance
set @reg_srv='SYSTEM\CurrentControlSet\SERVICES\MSSQLSERVER'
set @reg_agent='SYSTEM\CurrentControlSet\SERVICES\SQLSERVERAGENT'
end
else
begin --named instance
set @reg_srv='SYSTEM\CurrentControlSet\SERVICES\MSSQL$'+cast (serverproperty('instancename') as sysname)
set @reg_agent='SYSTEM\CurrentControlSet\SERVICES\SQLAgent$'+cast (serverproperty('instancename') as sysname)
end
exec master..xp_regread
'HKEY_LOCAL_MACHINE', @reg_srv, 'ObjectName'
exec master..xp_regread
'HKEY_LOCAL_MACHINE', @reg_agent, 'ObjectName'
go
MJ
January 8, 2009 at 7:47 pm
start->administrative tools->services
scroll down, the accountson the right
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply