Thursday, June 10, 2010

Report Server rsInternalError Error

When accessing all the TFS reports from report server, the following message showed up in browser.
An internal error occurred on the report server. See the error log for more details. (rsInternalError)

Further investigation found more information in the Reporting Service log file and dump log file.

ERROR , SQLDUMPER_UNKNOWN_APP.EXE, AdjustTokenPrivileges () failed (00000514)

w3wp!processing!5!06/07/2010-08:48:03:: a ASSERT: Assertion failed! Call stack:
Microsoft.ReportingServices.ReportProcessing.Persistence.IntermediateFormatReader.Assert(Boolean condition)
Microsoft.ReportingServices.ReportProcessing.Persistence.IntermediateFormatReader.Initialize(Stream stream)
Microsoft.ReportingServices.ReportProcessing.Persistence.IntermediateFormatReader..ctor(Stream stream)
Microsoft.ReportingServices.ReportProcessing.ReportProcessing.DeserializeReport(GetReportChunk getChunkCallback, ReportItem parent, Hashtable& definitionObjects)

These reports used to work, and there was no known changes to the system. I do notice that the size of chunkData table in the reportserver database became 0 around the same time the problem started.

To solve the problem, we need to restore the reports. From SQL Server Management Studio, run

use reportserver

itemID, Path, Name, CAST(CAST(Content AS varbinary(max)) AS xml) ReportXML
where content is not null

The ReportXML column is the report definition. Save it to a name.rdl file, and upload the file to the report site to overwrite the report.

This can not be the best solution, as I have 900+ reports to recover. But it is the only working one I found so far.

Wednesday, June 2, 2010

Hoxfix KB957196 Install procedure for database-tier mirrored TFS sites

This procedure also applies to the installation of TFS upgrades SP1 on database-tier mirrored sites.

1. before start, notify the users and make sure nobody is using TFS.
2. backup Report Server encryption key. Ship the key to site2. The key will not be used in the procedure. It will be used if the primary site needs to recover.
3. open SQL Server Management Studio, connect to site1 and site2.
4. in Management Studio, full database + transaction backup for site1. Ship the backups to site2.
6. in Management Studio, stop mirroring from site1.
7. install hotfix for 750-smart-bld1.
8. backup full database + transaction log. TFSIntegration database is modified during hotfix install.
9. ship the backup set to site2.
10. in Management Studio, restore database (and transaction log) to open status for site2.
11. in Management Studio, set up mirroring from site1.
13. full backup again for site1.