July 23, 2015 at 11:41 am
Hello Experts
Without going to services.msc / configuration manager, is there anyway to know the service account through which SQL server is running?
Thanks.
July 23, 2015 at 11:45 am
IS this a good query to check or do you suggest any other probable best way to find the details? Please suggest
select net_library,loginame,hostname,spid from sysprocesses
where spid > 50 and net_library = 'LPC'
Thanks.
July 23, 2015 at 11:58 am
Many thanks, Crystal. Good Day.
Thanks.
July 23, 2015 at 12:06 pm
SQL-DBA-01 (7/23/2015)
Hello ExpertsWithout going to services.msc / configuration manager, is there anyway to know the service account through which SQL server is running?
Starting with SQL Server 2008R2, you can run this query:
SELECT * FROM sys.dm_server_services;
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
July 23, 2015 at 12:08 pm
To the Room, this is my final query now..
--1.
DECLARE @SN NVARCHAR(1000);
EXEC master.dbo.xp_regread
'HKEY_LOCAL_MACHINE',
'SYSTEM\CurrentControlSet\services\MSSQLServer',
'ObjectName',
@SN OUTPUT;
SELECT @SN;
--2.
declare @string VARCHAR(4000);
SET @string = 'setspn -L "' + @SN + '"'
select @string
exec xp_cmdshell @string
Thanks.
July 23, 2015 at 12:14 pm
Thnx Wayne. Appreciate your response.
Thanks.
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy