Rank: Administration
Medals: Groups: Administrators
Joined: 10/20/2012 Posts: 106 Points: 327 Location: Tbilisi
Thanks: 0 times Was thanked: 0 time(s) in 0 post(s)
|
BB კოდი:--This returns Server Name, Cluster Node, Default Drive Letter, IP address and Port 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
|
|
Apex ltd. http://www.apex.ge
|