Repairing a Corrupted SSAS Reporting Database

If your Process Reporting Database task fails, it is possibly due to corruption in the SQL Server Analysis Services (SSAS) Cube. You can confirm this if the scheduler log displays a message similar to the following:

[Error Message]: File System error: The following file is corrupted: Physical file: \\?\K:\Program Files\Microsoft SQL Server\MSAS10_50.MSSQLSERVER\OLAP\Data\ANWeb12.0.db\Container.0.dim\82.Container.ID.ahstore. Logical file.

Certain circumstances can cause the SSAS to become corrupted. Some examples of this are when the server hosting SSAS is shut down or restarted unexpectedly while the database is being accessed, or if there is not enough disk space on the drive where the reporting database is stored.

Resolution

Removing the database

To resolve this problem it is necessary to delete the corrupted database, rebuild it, then make the necessary configuration changes for it to be accessible.
To perform this, please follow the steps below:

  1. Ensure you know the username/password used for the Active Navigation Scheduler service, the account used for the application pool, and the name of the Discovery Center SQL database.
  2. Delete the existing Discovery Center reporting database in SSAS. (This has the same name as your Discovery Center SQL database).

    Note:
    The same corruption error may prevent you from deleting it with SQL Server Management Studio. If this is the case, then another option is to stop the SQL Server Analysis Services service, then delete the physical reporting database files.
    To delete the files manually, open the C:\Program Files\Microsoft SQL Server\MASA10_50.MSSQLSERVER\OLAP\Data\ folder. There will be a subfolder whose name begins with the same name as the AN SQL database and an XML file named with the same service.

Rebuilding the database

To rebuild the reporting database, follow these steps:

  1. Open your Discovery Center installation folder on the hosting application server.
  2. Find and open the Reporting subfolder.
  3. Open the ANA.xmla file in this folder.
  4. Search and replace occurrences of ActiveNav4_2 with your Discovery Center database name.
  5. If the XMLA file contains a <Process> element/tag at the bottom of the file, remove the entire element from <Process> to </Process> inclusive.
  6. Open SQL Server Management Studio and connect to the Analysis Services server.
  7. Right-click on the SSAS server in Object Explorer and select 'New Query' -> 'XMLA'.
  8. Paste the updated XMLA text from steps 4 and 5 into the query window.
  9. Execute the statement.
  10. Refresh the database node in Object Explorer to check that the new database is present.
  11. Expand the database in Object Explorer to locate the 'Roles' section.
  12. Add a role named 'ANProcessor'.
  13. Grant the role 'Full Control', 'Process Database', and 'Read definition' rights.
  14. Add your AN scheduler and Application pool service accounts into the ANProcessor role.
  15. Open the Data Sources section and locate the ActiveNav4 data source. Open the data source properties dialog.
  16. Find the Impersonation Info setting under Security settings and set this to use a specific user account.
  17. Enter the details for the AN scheduler service account, then save your changes.

You may now attempt to process the reporting database in Discovery Center to verify that everything is working as expected.

Note: If processing the newly generated reporting database fails with an error of the form "The provider 'SQLNCLI10.1' is not registered." then it is necessary to update the SQL Native Client settings for the Data Source. In this case please refer to the separate knowledge base article linked here.