SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Old Forums
 CLOSED - General SQL Server
 Detect SQL Servers
 Forum Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

jps
Starting Member

5 Posts

Posted - 06/09/2006 :  11:59:18  Show Profile
Hi All,

What I need is a script like vbs which returns a list of all sql 2000/2005 servers on the local networks.

Is it likely?

Thx

spirit1
Cybernetic Yak Master

Slovenia
11751 Posts

Posted - 06/09/2006 :  12:21:59  Show Profile  Visit spirit1's Homepage
http://www.sqlteam.com/item.asp?ItemID=5403

Go with the flow & have fun! Else fight the flow
Blog thingie: http://weblogs.sqlteam.com/mladenp
Go to Top of Page

sanjnep
Posting Yak Master

USA
191 Posts

Posted - 06/09/2006 :  12:23:06  Show Profile  Visit sanjnep's Homepage
You can run on command prompt
isql -L which gives all the sql server running on network.
You can use xp_cmd command to execute this command from query analyzer. You can easily call it from vb.
Thanks
Sanjeev OH

use master
create procedure s_list_servers
as
xp_cmdshell 'isql -L'
--something like this ....
Go to Top of Page

jps
Starting Member

5 Posts

Posted - 06/13/2006 :  09:43:24  Show Profile
Osql/Isql /L returns a list of SQL servers. How could I check their versions?
Go to Top of Page

sanjnep
Posting Yak Master

USA
191 Posts

Posted - 06/13/2006 :  10:02:46  Show Profile  Visit sanjnep's Homepage
After getting list of sql server you can use isql to connect each server and run @@version on each server which will give you the version of each server. If you need coding for this I may write it.

Sanjeev Shrestha
Go to Top of Page

jps
Starting Member

5 Posts

Posted - 06/13/2006 :  10:32:58  Show Profile
Hi sanjnep,

I am not good at SQL. What I need is to fill up my VB dropdown list with a list of sql servers, which have sql 2k /2k5.

I'll really appreciate if you can post your code here.

Thanks

Go to Top of Page

sanjnep
Posting Yak Master

USA
191 Posts

Posted - 06/13/2006 :  11:23:03  Show Profile  Visit sanjnep's Homepage
I will write the code this evening.
Thanks
Sanjeev
Go to Top of Page
  Previous Topic Topic Next Topic  
 Forum Locked
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.06 seconds. Powered By: Snitz Forums 2000