473,666 Members | 1,977 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

List od SQL Servers, Database and Tables

M
In .NET (pref. c#) how does one get a list of all available SQL Servers,
databases and tables. I need to allow the connection to a database, etc, on
the fly. kind of like what happens in SQL Query Analyzer
thanks
m
Nov 15 '05 #1
1 5053
AFAIK, you still have to use SQL DMO to enumerate SQL objects. SQL DMO is a
COM library, which means some COM interop.

You could use the tables in the master database for objects on a single
server, but this means a user has to be created that has rights to the
master database, which is a potential security hole. You can reduce the risk
by using the stored procs in the master database, of course. This does
nothing for enumerating the actual servers on your network.
--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
Author: ADO.NET and XML: ASP.NET on the Edge

*************** *************** *************** *************** *************** *
****
Think Outside the Box!
*************** *************** *************** *************** *************** *
****
"M" <ra**@beethoven .com> wrote in message
news:e%******** **********@tk2m sftngp13.phx.gb l...
In .NET (pref. c#) how does one get a list of all available SQL Servers,
databases and tables. I need to allow the connection to a database, etc, on the fly. kind of like what happens in SQL Query Analyzer
thanks
m

Nov 15 '05 #2

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

Similar topics

0
1509
by: R. Tarazi | last post by:
Hello, We are planning to reprogramm our search machine and website. Since we have call agents who query the same database as the customers do, we had the idea of splitting the database to 2 servers. The call agents can update customer data with our intern webinterface, which not only concerns tables that are for the call agents, but also concerns tables of the search machine, holding company data such as address, search words, etc.
2
1951
by: David | last post by:
My organization currently has 2 different MySQL database servers. We are in the process of moving the databases from Server A to Server B and have Server B be our primary database server. I've done some research on the web and believe the best option is to use the "mysqldump" command to remotely recreate Server A's databases on to Server B. Can anyone please advise whether this is the best option? Also, using the "mysqldump" command,...
2
1361
by: John D | last post by:
Does anyone have any idea how to syncronise two SQL identical tables across a network, between servers? We want to run our website from a SQL tables on the same server, but set up so that if the main SQL tables across the network change, or the tables on the web server change, the two seperate servers will syncronise/update/trigger updates to the tables on each other? We are running SQL server 2000.
6
9586
by: alex via SQLMonster.com | last post by:
Hi, anybody can help me. How can i synchronize 2 tables on 2 different sql servers 2000 i mean TABLE1(col1, col2, col3, col4) and TABLE1(col1, col2, col3, col4, col5, col6) the first 3 colums are the same in rwo tables.
0
398
by: OhMyGaw | last post by:
Hey guys, Couldn't find this anywhere in google. I want a list of all database column names for a specific table/view from across database. I tried this... ----------------------------------------------------- Select *
4
3748
by: Dave Edwards | last post by:
I understand that I can fill a datagrid with multiple queries, but I cannot figure out how to fill a dataset with the same query but run against multiple SQL servers, the query , table structure and username, password etc will be exactly the same for each server, the only thing that will change is the server name. Idealy I would like to get the server names from a seperate dataset so there could be any number of servers, allthough in...
6
1750
by: cj | last post by:
I'm tryin to set up a sqlcommand in VB.NET that would issue the command: insert into server1.database.owner.table select * from server2.database.owner.table Since this sqlcommand has it's connection property set to a connection string for server1 I'm assuming it isn't seeing server2 -- I get invalid object name server2. How can I get one sql statement to reference multiple servers?
1
1548
by: G.Fink.Nottle | last post by:
Hello, Being a bit of a SQL Server novice, need some advice with the following situation. Server A and Server B have SQLServer 2000 based databases. The vendor of the application/system has implemented their own replication process to ensure the 2 databases are in sync. However, there is no clustering with virtual IP addresses implemented. So to an external client/db, it is 2 identical databases with the same name on 2 distinct...
1
9828
by: Kristian | last post by:
Let's say I have three database users: * user_a * user_b * user_c user_a has a table called table_a upon which user_b and user_c create their corresponding views: * user_a.table_a
0
8445
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8356
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8871
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8551
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8640
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7386
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6198
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5664
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4198
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...

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.