There's no built-in solution to accomplish what you are looking for. But you could easily design a stored procedure in the master database to achieve your end results. Something like this:
use master
go
create procedure dbo.sp_dbtypes
as
set nocount on;
declare @database_name sysname
create table #dbtypes
(
database_name sysname not null,
dbtype char(1) not null
)
declare db_cursor cursor for
select
name
from sys.databases
open db_cursor
fetch next from db_cursor
into @database_name
while @@fetch_status = 0
begin
insert into #dbtypes
(
database_name,
dbtype
)
exec
(
'if exists
(
select *
from ' + @database_name + '.sys.tables
where name = ''dbtype''
)
begin
select ''' + @database_name + ''', db_type
from ' + @database_name + '.dbo.DBType
end'
)
fetch next from db_cursor
into @database_name
end
close db_cursor
deallocate db_cursor
select *
from #dbtypes
go
Then to call this stored procedure, you'd simply do this:
exec master.dbo.sp_dbtypes
Obviously, you'll need to mesh this stored procedure into your environment but it should give you of a good idea to create the procedure. Outside of a cursor, I can't think of any other way.