Get list of databases from SQL Server

79 views
0

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?

2

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.

You are viewing 1 out of 1 answers, click here to view all answers.
Bloom Email Optin Plugin