SQL Profiler setup for SQL's using DBNAME.OWNER.TABLENAME

  • I can setup a profiler (SQL Server 2000) to trace the SQL's for specific databases. But let's say if I Setup a profile on DB_1 and if a select happens from the contect of DB_2 Use DB_2, then my trace does not capture that SQL's. Does anyone have any idea how to setup a trace like that?

    1. Setup profiler to trace specificly on any sql's on DB_1.

    2. A process using the database called DB_2 running a select from a view or a strored proc which is

    Select first_name, last_name from DB_1.dbo.CUSTOMER

    My question is how do I setup a trace for capturing the sql's running against DB_1 database from any context?

    Thanks in advance for your ideas.

  • Have 2 traces, one filtered on database name and the other one on textdata column.

    1. DatabaseName Like DB_1

    2. TextData Like %DB_1%

  • Thanks Nan82.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply