My usual way to find the ID of a database to reliably filter a trace running in profiler is to look through the sysobjects table in master.

I found this way is far nicer select db_id(‘yourdatabasename’)

DOH!