Virtual Happy Hour this month, Jun 28, we'll be getting a sneak preview at our soon to launch SaaS CMS!

Try our conversational search powered by Generative AI!

SQL query to find database CMS version



In my local environment ,I have dozens of databases and I have different version of same site 7,8 and 9. Unfortunately the naming convention is not helping me to find the correct database. I am expecting a simple sql query which I could run againt the database and find the database version compatible to the CMS versions. Basically finding the available database I could link to the various version of CMS site I have 

Any pointer?

Dec 29, 2016 12:29


The database version is returned by the dbo.sp_DatabaseVersion stored proc.


Dec 29, 2016 13:17

Executed the Stored Procedue sp_DatabaseVersion did not got any response in the query window.  However I could find the version of the database by reading the script for stored procedure. It did the trick for me.

Thanks David :)

Dec 30, 2016 6:59

Hi Amol,

As David said, you can execute sp_DatabaseVersion to get the database version:

declare @ver int
exec @ver=sp_DatabaseVersion
print @ver

Next, you can open packages/EPiServer.CMS.Core.X.X.X/tools/epiupdates/sql to find out which database version matches episerver assembly version.

For example:

db version 7036 is used for episerver.cms.core versions between 9.8.3 and 10.0.0, including 9.8.3.

episerver.cms.core 10.0.0 is using db version 7037, etc.

Hope this helps!

Dec 30, 2016 15:52

Thanks Dejan :) It Surely does help... Happy New Year

Jan 02, 2017 6:33
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.