February 22, 2010 at 7:29 am
Does anyone know if there are any good tools to generate a list of all databases on our network? We run SQL 2000, 2005, and 2008 (mostly 2005). There are also a couple of express instances. Thanks!
February 22, 2010 at 7:38 am
SQLRecon[/url] is free, and uses a number of different methods to find all the SQL servers on your network.
i've used it a lot of times, it does a lot more than just running the osql command like this:
CREATE PROCEDURE dbo.ListLocalServers
AS
BEGIN
SET NOCOUNT ON
CREATE TABLE ^#servers(sname VARCHAR(255))
INSERT ^#servers EXEC master..XP_CMDShell 'OSQL -L'
-- play with ISQL -L too, results differ slightly
DELETE ^#servers WHERE sname='Servers:'
SELECT LTRIM(sname) FROM ^#servers WHERE sname != 'NULL'
DROP TABLE ^#servers
END
EXEC ListLocalServers
results:
(local)
ASTRAH
AURORA
BELLE
etc....
Lowell
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply