Obtaining a List of Databases

  • Thread starter Thread starter Robert E. Flaherty
  • Start date Start date
R

Robert E. Flaherty

I can use the SqlDataSourceEnumerator to get a list of SQL Server instances.
How do I obtain a list of databases in a given SQL Server instance?
 
I have always used SQL DMO for enumerating both. You can also call
sp_databases on the master database for each server, but you will have to
have rights to call it.

--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA

Subscribe to my blog
http://gregorybeamer.spaces.live.com/lists/feed.rss

or just read it:
http://gregorybeamer.spaces.live.com/

*************************************************
| Think outside the box!
|
*************************************************
 
Back
Top