I've got a Python script which accesses two SQLServer 2008 databases. If I run it and take a trace to capture all events that occur as a result of the script, and then put that trace through the Database Tuning Advisor it has the error message "invalid object name" about many of the tables in one of the databases.
I have selected both databases on the first tab of the tuning advisor. It seems that the trace doesn't capture which database the SQL has been run on, and I can't find a place to say that it should.
How can I analyse a trace from this script without these errors?