【问题标题】:How to access Server Properties in SQL Operations Studio?如何在 SQL Operations Studio 中访问服务器属性?
【发布时间】:2018-09-20 16:55:13
【问题描述】:

Microsoft SQL Server Management Studio 中,可以选择右键单击服务器以访问:服务器属性 - 安全

在新的 SQL Operations Studio 中相当于什么?

谢谢。

【问题讨论】:

    标签: tsql sql-operations-studio


    【解决方案1】:

    这并没有完全回答问题,但这里是。

    服务器属性 -> 安全性是通过查询 Windows 注册表生成的。没有简单的方法可以将其从系统中查询出来。

    你可以使用

    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
    

    问题是,您必须知道N'HKEY_LOCAL_MACHINE', 的哪个位置才能找到您要查找的内容。

    此答案基于:Differences between xp_instance_RegRead and xp_RegRead

    【讨论】:

    • 詹姆斯,感谢您的回复。您显示的 Server Properties - Security 屏幕看起来像是来自 Management Studio。如果我错了,请纠正我。我正在寻找一种通过SSOP 以交互方式执行此操作的方法。也许有一个地方可以请求SSOP的建议?
    猜你喜欢
    • 1970-01-01
    • 2013-06-15
    • 2017-06-10
    • 2014-06-05
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多