I am starting a series of posts of things you may do in MS SQL 2005. Hope it will help someone.
In a some later time i am going to publish a CFC with all kind of functions that may help optimizing MSSQL2005 ond your sql scripts.

Ok, ok.. too much talk.
Here is first script:
<cffunction name="getDBInfo" output="No" returntype="any" description="get databases info">
   <cfargument name="dbid" default="0" type="any" required="No">
   <cfargument name="dbName" default="" type="any" required="No">
   <cfset var getDBInfo = "">
   <cfquery name="getDBInfo" datasource="yourdsn#" username="youruserName" password="yourpasswd">
      Select *, suser_sname(owner_sid)
      From sys.databases
      <cfif Val(dbid)>
         Where database_id = <cfqueryparam cfsqltype="CF_SQL_INTEGER" value="#Val(dbid)#">
      <cfelseif Len(Trim(dbName))>
         Where name = <cfqueryparam cfsqltype="CF_SQL_VARCHAR" value="#dbName#">
   <cfreturn getDBInfo>

Example of usage:
<cfdump var="#getDBInfo()#">
<cfdump var="#getDBInfo('someDBName')#">