title: SSRS Report Error Invalid Object Name System.Data.SqlClient.SqlException: Invalid object name 'tempdb.dbo.TEMP_ID_XXXX'
body: <p>I am facing a weird problem and I would be glad if anyone can help me.</p>
  
  <p>In our company we use SSRS to send daily Reports to the Same Management.</p>
  
  <p>We Have 3 Types of Reports, which of 3 is executed more times with different parameters. The first it is executed 2 times, the second 3 times and the third, which is the heavier and is falling 6 times.</p>
  
  <p>All the 3 queries have the same philosophy using CTE tables. The queries developed in SSMS and added to the Report via Visual Studio.</p>
  
  <p>And here starts the madness. </p>
  
  <p>In the first edition we have them at the same schedule. Two of them are executed with no error and the emails were delivered. </p>
  
  <p>The third report is falling with error </p>
  
  <blockquote>
    <p>Microsoft.ReportingServices.ReportProcessing.ReportProcessingException:
    Query execution failed for dataset 'ZZZ'. --->
    System.Data.SqlClient.SqlException: Invalid object name
    'tempdb.dbo.TEMP_ID_XXXX'.</p>
  </blockquote>
  
  <p>When we disable the other 2 reports and executed the 3rd manually the report completed successfully.</p>
  
  <p>But this only some days, some other days all the reports delivered successfully.</p>
  
  <p>Then we decided to split the schedule of these 3 reports. So, we create 2 job steps. One for the first two and one for the third report.</p>
  
  <p>The first two days the reports delivered as we want, but from yesterday we are facing the same issue.</p>
  
  <p>As I saw the job steps have a time difference some milliseconds although the reports of the first step are taking around 15 seconds to complete.</p>
  
  <p>I checked the Execution log and saw that for the one parameter version Execution of the third report it takes:</p>
  
  <ul>
  <li><p>12990ms when it is executed manually through the portal.</p></li>
  <li><p>23845ms when it is executed as a job (Parallel with the other 5 parameters execution)</p></li>
  <li><p>35761ms when it is executed parallel with all the other reports (11 in total)  Failed</p></li>
  </ul>
  
  <p>I thought that maybe if adding and extra step between the 2 reports step that will pause job for 1 minute will fix my problem.</p>
  
  <p>Has anyone facing any similar issue?</p>
  
  <p>Any help would be appreciated!</p>