title: Trace query that get query processor ran out of internal resources
body: <p>In the event log we get the error</p>
  
  <pre><code>The query processor ran out of internal resources and could not produce a query plan. This is a rare event and only expected for extremely complex queries or queries that reference a very large number of tables or partitions. Please simplify the query. If you believe you have received this message in error, contact Customer Support Services for more information.
  
  Its a Microsoft SQL Server 2008 R2 (RTM) - 10.50.1600.1 (X64) 
      Apr  2 2010 15:48:46 
      Copyright (c) Microsoft Corporation
      Standard Edition (64-bit) on Windows NT 6.1 &lt;X64&gt; (Build 7600: ) (Hypervisor)
  </code></pre>
  
  <p>I need to catch what is causing the problem. It's the only option to set up a sql server trace to get the errors? Or are the any startup parameters to the server that i can use? Or alternative method. That not effects the servers performance or need a restart of the server. </p>