I know MS does not support SQL commands against SharePoint Databases. But we are just reading data using SQL and SSRS so no harm to be done.
I have SQL Syntax that querys every content DB WEBS table and report site collection titles, content DB name, relative URL (without the domain or web application root) and site request email. It gives us a nice report of all of our sitecollections.
It's great, but any way to report the full url for each site collection? or aleast information about the what web application a contect DB and site collection belongs to? We have 10 Web applications. I see siteId keys, but where does SharePoint store Web application information.. I've been looking for it in the Config and AdmincContent DBs but don't see it anywhere.
Please do not instruct me to use the SharePoint Object model, STSADM, Powershell or Web Services to get this information. It must be in SQL.