November 16, 2004 at 11:24 am
How can I run a trace against only one database? I tried to filter by database name and nt login name, but I'm still seeing events for every database on the sql server. Any suggestions would be appreciated.
November 16, 2004 at 12:28 pm
Laura,
On Profiler properties - Go to Filter tab - choose DatabaseID - equals - <enter the database id>
To find the database id, enter the following in QA.
select db_id()
I hope this helps.
Gopal
November 17, 2004 at 5:16 am
As db_id with no parameters returns only the ID for the current database, if you need to know the id's of all databases use this T-SQL
select name,dbid from master..sysdatabases
hth
Neil.
November 17, 2004 at 7:58 am
That did it. Thanks!
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply