Query that runs well for Sql Server 2012:
SELECT * FROM sys.databases d WHERE d.name NOT IN ('master', 'tempdb', 'model', 'msdb', 'ReportServer', 'ReportServerTempDB'); --or you could use a simpler condition which in my opinion is not so relevant --WHERE d.database_id > 4
Otherwise you could also use:
EXEC sp_databases
Cheers, Adrian
No comments:
Post a Comment