Find the guids of your sharepoint databases

A great deal of SharePoint logging refers to the GUID of a database, rather than the database name. I have found it handy to have a quick-reference guide to the GUID of each database. You can obtain this with a simple SQL query against your configuration database:

use <sharepoint_config>
Select ID, Name from objects where properties like
‘%Microsoft.SharePoint.Administration.SPContentDatabase%m_nWarningSiteCount%’