Is there a query in SQL Server 2005 I can use to get the server\'s IP or name?
you can use command line query and execute in mssql:
exec xp_cmdshell 'ipconfig'