Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Using Modules a...Using Modules a...Extracting a list of modules installed and if they are in use or not.Extracting a list of modules installed and if they are in use or not.
Previous
 
Next
New Post
9/21/2015 12:19 AM
 

Hello all,

I am struggling a little trying to write a query to extract a list of all the installed modules on a site and whether it is in use or not.

I know I can extract this from the /Admin/Extensions.aspx page of each site, but I was wanting to be able set an SQL job that mails the site admins (a.k.a my team) a list of all the installed modules across our many sites once a month for easy comparison so that we can work towards more code consistency.

 

Does anyone already have such a query handy?

Cheers,

Matthew.

 

 
New Post
9/21/2015 3:36 AM
 
you'll need to join ModuleDefinition, DesktopModules, PortalDesktopModules and Modules table.

Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
New Post
9/23/2015 9:51 PM
 
Sebastian Leupold wrote:
you'll need to join ModuleDefinition, DesktopModules, PortalDesktopModules and Modules table.

 Danke Sebastian.

I'll give that a nudge and post the script if I get it working.

 
New Post
9/24/2015 2:55 AM
 
it depends on your concrete needs, which columns should be included.

Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
New Post
9/29/2015 12:21 AM
 
Sebastian Leupold wrote:
it depends on your concrete needs, which columns should be included.

 

Guten Nachmittag Leupold,

My need was to be able to run a single script from a single Central Management Server and get back a list of all the modules we have installed across all our brands across multiple SQL servers and get back a searchable result table similar to the Host > Extensions table.

Possibly not the most efficient script but this works without too much drama at either a single instance  or a Central Management Server level:

==================================================================================================

/*
Created by Matthew Holloway 29/09/2015 to check all DNN DB's for installed modules.
Note: if your DNN DB's use a different naming convention you will need to update the statement "IF ''?'' Like ''DNN%'' to match"

Execute on a single instance or a central management server to collate all modules installed across websites across all instances on all SQL servers.
Skips DB's in a not available state, mirroring partner state or that don't match your prefix.

*/
--Create Table
CREATE TABLE [TempDB].[dbo].[Temp_Modules](
    [DTMods FriendlyName] [nvarchar](128) NULL,
    [ModDef FriendlyName] [nvarchar](128) NULL,
    [Module Name] [nvarchar](128) NULL,
    [Description] [nvarchar](2000) NULL,
    [Installed] [nvarchar](30) NULL,
    [Version] [nvarchar](80) NULL,
    [Premium] [nvarchar](30) NULL,
    [Depndencies] [nvarchar](400) NULL,
    [Website] [nvarchar](128) NULL
) ON [PRIMARY]

GO
--Populate table
Declare @Fullquery varchar (max)
Set @Fullquery ='
IF ''?'' Like ''DNN%''
Begin
Use [?]     
    Select Distinct [?].[dbo].[DesktopModules].[FriendlyName] as ''DTMods FriendlyName''
      ,[?].[dbo].[ModuleDefinitions].[FriendlyName] as ''ModDef FriendlyName''
      ,[?].[dbo].[DesktopModules].[ModuleName] as ''Module Name''
      ,''"''+ [?].[dbo].[DesktopModules].[Description] +''"'' as Descrption
      ,case when [?].[dbo].[Modules].[ModuleDefID] IS NULL then N''No'' else N''Yes'' End as ''Installed''
      ,[?].[dbo].[DesktopModules].[Version]
      ,case when [?].[dbo].[DesktopModules].[IsPremium] = 0 then N''No'' else N''Yes'' End as ''Premium''
      ,case when [?].[dbo].[DesktopModules].[Dependencies] IS NULL then N''Nil'' else [?].[dbo].[DesktopModules].[Dependencies] end as ''Depndencies''
      ,DB_NAME() as Website

    From
    [?].[dbo].[ModuleDefinitions]
    left join [?].[dbo].[DesktopModules]
    on [?].[dbo].[DesktopModules].[DesktopModuleID]=[?].[dbo].[ModuleDefinitions].[DesktopModuleID]
    left Join [?].[dbo].[PortalDesktopModules]
    on [?].[dbo].[ModuleDefinitions].[DesktopModuleID]=[?].[dbo].[PortalDesktopModules].[DesktopModuleID]
    left join [?].[dbo].[Modules]
    on [?].[dbo].[ModuleDefinitions].[ModuleDefId]=[?].[dbo].[Modules].[ModuleDefID]
   
        Order by [?].[dbo].[DesktopModules].[ModuleName] asc

        End
'
Insert into [tempdb].[dbo].[temp_modules] Exec sp_MSforeachdb  @fullquery

--present data
Select *
from [tempdb].[dbo].[temp_modules]

--cleanup table.
drop table [TempDB].[dbo].[temp_modules]

=========================================================================================================

Vielen Dank für den Startpunkt,

   Matthew

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Using Modules a...Using Modules a...Extracting a list of modules installed and if they are in use or not.Extracting a list of modules installed and if they are in use or not.


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out