473,387 Members | 1,530 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

listing SQL Server databases on a network

I would like to provide users of a client program a list of databases on the
network that match a certain pattern, like "%frp%". I have seen a list of
databases in the Windows XP ODBC configuration tool. What I would like to
know is can I get that information through a query to one of the databases,
or is there a control or application on the client machine that I can call
to get the list?

Does the thread "Databases not showing up in Enterprise Manager" refer to
what I am trying to do?

Best regards,
Steve Caldwell
Dec 7 '05 #1
5 1826
Hi Steve,

what about this:
Create Table #Serverinformation
(
Information VARCHAR(500)
)

INSERT INTO #Serverinformation
EXEC('master..XP_cmdshell ''OSQL.EXE -L''')

Select * from #Serverinformation
Where Information like 'Somepattern'
HTH, jens Suessmeyer.

Dec 7 '05 #2
Jens wrote:
Hi Steve,

what about this:
Create Table #Serverinformation
(
Information VARCHAR(500)
)

INSERT INTO #Serverinformation
EXEC('master..XP_cmdshell ''OSQL.EXE -L''')

Select * from #Serverinformation
Where Information like 'Somepattern'
HTH, jens Suessmeyer.

Jens,

Looks promising. I presume that "OSQL.EXE" is an either an application or an
executable ActiveX object. If "OSQL.EXE" is not on our standard
workstations, then I will look on the server and use a query. Hopefully,
"OSQL.EXE" has an exposed interface to VBA; that would be ideal.

Best regards,
Steve Caldwell
Dec 7 '05 #3
Steve wrote:
Jens wrote:
Hi Steve,

what about this:
Create Table #Serverinformation
(
Information VARCHAR(500)
)

INSERT INTO #Serverinformation
EXEC('master..XP_cmdshell ''OSQL.EXE -L''')

Select * from #Serverinformation
Where Information like 'Somepattern'
HTH, jens Suessmeyer.

Jens,

Looks promising. I presume that "OSQL.EXE" is an either an application or
an executable ActiveX object. If "OSQL.EXE" is not on our standard
workstations, then I will look on the server and use a query. Hopefully,
"OSQL.EXE" has an exposed interface to VBA; that would be ideal.

Best regards,
Steve Caldwell


I looked here: <http://www.sqlteam.com/item.asp?ItemID=5403>. Looks like
between the help in the newsgroup and this, I should be successful.
Steve
Dec 7 '05 #4
Didn“t know that you were aware of using SQl DMO (the link you
posted). I thought you are just able to use the TSQL options for that,
therefore the OSQL was the most appropiate solution for me.

Jens Suessmeyer.

Dec 8 '05 #5
Jens wrote:
DidnĀ“t know that you were aware of using SQl DMO (the link you
posted). I thought you are just able to use the TSQL options for that,
therefore the OSQL was the most appropiate solution for me.

Jens Suessmeyer.

I know that I had seen SQLDMO sometime past, but didn't really know anything
about it until you made your post. That started me looking. I did a Google
search and the link I posted was one of the results.

As it turns out, I was able to pull the whole thing together and now have an
nicely encapsulated form class that I can use in just about any VB/VBA
application to display a list of servers. The way it works now, it loads
the list of servers on loading, then the list is filtered using a regular
expression to show a specialized subset of server names. The reg.exp. is
set as a property of the form. When the user selects a server from the list
box, that is exposed as another property of the form. I went ahead and made
the entire list another property so that the list could be retrieved
without ever actually raising the form. It turned out nicely.

Thanks for the lead.

Best regards,
Steve
Dec 9 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Chris | last post by:
I am new to setting up SQL Server and would greatly appreciate if someone can help me out with this issue: I have successfully set up SQL Server but want to be able for clients of mine to be...
5
by: Matt | last post by:
I know it is possible to establish a connection to an SQL Server over the Internet via Enterprise Manager. My question is, how secure is this connection? Is there a best practices document for this...
3
by: John Barr | last post by:
Does anyone know how to search for Instances of SQL Server running on your network through code to populate a drop down like is done in the SQL Server Query Analyzer, and then once an instance is...
5
by: Naveen Mukkelli | last post by:
Hi, I've got two network adaptors in my computer(Windows server 2003). One for public network such as internet, and the other for a private network. I mean, I want to connect other 2 PCs (XP...
2
by: DKC | last post by:
Hi All, Is there any way wherein I can get a list of database servers on my local network. Any help appreciated. I am using VB.NET 2003 Thanks DKC
0
by: steve1rm | last post by:
Hello, I developed the code below to find all sql server on the network. Once the sql servers have been found display all the database that they have. The first part work. But the I can't get the...
1
by: Michael | last post by:
Hello, I am trying to develop a database solution for an organisation in Indonesia. This organization has a number of offices and users throughout the country. They all need to maintain their...
1
by: Raziq Shekha | last post by:
I have SQL Server 2000 with databases on the NetApps filer CIFS share. For example, the datafiles are located at \\network share\server share\microsoftsqlserver\mssql\data\... Whenever there is...
10
by: gary0gilbert | last post by:
An unusual spin to this recurring disk or network error in a Terminal Server environment. Access 2000, Terminal Server 2000, file server is windows 2000. All users have a separate copy of the...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.