SQL Server ->> 获取服务器名字和SQL SERVER实例名的几种函数

SELECT    @@SERVERNAME as [@@SERVERNAME], SERVERPROPERTY('MachineName') MachineName, SERVERPROPERTY('InstanceName') InstanceName, SERVERPROPERTY('ServerName') ServerName,
SERVERPROPERTY('ComputerNamePhysicalNetBIOS') PhysicalNetBIOS

结果

@@SERVERNAME          MachineName      InstanceName      ServerName    PhysicalNetBIOS
JerryPC\MSSQLSERVER2014  JerryPC      MSSQLSERVER2014   JerryPC    JerryPC
上一篇:flink on yarn 用户代码获取keytab本地文件和principal的方法


下一篇:SQL SERVER获取数据库文件信息