| View previous topic :: View next topic |
| Author |
Message |
Pascal Schmidt-Volkmar Guest
|
Posted: Fri Feb 13, 2004 12:08 pm Post subject: retrieving all databases of sql server |
|
|
Hi there,
how do I retrieve all databases that are connected to my sql server?
Thanks,
Pascal
|
|
| Back to top |
|
 |
Mike Shkolnik Guest
|
Posted: Fri Feb 13, 2004 12:25 pm Post subject: Re: retrieving all databases of sql server |
|
|
Pascal,
you must login to master database (this is system db and exist always) and
execute the query:
SELECT * FROM sysdatabases
--
With best regards, Mike Shkolnik
EMail: [email]mshkolnik (AT) scalabium (DOT) com[/email]
http://www.scalabium.com
"Pascal Schmidt-Volkmar" <nospam (AT) schmidt-volkmar (DOT) com> wrote in message:
news:402cbe22 (AT) newsgroups (DOT) borland.com...
| Quote: | Hi there,
how do I retrieve all databases that are connected to my sql server?
Thanks,
Pascal
|
|
|
| Back to top |
|
 |
Viatcheslav V. Vassiliev Guest
|
Posted: Fri Feb 13, 2004 12:38 pm Post subject: Re: retrieving all databases of sql server |
|
|
My MS SQL Server or MySQL server?
Examine siCatalogs schema (with TADOConnection.OpenSchema)
//------------------------------------------
Regards,
Vassiliev V. V.
http://www.managed-vcl.com - using .Net objects in Delphi for Win32 +
ADO.Net
http://www.oledbdirect.com - The fastest way to access MS SQL Server,
MS Jet (Access) and Interbase (through OLEDB)
"Pascal Schmidt-Volkmar" <nospam (AT) schmidt-volkmar (DOT) com> сообщил/сообщила в
новостях следующее: news:402cbe22 (AT) newsgroups (DOT) borland.com...
| Quote: | Hi there,
how do I retrieve all databases that are connected to my sql server?
Thanks,
Pascal
|
|
|
| Back to top |
|
 |
Jeremy Collins Guest
|
Posted: Fri Feb 13, 2004 12:55 pm Post subject: Re: retrieving all databases of sql server |
|
|
Mike Shkolnik wrote:
| Quote: | Pascal,
you must login to master database (this is system db and exist always) and
execute the query:
SELECT * FROM sysdatabases
|
This requires an SQL login - you can call NetServerEnum to
get a list of SQL Servers whether you can connect to them
or not.
--
jc
Remove the -not from email
|
|
| Back to top |
|
 |
Mike Shkolnik Guest
|
Posted: Fri Feb 13, 2004 3:10 pm Post subject: Re: retrieving all databases of sql server |
|
|
Jeremy,
original question is how to retrieve the list of databases in SQL-server.
I answered on this question.
But you answer on another question - how to retrieve a list of servers.
--
With best regards, Mike Shkolnik
EMail: [email]mshkolnik (AT) scalabium (DOT) com[/email]
http://www.scalabium.com
news:402cc949$1 (AT) newsgroups (DOT) borland.com...
| Quote: | Mike Shkolnik wrote:
Pascal,
you must login to master database (this is system db and exist always)
and
execute the query:
SELECT * FROM sysdatabases
This requires an SQL login - you can call NetServerEnum to
get a list of SQL Servers whether you can connect to them
or not.
--
jc
Remove the -not from email
|
|
|
| Back to top |
|
 |
Jeremy Collins Guest
|
Posted: Fri Feb 13, 2004 6:19 pm Post subject: Re: retrieving all databases of sql server |
|
|
Mike Shkolnik wrote:
| Quote: | Jeremy,
original question is how to retrieve the list of databases in SQL-server.
I answered on this question.
But you answer on another question - how to retrieve a list of servers.
|
Because I didn't read the question properly.
Or maybe because it's Friday the 13th - um, yeah, that's got to
be the explanation....
Apologies for attempting to correct your correct answer with
an incorrect one.
--
jc
Remove the -not from email
|
|
| Back to top |
|
 |
|