title: Troubleshooting the Re Creation of ReportServerTempDB
body: <p>RESOLVED SEE EDITS:
  Like a total noob I deleted our ReportServerTempDB by accident (I have a backup of ReportServer but not ReportServerTemp, live and learn). (Using SQL Server 2008 R2)</p>
  
  <p>To recreate the database I followed several online guides that gave the several steps:</p>
  
  <ul>
  <li>created a new database with the name ReportServerTempDB, and with the same collation as ReportServer (collation was key)</li>
  <li>made a new Database Role called RSExecRole with same users as my ReportServer (also key to make sure this role has the correct permissions to the tables) </li>
  <li>ran the CatalogTempDB script which ran without a hitch (the version of CatalogTempDB was not sufficient to recreate all of the objects necessary)</li>
  <li>Used Reporting Services Config Manager to Change Database and picked ReportServer</li>
  <li>Just for good measure turned off and on the SQL Server Reporting Services a few times</li>
  </ul>
  
  <p>But I am still getting an error when I try to load my Reporting Services Home page:
  An error occurred within the report server database. This may be due to a connection failure, timeout or low disk condition within the database. (rsReportServerDatabaseError) For more information about this error navigate to the report server on the local server machine, or enable remote errors </p>
  
  <p>What am I forgetting? As an alternative can I simply "create a new report server database" and import a back-up of my original ReportServer? TIA</p>
  
  <p>EDIT: I reviewed the RSExecRole and made sure that it had permission to edit tables and execute stored procedures (online sources did not spell this out very clearly) and after restarting the Reporting Services my error has changed to "An error occurred within the report server database. This may be due to a...  <strong>Invalid object name 'ReportServerTempDB.dbo.TempCatalog'. Could not use view or function 'ExtendedCatalog' because of binding errors.</strong> "
  Further reading is suggesting that the name of the temp Report Server is hardcoded into many stored procedures in ReportServer, but my new temp report server has the same name: ReportServerTempDB. Where is the disconnect?</p>
  
  <p>EDIT2: So the script I used, CatalogTempDB, did not create all of the tables necessary to rebuild my temporary Report Server db. I created a new Report Server and ReportServerTempDB (which an altered name) and compared the object in my ReportServerTempDB built using CatalogTempDB to the one the SQL wizard created. Then used the import wizard to add in the missing tables and re-started the Report Service with my original. Voila.</p>
  
  <p>Happy to provide more details about any of these steps.</p>