select address_info as "host/port" ,host_name() as "hostname" ,@@servername as "servername" ,db_name() "current_dbname" from master..syslisteners
select address_info as "host/port" ,host_name() as "hostname" ,@@servername as "servername" ,db_name() "current_dbname" from master..syslisteners
2 comments:
you query looks good but remember that we have to run check this on different version, please see below options
select @@servername
select net_type, substring(address_info,1,35) 'address_info' from master..syslisteners --Version 12.5
go
select @@servername
select net_type, substring(address_info,1,35) 'address_info', spare, nodeid from master..syslisteners --Version 15
go
This code, is incorrect
Post a Comment