An alternative to using the Query Capture Facility is to capture request plans using the request BEGIN QUERY LOGGING WITH XMLPLAN. This request causes the request plan for every non-cached INSERT, UPDATE, SELECT, DELETE, MERGE, and EXEC statement to be logged as an XML document in DBC.DBQLXMLTbl. For details, see WITH Logging Options.