SELECT name
FROM sys.databases
WHERE database_id <= 4
/*
Report Services where collation has not been changed from default
Inclusion of SSRS dbs is questionable as system databases
*/
OR (name LIKE '%ReportServer%'
AND collation_name = 'Latin1_General_CI_AS_KS_WS')
/*
Catch any distribution databases
*/
OR is_distributor = 1
/*
This does't account for database_id 32767
32767 Will appear in some queries and is the mssqlsystemresource
hidden db.
*/
Jason...AKA CirqueDeSQLeil
_______________________________________________
I have given a name to my pain...MCM SQL Server, MVP
SQL RNNR
Posting Performance Based Questions - Gail Shaw[/url]
Learn Extended Events