How to access Server Properties in SQL Operations Studio?

Viewed 57

In Microsoft SQL Server Management Studio, there is the option to right click on a server to get to: Server Properties - Security

What is the equivalent of that in the new SQL Operations Studio ?

Thanks.

1 Answers

This does not fully answer the question, but here goes.

enter image description here

The Server properties -> Security is generated via querying the Windows Registry. There is no simple way to query it out of the system.

You can use

exec master.dbo.xp_regread 
    N'HKEY_LOCAL_MACHINE',
    N'Software\Microsoft\MSSQLServer\Setup',
    N'SQLPath',
    @dir output
select @dir

exec master.dbo.xp_instance_regread
    N'HKEY_LOCAL_MACHINE',
    N'Software\Microsoft\MSSQLServer\Setup',
    N'SQLPath', 
    @dir output
select @dir

The problem is, you have to know where in N'HKEY_LOCAL_MACHINE', to find what you are looking for.

This answer was based on: Differences between xp_instance_RegRead and xp_RegRead

Related