Check DNN version for all DotNetNuke instances on Server


 

Run the following query, you can get versions of all your DNN installations and their created dates.

—Coyp the following code and run from SSMS. Or you can create a stored procedure to include the code and call your stored procedure.

create table #VersionCheck (Website varchar(128), Major int, Minor int, Build int)

EXEC

sp_MSForEachDB

‘ IF EXISTS (select 1 from [?].information_schema.tables where

table_name=”Version”)

BEGIN

INSERT INTO #VersionCheck

select top 1

(SELECT top 1 HTTPAlias+ ” | ”+ CONVERT(VARCHAR(10),Createddate,101) FROM [?].dbo.PortalAlias ORDER BY PortalAliasID ) as website, Major, Minor, Build

FROM [?].dbo.Version

order by VersionId DESC

END’

SELECT

Website, LEFT(‘0’+CAST(Major as varchar(2)),2) +‘.’+ LEFT(‘0’+CAST(Minor as varchar(2)),2) +‘.’+LEFT(‘0’+CAST(Build as varchar(2)),2) as DNN_Version FROM #VersionCheck

DROP

table #VersionCheck

Advertisements


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s