Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Server ID?

Author  Topic 

Norwich
Posting Yak Master

158 Posts

Posted - 2006-03-14 : 07:26:04
HI

How can I identify all the SQL servers on my network using T-SQL?

@@ServerName will return the name of the box I'm running it from - I wan't the names of all the server

Regards
N

The revolution won't be televised!

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-03-14 : 07:48:54
Try this

Select srvName from Master..SysServers

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

RickD
Slow But Sure Yak Herding Master

3608 Posts

Posted - 2006-03-14 : 08:02:55
That won't give you all the servers unless you have links to them already..

The only way I can suggest is to get all the ipaddresses and run a simple select to each via the command line..
Go to Top of Page

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2006-03-14 : 08:06:41
Refer to here http://www.sqlteam.com/item.asp?ItemID=5403

----------------------------------
'KH'


Go to Top of Page

Norwich
Posting Yak Master

158 Posts

Posted - 2006-03-15 : 06:07:54
quote:
Originally posted by khtan

Refer to here http://www.sqlteam.com/item.asp?ItemID=5403

----------------------------------
'KH'






Thanks for the link

Regards
N

The revolution won't be televised!
Go to Top of Page

RickD
Slow But Sure Yak Herding Master

3608 Posts

Posted - 2006-03-16 : 07:12:13
If you have more than one domain, you will need to run any of these on each one..
Go to Top of Page
   

- Advertisement -