To find out the Windows Server Name that is currently running the live node use
begin try exec xp_cmdshell 'ping -a localhost' end try begin catch exec sp_configure 'show advanced options', 1 reconfigure -- to show the advanced options exec sp_configure xp_cmdshell, 1 reconfigure -- to enable the command-shell exec xp_cmdshell 'ping -a localhost' -- run a dos-command exec sp_configure 'xp_cmdshell', 0 reconfigure -- to disable the command-shell exec sp_configure 'show advanced options', 0 reconfigure -- to hide the advanced options end catch
Advertisements