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
 General SQL Server Forums
 New to SQL Server Programming
 Reg. SQL Query

Author  Topic 

vmurali
Yak Posting Veteran

88 Posts

Posted - 2007-10-10 : 03:05:38
Hi,

How to get the database names given the server name.

I want get names of all database which are present in an server.

Regards
Venkatesh Murali

elancaster
A very urgent SQL Yakette

1208 Posts

Posted - 2007-10-10 : 03:08:21
select [name] from sys.databases

Em
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2007-10-10 : 04:07:43
If you use SQL Server 2000, then

Select [name] from Master..sysdatabases

Madhivanan

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

- Advertisement -