The version of the report server database is either in a format that is not valid or it cannot be read.

The version of the report server database is either in a format that is not valid, or it cannot be read: This error occurs on SSRS, which is kind of reporting services, and it has different kind of types and format to display the message, for more details you can see below.

Problem/Issue:

The version of the report server database is either in a format that is not valid, or it cannot be read. The found version is ‘164’. The expected version is ‘163’. (rsInvalidReportServerDatabase) OR

The version of the report server database is either in a format that is not valid, or it cannot be read. The found version is ‘143’. The expected version is ‘178’. (rsInvalidReportServerDatabase) OR

The version of the report server database is either in a format that is not valid or it cannot be read.

The version of the report server database is either in a format that is not valid, or it cannot be read. The found version is ‘2017’. The expected version is ‘178’. (rsInvalidReportServerDatabase) OR

Reporting services will start but gives you below error while accessing the “web service URL’s” Error reported is rsInvalidReportServerDatabase. Log file may have.

Cause/Reason:

  1. First possibility could be that your SQL Server and SSRS version are not in same Version. So, it might cause the issue.
    • Note: In some scenarios as per my environment, even though the SSRS and SQL Server are not in same build I was getting the same error. It might also happen if you update the SQL server patches or recent cumulative update (CU Updates).
  1. Second possibility could be that you have tried to migrate/upgrade/install the SSRS Version from low version to high version and then configuring the old version of report server with new version of SSRS. E.g., Suppose I am using SQL and SSRS Version 2016/2012/2014, so we are aware that all the SQL server setup before 2016 used to come with SSRS. So, the SQL server schema was dependent on the Reporting services (SSRS).

Troubleshooting Steps:

Method 1: Patch and Updates check:

You can download and install the latest updates for the SQL server you are using. Installing Updates will not delete and corrupt your data, it is recommended by Microsoft to be on latest CU update.

Step 1: In my case you can see that, I am using SQL 2016. You can run this below command by selecting your SQL Server DB and you will get the version of your SQL Server.

image 3
Query: Select @@version

Step 2: Once we got the Installed SQL Server version then we can follow this below document to get the latest CU for the SQL Server. Link: https://sqlserverbuilds.blogspot.com/

image 2

Method 2: Try to repair the SQL Server by downloading the Setup file from Microsoft website.

In my case if you can see I have SQL Server 2016 (SP3), so will download it by directly searching over the internet or download from the above-mentioned website. Once downloaded follow the below steps to repair the SSRS.

image 4

Step 1: Go the Control Panel\Programs\Programs and Features and select the SQL Server you want to repair.

image 5
Note: Don’t get confused here by seeing multiple SQL Server 2016 setups, by reference you can click on setup where size is blank, as highlighted in the above image.

Step 2: Setup will open, and you will get 3options, select the “Repair” option the menu and then you have to select the SQL Server Media which you have downloaded above.

image 6

Step 3: Select default options and you can see that repair which will happen for all the reporting services. Once done try to restart the reporting services and SQL Server. After that browse the URL’s.

image 7
Hope now this issue is resolved “The version of the report server database is either in a format that is not valid or it cannot be read.”

Method 3: Upgrade/delete the Entry from Server Upgrade History in Report Server DB

Step 1: First we will try to upgrade the update history catalog table from report server. As you can see that I have 2017 as new server version with “UpgradeID =3“. To get the update history follow the below query. If you see the error screenshot at the top of this article you will understand what is happening here.

ServerUpgradeHistory After
Query:  select * from ReportServer.dbo.ServerUpgradeHistory

Step 2: Now we found the new entry in the report server, so we will update it first and check the behavior by re-starting the report server. If it is not working, then you can follow the step 3 to delete the entry from the server upgrade history.

image 11
Query: update ReportServer.dbo.ServerUpgradeHistory set ServerVersion=178 where UpgradeID=3

Step 3: Now, here I will show you how to delete the entry of the report server and check the behavior.

NOTE: Only perform delete command, if you have not performed the update command. Because in my case you can see that I was having 3 entries, but after updating the third entry my server version has 2 same entries. So, if you want to delete only updated entry then you can use UpgradeID to delete the third entry. You can find in the below command.

The version of the report server database is either in a format that is not valid or it cannot be read.
Query: delete from ReportServer.dbo.ServerUpgradeHistory where UpgradeID=3

Step 4: Once we delete the Server Upgrade History, our next task is to delete the entry of 2017 from DB Upgrade History, as you can see in my case that I have multiple entries of SQL Server Reporting Services, but my original report server is ReportServer$SQL16 itself. So, I will delete all the entries after $SQL16 to avoid any problem or mismatches.

Get DB Upgrade Details:
SELECT *
FROM [ReportServer].[dbo].[DBUpgradeHistory]
ORDER BY 1 DESC
Delete DB Upgrade History
delete from ReportServer.dbo.DBUpgradeHistory where UpgradeID = 62
The version of the report server database is either in a format that is not valid or it cannot be read.
Note: Now if you see my “DB Upgrade History” and “Server Upgrade History” both matches to 178. Now we are good to go, restart the SQL Server VM and test the behavior, hopefully it should work now.

Method 4: Install the correct SSRS:

As you can see from the above screenshot that, my report server DB is pointing to “2017” but I installed 2022 SSRS. If we try to upgrade the report server from 2016 to 2022 directly, then this kind of error or dumps will be created. So, in my case it is showing 2017, but if I use 2022 my reports will be accessible without any issue.

Note: The SQL and SSRS used to be in single setups files, which means it was dependent on the SQL Server, but after 2016 all the SSRS versions were independent and comes with individual setup files.

image 50
I am using the same database of SQL 16 and also the SQL Server is same. It is working fine without any issue.
Once done and performed all the above steps, re-start you SQL server and VM as well and check the behavior. Hope now this issue is resolved “The version of the report server database is either in a format that is not valid or it cannot be read.”

Important points:

  1. Always take backup of the ReportServer  and ReportServerTempdb before performing all this above steps.
  2. No matter what method you try from the above list, don’t forget to re-start the servers and check the behavior.
  3. Schema changes in the report server can’t be reversed. Also, if you think that if you uninstall the updates that will reverse the schema change, which is not possible.
  4. If performing all the above steps is not working for you then you can do only thing, either Re-store the database or You must install the current version of report server which it is asking in the error.
  5. If you have Azure VM’s then in some scenario they will be having the backups for the VM, from there get the DB backups before this error date and restore the database.

SQL Bi Links:

  1. SMTP Server In SSRS/PBIRS |Subscribe To Email Problem/Issue (kingfishertechtips.in)
  2. SQL Server 2022 Download, Install, Connect Using SSMS Tool (kingfishertechtips.in)
  3. Creating Tabular Project & Deploy Model To Analysis Service (kingfishertechtips.in)
  4. Deploy Tabular Project To Azure Analysis Service – SSDT Tool (kingfishertechtips.in)
  5. SSRS/PBIRS – Install And Configure The Report Server On-Prem (kingfishertechtips.in)
  6. Could Not Load Folder Contents In Portal URLs – SSRSPBIRS (kingfishertechtips.in)
  7. SSRS/PBIRS – Install And Configure The Report Server On-Prem (kingfishertechtips.in)
  8. SQL Server 2022 Download, Install, Connect Using SSMS Tool (kingfishertechtips.in)
  9. Capture Fiddler Trace for Debugging the Network Traffic (kingfishertechtips.in)
  10. On-Premises Gateway: Configure/Map SQL DB To Power Bi (kingfishertechtips.in)
  11. Fixed Column/Row Header Make Visible In Any Report (kingfishertechtips.in)
  12. Self-Signed Certificate: Configure SSRS/PBIRS With SSL (kingfishertechtips.in)
  13. Create Local User Account/Local Admin User In Windows 10/11 (kingfishertechtips.in)
  14. Login With AAD/Domain/Microsoft Account To Azure VM’s/RDP (kingfishertechtips.in)
Vickey Rajpoot
Vickey Rajpoot

Hello there! I'm dedicated Microsoft Data & AI Engineer at LTIMindtree, where I thrive technology into actionable insights. Dive into my world by visiting my YouTube channel & Webiste, "Kingfisher Tech Tips".

Articles: 103

6 Comments

  1. Yesterday, while I was at work, my sister stole my apple ipad and tested to see if it can survive
    a 40 foot drop, just so she can be a youtube sensation. My iPad is now broken and she
    has 83 views. I know this is entirely off topic but I had to share it with someone!

    Check out my homepage prix du blocalcin sur ordonnance

Leave a Reply

Your email address will not be published. Required fields are marked *