📜  如何找到 sql server 安装文件夹 - SQL 代码示例

📅  最后修改于: 2022-03-11 15:05:10.379000             🧑  作者: Mango

代码示例1
declare @rc int, @dir nvarchar(4000) 

exec @rc = master.dbo.xp_instance_regread
      N'HKEY_LOCAL_MACHINE',
      N'Software\Microsoft\MSSQLServer\Setup',
      N'SQLPath', 
      @dir output, 'no_output'
select @dir AS InstallationDirectory