To trace T_SQL queries submitted to SQL Express:
Start the SQL Express Service from the command prompt (run command prompt as Administrator if you are working on Windows 7 or Vista) with the following Trace Flag:
net start MSSQL$SQLEXPRESS /T4032
This now causes all queries issued by all conections to be traced. In order to have the trace output sent to the error log, enable trace flag 3605.
Execute the following in SQL Server Management Studio:
dbcc traceon(3605, -1) -- The -1 makes this global, i.e. applies to all sessions / connections
The logs can be found in C:\Program Files\Microsoft SQL Server\MSSQL10_50.SQLEXPRESS\MSSQL\Log\ERRORLOG.
The logs will now contain the queries that were issued by the clients.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.