how can i list down the list of sql servers and list of database???
Printable View
how can i list down the list of sql servers and list of database???
List all of databases: have to send the following query to the master database.
SELECT * FROM sysdatabases
List all of table in a specific database: have to send the following query to the specific database that you want to know.
SELECT * FROM sysobjects
how's the connection to sql and to find out the list of servers and database?????
I'm not really sure that what you want to whether connect the SQL server from the program or just want to see it.
If you want to connect the server from your program, you may use ADO connection object.
e.g.
However, if you just want to see the server, you can use SQL Enterprise Manager. This tool comes with SQL server.Code:Dim objConn As ADODB.Connection
Set objConn = New ADODB.Connection
With objConn
'In case of you connect via the ODBC
.ConnectionString = "DSN=xxx;UID=yyy;PWD=zzz"
.Open
End With
now, i want to know is it possible to list down all sql servers and how?????
It is possible to list down all SQL server by using SQL Enterprise Manager.
what im trying to say, is to list all the sql servers thru visual basic, pls help.. thanks...