Products

Solutions

Resources

Partners

Community

About

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!

Helpful SQL Scripts

Return to previous page

  • 4/7/2015
  • 3756 Views

Comments

3756 Views

Helpful SQL Scripts

Last updated long time ago

Comments

Common

(Enter the content of this article below)

Advanced

 

Background

Note: Running database scripts that update data against your DotNetNuke database is not a recommended practice. DotNetNuke maintains binary compatibility at the API level but does not do so at the database level, so any script ran against the database can potentially fail (as the database has changed) or runs the risk of updating data in a fashion that is inconsistent with the DotNetNuke API e.g. perhaps a core API function when ran updates data in 2 places, but direct SQL only updates it in 1. This can mean that the database loses data integrity or in the worst case may end up creating invalid data that causes your site to crash/work incorrectly/fail during an upgrade.

Use the following scripts at your own risk!

Clean up unused items

TRUNCATE TABLE {databaseOwner}{objectQualifier}EventLog

GO

TRUNCATE TABLE {databaseOwner}{objectQualifier}ScheduleHistory
GO

TRUNCATE TABLE {databaseOwner}{objectQualifier}SiteLog
GO

TRUNCATE TABLE {databaseOwner}{objectQualifier}SearchItemWordPosition
GO

DELETE FROM {databaseOwner}{objectQualifier}SearchItemWord
GO

DELETE FROM {databaseOwner}{objectQualifier}SearchWord
GO

DELETE FROM {databaseOwner}{objectQualifier}SearchItem
GO

Note: Other Performance best practices can be read on this wiki.


Find and fix scripts

The following are some scripts that can be used to fix invalid data (created under certain conditions). As these directly update data, please back your database up first.


Other script ideas

Contents
No sections defined
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out