Get list of databases from SQL Server

Chris 21 Rep.

I have few SQL servers and I would like to export the database name list from each Microsoft SQL server. What is the easy way to get list of all databases from SQL server?

Kailash selected answer

Best answer

Kailash 152 Rep.

The best way to get list is as follow:

FROM master.dbo.sysdatabases

Once you get list, you can copy it. You may exclude default system databases like master, model, msdb ,testdb.

Kailash selected as best answer


Login to see your profile links
Bloom Email Optin Plugin