Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Howto retrieve the list of databases on a server?

Author  Topic 

lalbatros
Yak Posting Veteran

69 Posts

Posted - 2008-01-11 : 08:33:52
How would it be possible to retrieve the list of databases on a server?

Thanks.

jhocutt
Constraint Violating Yak Guru

385 Posts

Posted - 2008-01-11 : 08:45:20
exec sp_databases
or
select name from master.dbo.sysdatabases

"God does not play dice" -- Albert Einstein
"Not only does God play dice, but he sometimes throws them where they cannot be seen."
-- Stephen Hawking
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2008-01-11 : 09:18:29
or

EXEC sp_helpdb

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -