Note: always take a backup of your database before running any SQL queries. While we provide these queries for assistance purposes, we are not responsible for any problems that may arise.
Containers and themes can be applied to modules and pages at individual levels within a DNN instance. This can cause problems if, for example, the theme applied to a number of pages needs to be removed due to a compatibility issue. You can use the following SQL queries to change the container and theme values in the database to NULL, forcing the objects to use the site's default theme and container.
Clear all page level skins in a Portal
update {databaseOwner}{objectQualifier}Tabs
set skinsrc=null
where SkinSrc is not null
and PortalID=0
Clear all page level containers in a Portal
update {databaseOwner}{objectQualifier}tabs
set containersrc=null
where containersrc is not null
and PortalID=0
Clear all module level containers in a Portal
update {databaseOwner}{objectQualifier}TabModules
set ContainerSrc = null
where TabModuleID in (select TabModuleId
from {databaseOwner}{objectQualifier}TabModules tm
join {databaseOwner}{objectQualifier}Modules m
on (tm.ModuleID = m.ModuleID)
where ContainerSrc is not null
and m.PortalId=0)
Article ID: 2841, Created: March 11, 2020 at 4:29 PM, Modified: March 11, 2020 at 4:30 PM