SELECT SERVERPROPERTY('ServerName') as 'Server\Instance',
SERVERPROPERTY('ComputerNamePhysicalNetBIOS') as 'Node',
(select left(af.filename,3)from sys.sysaltfiles af where af.name like '%MSDB%' and af.fileid = 1) as 'Drive',
ec.local_net_address as 'IP Addr',
ec.local_tcp_port as 'SQL Port'
from sys.dm_exec_connections ec
where ec.session_id = @@SPID
Friday, April 12, 2013
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment