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...Administration ...Administration ...How to find Unused Modules on a DotNetNuke Instance?How to find Unused Modules on a DotNetNuke Instance?
Previous
 
Next
New Post
12/28/2007 3:26 AM
 

I have tons of modules installed at mywebsite. Now i want to clear up unused modules.

Do you have any code that helps me findout unused modules?


Or-Rouge Team Or-Rouge
Personally recommend Hostgator for hosting single or multiple DotNetNuke Websites.
DotNetNuke Tips and Tutorials
Install DotNetNuke to Godaddy root
DotNetNuke Türkçe Hakkinda Hersey
 
New Post
12/28/2007 9:36 AM
 

I don't have the duplicates removed, but this should help get you on the right track:

DECLARE @ModuleId INT, @FriendlyName NVARCHAR(128), @Count INT;
DECLARE [cModules] CURSOR FOR 
SELECT v.[ModuleId],v.[FriendlyName]
FROM [dbo].[vw_Modules] v
WHERE v.[IsAdmin] = 0;
OPEN [cModules];
FETCH NEXT FROM [cModules] INTO @ModuleId, @FriendlyName;
WHILE @@FETCH_STATUS = 0
BEGIN
 SELECT @Count = COUNT(tm.[TabModuleID]) FROM [dbo].[TabModules] tm WHERE tm.[ModuleId] = @ModuleId;
 PRINT N' The "' + @FriendlyName + N'" Module is used ' + CAST(@Count AS NVARCHAR(50)) + N' time(s).';
 FETCH NEXT FROM [cModules] INTO @ModuleId, @FriendlyName;
END
CLOSE [cModules];
DEALLOCATE [cModules];

Will Strohl

Upendo Ventures Upendo Ventures
DNN experts since 2003
Official provider of the Hotcakes Commerce Cloud and SLA support
 
New Post
1/29/2008 11:42 PM
 

Hey guys,

I having the EXACT problem where DNN just keeps restarting. the website is sometimes unabailable and other times it shows up just fine... when i look at the event log, i see:

1/29/2008 11:25:25 PM    Application Started           ...
Server Name: WEBSERVC05
   1/29/2008 11:20:19 PM   Application Shutting Down       Shutdown Details: The AppDomain shut down because of a change to the App_Code folder or files contained in it.

I tried the replacement of text in the app_code director but im not quite sure i replaced the correct text. i was running 4.6 and last nite ~at midnight~ upgraded to 4.8 in an effort to fix the problem. Since their are quite a few 'heavy hitters' in the sence that core dev guys are replying to the problem, im sure there are many more people who will have this problem.

Also, the wesbite has the following error messages

The AppDomain shut down because of the hosting environment.

 

Thanks in advance guys!

 
New Post
1/30/2008 2:15 AM
 

Ismet Dumlupinar wrote

I have tons of modules installed at mywebsite. Now i want to clear up unused modules.

Do you have any code that helps me findout unused modules?

This is from a previous thread along the same subject: http://www.dotnetnuke.com/Community/Forums/tabid/795/forumid/118/threadid/190029/scope/posts/threadpage/2/Default.aspx

ROBAX wrote

There are ways using sql to show which modules are being used where...

Here is the SQL SELECT statements we use to report portal module use and non-use. I hope this helps.

This SQL statement returns the pages in all portals which my installed modules are being used on:
SELECT     TOP 100 PERCENT dbo.DesktopModules.DesktopModuleID, dbo.DesktopModules.FriendlyName, dbo.ModuleDefinitions.ModuleDefID,
                      dbo.Modules.ModuleID, dbo.Modules.ModuleTitle, dbo.Modules.AllTabs, dbo.Modules.PortalID, dbo.Tabs.ParentId, dbo.Tabs.TabID,
                      dbo.Tabs.TabName, dbo.Tabs.Title
FROM         dbo.TabModules INNER JOIN
                      dbo.Modules ON dbo.TabModules.ModuleID = dbo.Modules.ModuleID INNER JOIN
                      dbo.Tabs ON dbo.TabModules.TabID = dbo.Tabs.TabID INNER JOIN
                      dbo.ModuleDefinitions ON dbo.Modules.ModuleDefID = dbo.ModuleDefinitions.ModuleDefID INNER JOIN
                      dbo.DesktopModules ON dbo.ModuleDefinitions.DesktopModuleID = dbo.DesktopModules.DesktopModuleID
WHERE (dbo.DesktopModules.FriendlyName = 'Reports')
ORDER BY dbo.DesktopModules.DesktopModuleID, dbo.Tabs.TabName

Results (you can omit the WHERE clause)

 

This SQL statement returns which installed modules are NOT being used:
SELECT     TOP 100 PERCENT dbo.DesktopModules.DesktopModuleID, dbo.DesktopModules.FriendlyName, dbo.DesktopModules.Version,
                      dbo.DesktopModules.IsPremium
FROM         dbo.Modules INNER JOIN
                      dbo.TabModules ON dbo.Modules.ModuleID = dbo.TabModules.ModuleID INNER JOIN
                      dbo.ModuleDefinitions ON dbo.Modules.ModuleDefID = dbo.ModuleDefinitions.ModuleDefID RIGHT OUTER JOIN
                      dbo.DesktopModules ON dbo.ModuleDefinitions.DesktopModuleID = dbo.DesktopModules.DesktopModuleID
WHERE     (dbo.DesktopModules.IsAdmin = 0)
GROUP BY dbo.DesktopModules.DesktopModuleID, dbo.DesktopModules.FriendlyName, dbo.DesktopModules.Version, dbo.DesktopModules.IsPremium
HAVING      (COUNT(dbo.TabModules.TabID) = 0)
ORDER BY dbo.DesktopModules.FriendlyName

Results

 

 


 
New Post
2/4/2008 3:57 PM
 

Wow!  Nice answer!


Will Strohl

Upendo Ventures Upendo Ventures
DNN experts since 2003
Official provider of the Hotcakes Commerce Cloud and SLA support
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...How to find Unused Modules on a DotNetNuke Instance?How to find Unused Modules on a DotNetNuke Instance?


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