The following post describe some minor issues encountered when trying to set the SQL tracing within a load test of visual studio 2008.
For a little back round, it is possible to set you load test run settings to read a SQL trace file that includes all the database request request that took longer than a set amount of time. This will show up in you load test results (as a SQL trace table as explained here) and can be used to help in finding potential bottlenecks with the application under test.
How to set all this up in you load test is well documented on MSDN
Here are the issues that we encounter while setting all this up:
1- We created a share on the host running the test and entered the UNC share on the SQL Tracing Directory property. The load test would not start and returned the error "Could not start SQL tracing: could not create a trace file"
To solve the issue we create a share on the SQL box itself instead (the same workaround was applied in the following post). When running the test, the trace file was created at the specified location.
2- The second issue we encountered was the message "Could not Stop Tracing: Could not find the trace file" when the load test would finish.
The user running the test was part of the builtin\administrators group and was sysadmin. We decided to explicitly add the login to SQL Security and give the account sysadmin rights (server admin rights would have probably also been sufficient, we did not need to read SQL book on-line to find the exact rights to run SQL profiler).
After this, all our load test collected the SQL trace without further issue.