SET NOCOUNT ON;

CREATE TABLE #TodasAsColunas (
    table_catalog nvarchar(128),
    table_schema nvarchar(128),
    table_name nvarchar(128),
    column_name nvarchar(128),
    data_type nvarchar(128)
);

EXEC sp_MSforeachdb '
USE [?];
-- Ignora os bancos de dados do sistema (master, tempdb, model, msdb)
IF DB_ID(''?'') > 4 
BEGIN
    INSERT INTO #TodasAsColunas
    SELECT DISTINCT
        TABLE_CATALOG,
        TABLE_SCHEMA,
        TABLE_NAME,
        COLUMN_NAME,
        DATA_TYPE
    FROM INFORMATION_SCHEMA.COLUMNS;
END
';

SELECT DISTINCT * 
FROM #TodasAsColunas
ORDER BY table_catalog, table_name;

DROP TABLE #TodasAsColunas;