I'm closing down a database and thought I could tell who was still using it using a trace, that was filtered on the database name.

However I find that if you are executing commands from a different database, then you can't filter the trace in this way. Also if someone is accessing tables in the database via a view from another database I can't see any information in the trace relating to my database.Does anyone have an alternative to using the profiler for this activity, I'm looking at using DMVs, but I want something I can leave on for a period of time that will capture all activity in a specific database.

I noticed several other threads along this line but none that have an answer (so far).