Index Tuning Wizard error message | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

Index Tuning Wizard error message

Once in a while I get the following error message from the Index Tuning Wizard which I find extremely frustrating [<img src=’/community/emoticons/emotion-6.gif’ alt=’:(‘ />!]:<br /><br /><i>The workload does not contain any events or queries that can be tuned against current database. Check to see that the trace contains valid events or that the SQL script contains valid queries and you are tuning against the right database.</i><br /><br />What the hell?!?! This is a SQL statement that I grabbed from SQL Profiler that is taking a long time to execute. For some stupid reason, the wizard decided that it didn’t like it. Here is the statement as is, if that makes a difference:<br /><br /><pre><br />SELECT C.LastName, C.FirstName, C.CustID, T.TimeStamp, P.PropertyID, P.Description, <br />T.TransID, P.Stock, P.Status, P.Price, Tx.Amount, T.TransType, T.VoidDate, T.OrgID, <br />T.OrgTransID, Purchases.PawnTicket, dbo.ItemCost(P.PropertyID, T.TransType) AS Cost <br />FROM Customer C RIGHT OUTER JOIN Transactions T ON C.CustId = T.CustID <br />INNER JOIN TransItemsXRF Tx ON T.TransID = Tx.TransID <br />INNER JOIN Property P ON Tx.PropertyID = P.PropertyID <br />LEFT OUTER JOIN Purchases ON Purchases.TransID = T.TransID <br />INNER JOIN Organizations ON T.OrgID = Organizations.OrgID <br />INNER JOIN Jurisdictions ON Organizations.JurID = Jurisdictions.JurID <br />WHERE ((P.LocationOrgID IS NULL AND T.OrgID = 269) OR P.LocationOrgID = 269) AND <br />T.VoidDate IS NULL <br />AND ((DATEADD(day, Purchases.TermDays + Jurisdictions.MinPawnSale, T.TimeStamp) &lt; GETDATE() AND T.TransType IN (1,5,6,<img src=’/community/emoticons/emotion-11.gif’ alt=’8)’ />) <br />OR (DATEADD(day, Jurisdictions.MinSaleHold, T.TimeStamp) &lt; GETDATE() AND T.TransType = 3)) <br />AND T.TimeStamp = (SELECT MAX(T2.TimeStamp) <br />FROM Transactions T2 INNER JOIN TransItemsXRF TX ON T2.TransID = TX.TransID <br />WHERE T2.VoidDate IS NULL <br />AND TX.PropertyID = P.PropertyID) <br />AND (P.Status = ‘H’ OR P.Status IS NULL)</pre><br /><br />Anybody ever seen this problem before?<br /><br />I’m running SQL 2000 SP3<br /><br />Thanks,<br /><br />Francois
Yes, Ive seen it on far far simpler queries too.<br />I agree, its very frustrating, but Ive no idea what triggers the error <img src=’/community/emoticons/emotion-6.gif’ alt=’:(‘ />
Like Chappy, I have seen this, but I don’t know what causes it. ——————
Brad M. McGehee
I have seen this problem on one of our services, when I enabled PROFILER trace again it worked without any problem. I believe its an informational message but no reference found anywhere. HTH Satya SKJ

I have also seen this myself and have never been able to find out what caused it or how to get round it. So good luck… Tom Pullen
DBA, Oxfam GB