Get list of databases from SQL Server

1
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

1
Kailash 152 Rep.

The best way to get list is as follow:

SELECT name
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

Login to see your profile links
Bloom Email Optin Plugin