Why is SQL Profiler showing empty for database name and database id?
Confirm the trace is actually gathering those columns.  The following query will show the events and columns being captured for each trace (except the default system trace):

SELECT TraceID = t.id
    , TracePath = t.path
    , EventName = te.name
    , ColumnName = tc.name
FROM sys.traces t
    CROSS APPLY sys.fn_trace_geteventinfo(t.id) ei
    LEFT JOIN sys.trace_events te ON ei.eventid = te.trace_event_id
    LEFT JOIN sys.trace_columns tc ON ei.columnid = tc.trace_column_id
WHERE t.id &gt; 1 /* exlude the system trace */
ORDER BY t.id
    , ei.columnid;


The results look something like this (depending on the events and columns you've defined for your trace):

╔═════════╦═════════════════╦═════════════╦═════════════════╦═════════╦══════════╗
║ TraceID ║    TracePath    ║  EventName  ║   ColumnName    ║ eventid ║ columnid ║
╠═════════╬═════════════════╬═════════════╬═════════════════╬═════════╬══════════╣
║       2 ║ C:\temp\trc.trc ║ CursorClose ║ ApplicationName ║      78 ║       10 ║
║       2 ║ C:\temp\trc.trc ║ CursorClose ║ SPID            ║      78 ║       12 ║
║       2 ║ C:\temp\trc.trc ║ CursorClose ║ EventSequence   ║      78 ║       51 ║
╚═════════╩═════════════════╩═════════════╩═════════════════╩═════════╩══════════╝