Article Details

DotNetNuke: Which modules are being used (and which aren't)



Sometimes, you need (or want) to know which of the modules that are installed on your DNN site are and are not actually being used on your DotNetNuke site. This can be useful if you want to uninstall unused modules for performance improvements or if you're planning on upgrading your site and you need to know what modules you'll need to test or upgrade. Here's some sql that will help you answer these questions...

Note: If you know the Host login for your site, you can run these sql statements in your Host-> SQL tab.

Question 1: What modules are being used in my DNN instance (excludes admin modules):

select Distinct dm.ModuleName  from Modules m
    INNER JOIN ModuleDefinitions md on m.ModuleDefID = md.ModuleDefID
    INNER JOIN DesktopModules dm on md.DesktopModuleID = dm.DesktopModuleID
    WHERE dm.IsAdmin = 0

 

Question 2: What modules are installed but not being used:

select ModuleName from DesktopModules where isadmin = 0 AND
    ModuleName not in (select Distinct dm.ModuleName  from Modules m
    INNER JOIN ModuleDefinitions md on m.ModuleDefID = md.ModuleDefID
    INNER JOIN DesktopModules dm on md.DesktopModuleID = dm.DesktopModuleID)

 


Written By: David O'Leary
Date Posted: 6/26/2008
Number of Views: 561

Return