Created
April 17, 2018 11:31
-
-
Save rasor/3db7e591090cd92bf29c6d74a0d1b768 to your computer and use it in GitHub Desktop.
Print all MS SQL DB's on a server
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Print all MS SQL DB's on a server | |
SELECT name FROM master.dbo.sysdatabases | |
WHERE name NOT IN ('master', 'tempdb', 'model', 'msdb'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment