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
 General SQL Server Forums
 New to SQL Server Programming
 know how many server sql are in my lan ...

Author  Topic 

sal21
Starting Member

8 Posts

Posted - 2006-06-01 : 16:01:44
Hi to all, this is the first post on this forum.
I have see this forum 4 year ago, if i remeber just...
Now i am a medium programmer in VBA end EXCEl...
My real question:
Is popssible to scann all server in my lan and find only the server with SQL instlled an if existis one or more put into excel sheet alla info of Sql Sever..., is thath possible?
Sorry for my englhis and hope not smile about this post.
sal.
Note: i am napolitan and pizza and coffe expres(Virtual) is for all!
:-)


tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2006-06-01 : 16:19:34
It is possible to find all servers on the LAN that have SQL Server installed. But you can't easily grab all of the info from them into an Excel spreadsheet. This will require a tremendous amount of work. Why do you want to do this?

Tara Kizer
aka tduggan
Go to Top of Page

sal21
Starting Member

8 Posts

Posted - 2006-06-01 : 16:30:02
quote:
Originally posted by tkizer

It is possible to find all servers on the LAN that have SQL Server installed. But you can't easily grab all of the info from them into an Excel spreadsheet. This will require a tremendous amount of work. Why do you want to do this?

Tara Kizer
aka tduggan



Tks Kizer for fats reply...
I have see on google and yahoo link, is possible with SQLDMO lib, but sure not for me!

Go to Top of Page

sal21
Starting Member

8 Posts

Posted - 2006-06-06 : 02:56:18
quote:
Originally posted by tkizer

It is possible to find all servers on the LAN that have SQL Server installed. But you can't easily grab all of the info from them into an Excel spreadsheet. This will require a tremendous amount of work. Why do you want to do this?

Tara Kizer
aka tduggan



HI tkizer, tks for suggestion....
now i have maked this 2 little macro, and the first work fine, the second work only if i use into line my local sql server, but if i insert other one the macro go in error(440 - error in autamtion) . I dont wont to use the other server, but only to read the name of databse abìnd table. Not is possible without permissiom or without psw and user?:
objSQLServer.Connect "(LOCAL)"


my code:

Sub TEST_SQL()
Dim TEST As String
Dim RIGA As String

Set sqlApp = CreateObject("SQLDMO.Application")

Set serverList = sqlApp.ListAvailableSQLServers

numServers = serverList.Count
RIGA = 2

For I = 1 To numServers

TEST = serverList(I)

Range("A" + RIGA) = TEST
RIGA = RIGA + 1
Next

Set sqlApp = Nothing

End Sub
Sub DATABASE_SQL()
Dim TESTDBSQL As String

Const DisplaySystemDatabases = False

Set objSQLServer = CreateObject("SQLDMO.SQLServer")
objSQLServer.LoginSecure = True

objSQLServer.Connect "(LOCAL)"


For I = 1 To objSQLServer.Databases.Count
If (Not objSQLServer.Databases(I).SystemObject) Or DisplaySystemDatabases Then
TESTDBSQL = objSQLServer.Databases(I).name
End If
Next

End Sub
Go to Top of Page

jen
Master Smack Fu Yak Hacker

4110 Posts

Posted - 2006-06-06 : 03:03:42
have you tried isql -L?

this is limited per segment so firewall may prevent you from performing a full scan

--------------------
keeping it simple...
Go to Top of Page

derrickleggett
Pointy Haired Yak DBA

4184 Posts

Posted - 2006-06-06 : 08:20:46
Have you tried SQLScan? It's a free tool available from MS in the security downloads. It returns all the SQL Servers on the network. You can limit it to a range, etc. It returns name, patch level, enabled status, and a lot of other information.

MeanOldDBA
derrickleggett@hotmail.com

When life gives you a lemon, fire the DBA.
Go to Top of Page

sal21
Starting Member

8 Posts

Posted - 2006-06-06 : 08:34:02
quote:
Originally posted by derrickleggett

Have you tried SQLScan? It's a free tool available from MS in the security downloads. It returns all the SQL Servers on the network. You can limit it to a range, etc. It returns name, patch level, enabled status, and a lot of other information.

MeanOldDBA
derrickleggett@hotmail.com

When life gives you a lemon, fire the DBA.



tks for info.... but not find i all page of mS of a direct link?
Tks.
Go to Top of Page

derrickleggett
Pointy Haired Yak DBA

4184 Posts

Posted - 2006-06-06 : 08:34:50
http://www.microsoft.com/downloads/details.aspx?familyid=9552d43b-04eb-4af9-9e24-6cde4d933600&displaylang=en

MeanOldDBA
derrickleggett@hotmail.com

When life gives you a lemon, fire the DBA.
Go to Top of Page
   

- Advertisement -