Hi!
Can something tell me how I can obtain the machine name (either IP address or DNS name) on which SQL Server is running via a SQL query?
select @.@.version returns a lot of useful information, however it doesn't return the host name.
thanks in advance
- GarryI haven't tested this, and it requires sysadmin privleges to run, but couldn't you use:EXECUTE master.dbo.xp_cmdshell 'SET COMPUTERNAME'-PatP
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment