July 2, 2010 at 10:46 am
Does anyone know if there's either a system table or DMV that you can run that shows you the basic configuration information for a SQL Instance? I'm mainly trying to find out the name of the account that SQL and SQL Agent, etc., are running under by just executing a script.
July 2, 2010 at 1:24 pm
select * from sys.configurations
Are you looking for the account running the SQL and SQL Agent Service?
July 2, 2010 at 1:28 pm
DECLARE @serviceaccount varchar(100)
EXECUTE master.dbo.xp_instance_regread
N'HKEY_LOCAL_MACHINE',
N'SYSTEM\CurrentControlSet\Services\MSSQLSERVER',
N'ObjectName',
@ServiceAccount OUTPUT,
N'no_output'
SELECT @Serviceaccount
July 2, 2010 at 2:14 pm
Yeah, that last script was exactly what I was looking for! Thanks, Jason! I appreciate it!
Viewing 4 posts - 1 through 3 (of 3 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