SlideShare a Scribd company logo
1 of 30
PRESENTS 
DNN Database Tips & Tricks
Will Strohl 
Director, Product Development 
@WillStrohl 
Author, founder of DNNCon, former ODUG President, 20+ OSS 
projects, former DNN Corp employee
@WillStrohl #QCDUG 
DNN Database Tips & Tricks 
WHY?
@WillStrohl #QCDUG 
DNN DATABASE TIPS & TRICKS 
• Can’t get to the UI 
• Troubleshoot development 
• Quick fix/edit 
• It’s the only way or faster 
• Repeatable scripts 
• Database information 
• Wipe out a database 
Why?
@WillStrohl #QCDUG 
AUTOMATE! 
HanselMinutes.com 
“If you have to do it more than 
once and it can be automated, 
automate it!”
@WillStrohl #QCDUG
SQL Server Management Studio DNN > Host > SQL 
@WillStrohl #QCDUG 
DNN SQL SCRIPTS 
SELECT * 
FROM [dbo].[Users] 
ORDER BY [CreatedOnDate] DESC; 
SELECT * 
FROM {databaseOwner}[{objectQualifier}Users] 
ORDER BY [CreatedOnDate] DESC;
CLEAR SPACE
@WillStrohl #QCDUG 
CLEAR SPACE 
Symptoms Problem 
• Tables have too much data 
• Page loads consistently slow 
• Event Viewer page won’t load 
• EventLog is too big 
• SiteLog is too big
@WillStrohl #QCDUG 
CLEAR SPACE 
DELETE FROM [dbo].[EventLog]; 
-- or 
TRUNCATE TABLE [dbo].[EventLog]; 
DELETE FROM [dbo].[SiteLog]; 
-- or 
TRUNCATE TABLE [dbo].[SiteLog];
@WillStrohl #QCDUG 
CLEAR SPACE 
Better… 
DELETE FROM [dbo].[EventLog] 
WHERE [LogCreateDate] <= DATEADD(day, -30, GETDATE()); 
DELETE FROM [dbo].[SiteLog] 
WHERE [DateTime] <= DATEADD(day, -30, GETDATE());
CHANGE DBO ROLE OWNER
@WillStrohl #QCDUG 
CHANGE DBO ROLE OWNER 
Symptoms Problem 
• [Create|Drop] failed for user 
‘<username>’. 
• User, group, or role 
‘<username>’ already exists in 
the current database. 
• The database principal owns a 
database role and cannot be 
dropped. 
• Your database already has a 
user of the same name 
• Common across development 
teams 
http://bit.ly/changednnroleowner
@WillStrohl #QCDUG 
CHANGE DBO ROLE OWNER 
ALTER AUTHORIZATION ON ROLE::[aspnet_Membership_FullAccess] TO [dbo]; 
ALTER AUTHORIZATION ON ROLE::[aspnet_Membership_BasicAccess] TO [dbo]; 
ALTER AUTHORIZATION ON ROLE::[aspnet_Membership_ReportingAccess] TO [dbo]; 
/* 
-- Necessary for Pre DNN 7.x 
ALTER AUTHORIZATION ON ROLE::[aspnet_Profile_FullAccess] TO [dbo]; 
ALTER AUTHORIZATION ON ROLE::[aspnet_Profile_BasicAccess] TO [dbo]; 
ALTER AUTHORIZATION ON ROLE::[aspnet_Profile_ReportingAccess] TO [dbo]; 
ALTER AUTHORIZATION ON ROLE::[aspnet_Membership_FullAccess] TO [dbo]; 
ALTER AUTHORIZATION ON ROLE::[aspnet_Roles_FullAccess] TO [dbo]; 
ALTER AUTHORIZATION ON ROLE::[aspnet_Roles_BasicAccess] TO [dbo]; 
ALTER AUTHORIZATION ON ROLE::[aspnet_Roles_ReportingAccess] TO [dbo]; 
*/ 
DROP USER <your_username>;
CHANGE OR REPLACE THEMES
@WillStrohl #QCDUG 
CHANGE OR REPLACE THEMES 
Symptoms Problem 
• Have a rogue theme 
• Need to replace theme 
• Need to start fresh 
• No tool to reset theme 
• Resetting theme manually is 
too time consuming 
• Resetting the theme is 
dangerous 
http://bit.ly/cleardnnskins
@WillStrohl #QCDUG 
CHANGE OR REPLACE THEMES 
Find & Clear Default Site Settings 
-- find site settings for default theme settings 
SELECT [PortalID],[SettingName],[SettingValue] 
FROM [dbo].[PortalSettings] 
WHERE [SettingName] IN (N'DefaultAdminContainer', N'DefaultAdminSkin', 
N'DefaultPortalContainer', N'DefaultPortalSkin') 
AND [PortalID] = 0; 
-- update the site settings to remove the default theme settings 
UPDATE [dbo].[PortalSettings] 
SET [SettingValue] = NULL 
WHERE [SettingName] IN (N'DefaultAdminContainer', N'DefaultAdminSkin', 
N'DefaultPortalContainer', N'DefaultPortalSkin') 
AND [PortalID] = 0;
@WillStrohl #QCDUG 
CHANGE OR REPLACE THEMES 
Find & Clear Page Settings 
-- find pages with the skin set 
SELECT [TabID],[PortalID],[TabName],[SkinSrc],[ContainerSrc] 
FROM [dbo].[Tabs]; 
-- update all pages to remove skin settings 
UPDATE [dbo].[Tabs] 
SET [SkinSrc] = NULL, [ContainerSrc] = NULL 
WHERE [PortalID] = 0;
@WillStrohl #QCDUG 
CHANGE OR REPLACE THEMES 
Find & Clear Module Settings 
-- find modules with the container set 
SELECT [TabModuleID],[TabID],[ModuleID],[ContainerSrc] 
FROM [dbo].[TabModules]; 
-- update all modules to remove container settings 
UPDATE [dbo].[TabModules] 
SET [SkinSrc] = NULL, 
[ContainerSrc] = NULL 
WHERE [PortalID] = 0;
@WillStrohl #QCDUG 
CHANGE OR REPLACE THEMES 
Find & Replace Page Settings 
-- find pages with the skin set 
SELECT [TabID],[PortalID],[TabName],[SkinSrc],[ContainerSrc] 
FROM [dbo].[Tabs] 
WHERE [SkinSrc] LIKE N'%FutureGravity%' OR [ContainerSrc] LIKE N'%FutureGravity%'; 
-- update all pages to remove skin settings 
UPDATE [dbo].[Tabs] 
SET [SkinSrc] = REPLACE([SkinSrc], N'FutureGravity', N'Gravity'), 
[ContainerSrc] = REPLACE([ContainerSrc], N'FutureGravity', N'Gravity') 
WHERE [PortalID] = 0;
DATABASE OBJECT SIZES
@WillStrohl #QCDUG 
DATABASE OBJECT SIZES 
Symptoms Problem 
• Database fails 
• Disk space errors 
• Page load performance issues 
• Web host limits reached 
• The size of one or many 
database objects are too large 
http://bit.ly/dnndbsize
@WillStrohl #QCDUG 
DATABASE SIZE 
SELECT 
CASE TYPE 
WHEN 'U' 
THEN 'User Defined Tables' 
WHEN 'S' 
THEN 'System Tables' 
WHEN 'IT' 
THEN 'Internal Tables' 
WHEN 'P' 
THEN 'Stored Procedures' 
WHEN 'PC' 
THEN 'CLR Stored Procedures' 
WHEN 'X' 
THEN 'Extended Stored Procedures' 
END, 
COUNT(*) 
FROM SYS.OBJECTS 
WHERE TYPE IN ('U', 'P', 'PC', 'S', 'IT', 'X') 
GROUP BY TYPE 
SELECT 
database_name = DB_NAME(database_id) 
, log_size_mb = CAST(SUM(CASE WHEN type_desc = 'LOG' THEN size END) * 8. / 1024 AS DECIMAL(8,2)) 
, row_size_mb = CAST(SUM(CASE WHEN type_desc = 'ROWS' THEN size END) * 8. / 1024 AS DECIMAL(8,2)) 
, total_size_mb = CAST(SUM(size) * 8. / 1024 AS DECIMAL(8,2)) 
FROM sys.master_files WITH(NOWAIT) 
WHERE database_id = DB_ID() -- for current db 
GROUP BY database_id
@WillStrohl #QCDUG 
TABLE SIZE 
-- For storing values in the cursor 
DECLARE @TableName VARCHAR(100); 
-- Cursor to get the name of all user tables from the sysobjects listing 
DECLARE [tableCursor] CURSOR FOR 
SELECT [name] 
FROM [dbo].[sysobjects] 
WHERE OBJECTPROPERTY([id], N'IsUserTable') = 1 
FOR READ ONLY; 
-- A procedure level temp table to store the results 
CREATE TABLE #TempTable ( 
[tableName] VARCHAR(100), 
[numberofRows] VARCHAR(100), 
[reservedSize] VARCHAR(50), 
[dataSize] VARCHAR(50), 
[indexSize] VARCHAR(50), 
[unusedSize] VARCHAR(50) 
); 
-- Open the cursor 
OPEN [tableCursor]; 
-- Get the first table name from the cursor 
FETCH NEXT FROM [tableCursor] INTO @TableName; 
-- Loop until the cursor was not able to fetch 
WHILE (@@Fetch_Status >= 0) 
BEGIN 
-- Dump the results of the sp_spaceused query to the temp table
TAKE OVER A SITE LOCALLY
@WillStrohl #QCDUG 
TAKE OVER A SITE LOCALLY 
Symptoms Problem 
• Site inheritance issues 
• Need to create a login 
• Need to change user to host 
• Support has a time limit 
• Need to do this repeatedly 
• Production/local URL 
mismatch 
• Default URL setting gets in the 
way
@WillStrohl #QCDUG 
TAKE OVER A SITE LOCALLY 
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
must be run before being able to see the site 
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
DECLARE @NewAlias NVARCHAR(255), @PortalId INT; 
SET @NewAlias = N'somenewdomain.loc'; 
SET @PortalId = 0; 
-- change the old site URL to the new local one 
IF NOT EXISTS (SELECT 1 FROM [dbo].[PortalAlias] WHERE [HTTPAlias] = @NewAlias) 
BEGIN 
INSERT INTO [dbo].[PortalAlias] ([PortalID], [HTTPAlias], [CreatedByUserID], [CreatedOnDate], 
[LastModifiedByUserID], [LastModifiedOnDate], [IsPrimary]) 
VALUES (@PortalId, @NewAlias, -1, GETDATE(), -1, GETDATE(), 1); 
UPDATE [dbo].[PortalAlias] 
SET [IsPrimary] = 0 
WHERE NOT [HTTPAlias] = @NewAlias AND [PortalId] = @PortalId; 
END 
ELSE 
BEGIN 
UPDATE [dbo].[PortalAlias] 
SET [IsPrimary] = 1 
WHERE [HTTPAlias] = @NewAlias;
The passing of the buck… 
NEED MORE INFO?
@WillStrohl #QCDUG 
Paul Scarlett 
Adv. Systems Developer, HP Enterprise Services 
• Long time DNN enthusiast 
• SqlGridSelectedView 
• SQL expert 
• TressleWorks.ca 
• @PaulScarlett
Thank you! 
http://bit.ly/dnnsqlscripts 
@WillStrohl #QCDUG

More Related Content

What's hot

Taming Drupal Blocks for Content Editors a.k.a. "Snippets"
Taming Drupal Blocks for Content Editors a.k.a. "Snippets"Taming Drupal Blocks for Content Editors a.k.a. "Snippets"
Taming Drupal Blocks for Content Editors a.k.a. "Snippets"Brian Hay
 
Modern Front-End Development
Modern Front-End DevelopmentModern Front-End Development
Modern Front-End Developmentmwrather
 
Upgrading to Drupal 8: Benefits and Gotchas
Upgrading to Drupal 8: Benefits and GotchasUpgrading to Drupal 8: Benefits and Gotchas
Upgrading to Drupal 8: Benefits and GotchasSuzanne Dergacheva
 
Display Suite: A Themers Perspective
Display Suite: A Themers PerspectiveDisplay Suite: A Themers Perspective
Display Suite: A Themers PerspectiveMediacurrent
 
Build WordPress themes like a heavyweight - WordCamp Lancaster 2013
Build WordPress themes like a heavyweight - WordCamp Lancaster 2013Build WordPress themes like a heavyweight - WordCamp Lancaster 2013
Build WordPress themes like a heavyweight - WordCamp Lancaster 2013Jonny Allbut
 
EECI2009 - From Design to Dynamic - Rapid ExpressionEngine Development
EECI2009 - From Design to Dynamic - Rapid ExpressionEngine DevelopmentEECI2009 - From Design to Dynamic - Rapid ExpressionEngine Development
EECI2009 - From Design to Dynamic - Rapid ExpressionEngine DevelopmentFortySeven Media
 
How Evoq Helps You Build Modern Web Applications
How Evoq Helps You Build Modern Web ApplicationsHow Evoq Helps You Build Modern Web Applications
How Evoq Helps You Build Modern Web ApplicationsDNN
 
The Wonderful World of Drupal 8 Multilingual
The Wonderful World of Drupal 8 MultilingualThe Wonderful World of Drupal 8 Multilingual
The Wonderful World of Drupal 8 MultilingualSuzanne Dergacheva
 
Drupal 8, tricks and tips learned from the first 6 months
Drupal 8, tricks and tips learned from the first 6 monthsDrupal 8, tricks and tips learned from the first 6 months
Drupal 8, tricks and tips learned from the first 6 monthsIztok Smolic
 
Untangling spring week4
Untangling spring week4Untangling spring week4
Untangling spring week4Derek Jacoby
 
WordPress: After The Install
WordPress: After The InstallWordPress: After The Install
WordPress: After The InstallWordPress NYC
 
Features: A better way to package stuff in Drupal
Features: A better way to package stuff in DrupalFeatures: A better way to package stuff in Drupal
Features: A better way to package stuff in DrupalRob Knight
 
Introduction to HTML5 & CSS3
Introduction to HTML5 & CSS3Introduction to HTML5 & CSS3
Introduction to HTML5 & CSS3g4gauravagarwal
 
Responsive Layout Frameworks for XPages Application UI
Responsive Layout Frameworks for XPages Application UIResponsive Layout Frameworks for XPages Application UI
Responsive Layout Frameworks for XPages Application UIChris Toohey
 
WordPress development checklist
WordPress development checklistWordPress development checklist
WordPress development checklistBinh Quan Duc
 
Using Display Suite / Context to Build your Drupal Site
Using Display Suite / Context to Build your Drupal SiteUsing Display Suite / Context to Build your Drupal Site
Using Display Suite / Context to Build your Drupal SiteMatthew Wetmore
 
HTML5와 오픈소스 기반의 Web Components 기술
HTML5와 오픈소스 기반의 Web Components 기술HTML5와 오픈소스 기반의 Web Components 기술
HTML5와 오픈소스 기반의 Web Components 기술Jeongkyu Shin
 
Using WordPress for Rapid Prototyping
Using WordPress for Rapid PrototypingUsing WordPress for Rapid Prototyping
Using WordPress for Rapid PrototypingDrew Morris
 
Drupal Presentation for CapitalCamp 2011: Features Driven Development
Drupal Presentation for CapitalCamp 2011: Features Driven DevelopmentDrupal Presentation for CapitalCamp 2011: Features Driven Development
Drupal Presentation for CapitalCamp 2011: Features Driven DevelopmentMediacurrent
 

What's hot (20)

Taming Drupal Blocks for Content Editors a.k.a. "Snippets"
Taming Drupal Blocks for Content Editors a.k.a. "Snippets"Taming Drupal Blocks for Content Editors a.k.a. "Snippets"
Taming Drupal Blocks for Content Editors a.k.a. "Snippets"
 
Modern Front-End Development
Modern Front-End DevelopmentModern Front-End Development
Modern Front-End Development
 
Upgrading to Drupal 8: Benefits and Gotchas
Upgrading to Drupal 8: Benefits and GotchasUpgrading to Drupal 8: Benefits and Gotchas
Upgrading to Drupal 8: Benefits and Gotchas
 
Display Suite: A Themers Perspective
Display Suite: A Themers PerspectiveDisplay Suite: A Themers Perspective
Display Suite: A Themers Perspective
 
Build WordPress themes like a heavyweight - WordCamp Lancaster 2013
Build WordPress themes like a heavyweight - WordCamp Lancaster 2013Build WordPress themes like a heavyweight - WordCamp Lancaster 2013
Build WordPress themes like a heavyweight - WordCamp Lancaster 2013
 
EECI2009 - From Design to Dynamic - Rapid ExpressionEngine Development
EECI2009 - From Design to Dynamic - Rapid ExpressionEngine DevelopmentEECI2009 - From Design to Dynamic - Rapid ExpressionEngine Development
EECI2009 - From Design to Dynamic - Rapid ExpressionEngine Development
 
How Evoq Helps You Build Modern Web Applications
How Evoq Helps You Build Modern Web ApplicationsHow Evoq Helps You Build Modern Web Applications
How Evoq Helps You Build Modern Web Applications
 
Wordpress Shortcode
Wordpress ShortcodeWordpress Shortcode
Wordpress Shortcode
 
The Wonderful World of Drupal 8 Multilingual
The Wonderful World of Drupal 8 MultilingualThe Wonderful World of Drupal 8 Multilingual
The Wonderful World of Drupal 8 Multilingual
 
Drupal 8, tricks and tips learned from the first 6 months
Drupal 8, tricks and tips learned from the first 6 monthsDrupal 8, tricks and tips learned from the first 6 months
Drupal 8, tricks and tips learned from the first 6 months
 
Untangling spring week4
Untangling spring week4Untangling spring week4
Untangling spring week4
 
WordPress: After The Install
WordPress: After The InstallWordPress: After The Install
WordPress: After The Install
 
Features: A better way to package stuff in Drupal
Features: A better way to package stuff in DrupalFeatures: A better way to package stuff in Drupal
Features: A better way to package stuff in Drupal
 
Introduction to HTML5 & CSS3
Introduction to HTML5 & CSS3Introduction to HTML5 & CSS3
Introduction to HTML5 & CSS3
 
Responsive Layout Frameworks for XPages Application UI
Responsive Layout Frameworks for XPages Application UIResponsive Layout Frameworks for XPages Application UI
Responsive Layout Frameworks for XPages Application UI
 
WordPress development checklist
WordPress development checklistWordPress development checklist
WordPress development checklist
 
Using Display Suite / Context to Build your Drupal Site
Using Display Suite / Context to Build your Drupal SiteUsing Display Suite / Context to Build your Drupal Site
Using Display Suite / Context to Build your Drupal Site
 
HTML5와 오픈소스 기반의 Web Components 기술
HTML5와 오픈소스 기반의 Web Components 기술HTML5와 오픈소스 기반의 Web Components 기술
HTML5와 오픈소스 기반의 Web Components 기술
 
Using WordPress for Rapid Prototyping
Using WordPress for Rapid PrototypingUsing WordPress for Rapid Prototyping
Using WordPress for Rapid Prototyping
 
Drupal Presentation for CapitalCamp 2011: Features Driven Development
Drupal Presentation for CapitalCamp 2011: Features Driven DevelopmentDrupal Presentation for CapitalCamp 2011: Features Driven Development
Drupal Presentation for CapitalCamp 2011: Features Driven Development
 

Viewers also liked

Kanban explained David Anderson LAS 2011-zurich
Kanban explained David Anderson LAS 2011-zurichKanban explained David Anderson LAS 2011-zurich
Kanban explained David Anderson LAS 2011-zurichWalter Schärer
 
The Real-Time Web and its Future
The Real-Time Web and its FutureThe Real-Time Web and its Future
The Real-Time Web and its FutureReadWrite
 
Real-Time Web: The future web in the enterprise
Real-Time Web: The future web in the enterpriseReal-Time Web: The future web in the enterprise
Real-Time Web: The future web in the enterpriseTeemu Arina
 
Preparación de exposiciones orales.
Preparación de exposiciones orales.Preparación de exposiciones orales.
Preparación de exposiciones orales.Susana
 
Cloud Company - Designing a Faster and More Intelligent Organization for the ...
Cloud Company - Designing a Faster and More Intelligent Organization for the ...Cloud Company - Designing a Faster and More Intelligent Organization for the ...
Cloud Company - Designing a Faster and More Intelligent Organization for the ...Teemu Arina
 
Cloud Company: Social Technologies and Practices in Strategy, Management, and...
Cloud Company: Social Technologies and Practices in Strategy, Management, and...Cloud Company: Social Technologies and Practices in Strategy, Management, and...
Cloud Company: Social Technologies and Practices in Strategy, Management, and...Teemu Arina
 
DNN Connect 2014 - Enterprise Ecommerce and DotNetNuke
DNN Connect 2014 - Enterprise Ecommerce and DotNetNukeDNN Connect 2014 - Enterprise Ecommerce and DotNetNuke
DNN Connect 2014 - Enterprise Ecommerce and DotNetNukeThomas Stensitzki
 
DotNetNuke CMS: benefits for web professionals
DotNetNuke CMS: benefits for web professionalsDotNetNuke CMS: benefits for web professionals
DotNetNuke CMS: benefits for web professionalsI-business Solutions
 
DotNetNuke: Be Like Bamboo
DotNetNuke: Be Like BambooDotNetNuke: Be Like Bamboo
DotNetNuke: Be Like BambooWill Strohl
 
Dot Net Nuke Presentation
Dot Net Nuke PresentationDot Net Nuke Presentation
Dot Net Nuke PresentationTony Cosentino
 
Lv phát triển các dịch vụ giá trị gia tăng (vas) của tập đoàn viễn thông quân...
Lv phát triển các dịch vụ giá trị gia tăng (vas) của tập đoàn viễn thông quân...Lv phát triển các dịch vụ giá trị gia tăng (vas) của tập đoàn viễn thông quân...
Lv phát triển các dịch vụ giá trị gia tăng (vas) của tập đoàn viễn thông quân...Giang Coffee
 
Our Bodies, Disconnected: The Future Of Fitness APIs
Our Bodies, Disconnected: The Future Of Fitness APIsOur Bodies, Disconnected: The Future Of Fitness APIs
Our Bodies, Disconnected: The Future Of Fitness APIsReadWrite
 
Vision of the future: Organization 2.0
Vision of the future: Organization 2.0Vision of the future: Organization 2.0
Vision of the future: Organization 2.0Teemu Arina
 
Networks, Networks Everywhere, And Not A Packet To Drink
Networks, Networks Everywhere, And Not A Packet To DrinkNetworks, Networks Everywhere, And Not A Packet To Drink
Networks, Networks Everywhere, And Not A Packet To DrinkReadWrite
 
Upgrade Your Work Day With Quantified Self & Biohacking
Upgrade Your Work Day With Quantified Self & BiohackingUpgrade Your Work Day With Quantified Self & Biohacking
Upgrade Your Work Day With Quantified Self & BiohackingTeemu Arina
 
Diccionario de brujas
Diccionario de brujasDiccionario de brujas
Diccionario de brujasgabychap
 
Web 2.0 Business Models
Web 2.0 Business ModelsWeb 2.0 Business Models
Web 2.0 Business ModelsTeemu Arina
 
Web Real-time Communications
Web Real-time CommunicationsWeb Real-time Communications
Web Real-time CommunicationsAlexei Skachykhin
 
Brain Rules for Presenters
Brain Rules for PresentersBrain Rules for Presenters
Brain Rules for Presentersgarr
 

Viewers also liked (20)

Kanban explained David Anderson LAS 2011-zurich
Kanban explained David Anderson LAS 2011-zurichKanban explained David Anderson LAS 2011-zurich
Kanban explained David Anderson LAS 2011-zurich
 
The Real-Time Web and its Future
The Real-Time Web and its FutureThe Real-Time Web and its Future
The Real-Time Web and its Future
 
Real-Time Web: The future web in the enterprise
Real-Time Web: The future web in the enterpriseReal-Time Web: The future web in the enterprise
Real-Time Web: The future web in the enterprise
 
Preparación de exposiciones orales.
Preparación de exposiciones orales.Preparación de exposiciones orales.
Preparación de exposiciones orales.
 
Cloud Company - Designing a Faster and More Intelligent Organization for the ...
Cloud Company - Designing a Faster and More Intelligent Organization for the ...Cloud Company - Designing a Faster and More Intelligent Organization for the ...
Cloud Company - Designing a Faster and More Intelligent Organization for the ...
 
Cloud Company: Social Technologies and Practices in Strategy, Management, and...
Cloud Company: Social Technologies and Practices in Strategy, Management, and...Cloud Company: Social Technologies and Practices in Strategy, Management, and...
Cloud Company: Social Technologies and Practices in Strategy, Management, and...
 
DNN Connect 2014 - Enterprise Ecommerce and DotNetNuke
DNN Connect 2014 - Enterprise Ecommerce and DotNetNukeDNN Connect 2014 - Enterprise Ecommerce and DotNetNuke
DNN Connect 2014 - Enterprise Ecommerce and DotNetNuke
 
DotNetNuke CMS: benefits for web professionals
DotNetNuke CMS: benefits for web professionalsDotNetNuke CMS: benefits for web professionals
DotNetNuke CMS: benefits for web professionals
 
DotNetNuke: Be Like Bamboo
DotNetNuke: Be Like BambooDotNetNuke: Be Like Bamboo
DotNetNuke: Be Like Bamboo
 
Dot Net Nuke Presentation
Dot Net Nuke PresentationDot Net Nuke Presentation
Dot Net Nuke Presentation
 
Lv phát triển các dịch vụ giá trị gia tăng (vas) của tập đoàn viễn thông quân...
Lv phát triển các dịch vụ giá trị gia tăng (vas) của tập đoàn viễn thông quân...Lv phát triển các dịch vụ giá trị gia tăng (vas) của tập đoàn viễn thông quân...
Lv phát triển các dịch vụ giá trị gia tăng (vas) của tập đoàn viễn thông quân...
 
Our Bodies, Disconnected: The Future Of Fitness APIs
Our Bodies, Disconnected: The Future Of Fitness APIsOur Bodies, Disconnected: The Future Of Fitness APIs
Our Bodies, Disconnected: The Future Of Fitness APIs
 
Vision of the future: Organization 2.0
Vision of the future: Organization 2.0Vision of the future: Organization 2.0
Vision of the future: Organization 2.0
 
Networks, Networks Everywhere, And Not A Packet To Drink
Networks, Networks Everywhere, And Not A Packet To DrinkNetworks, Networks Everywhere, And Not A Packet To Drink
Networks, Networks Everywhere, And Not A Packet To Drink
 
Upgrade Your Work Day With Quantified Self & Biohacking
Upgrade Your Work Day With Quantified Self & BiohackingUpgrade Your Work Day With Quantified Self & Biohacking
Upgrade Your Work Day With Quantified Self & Biohacking
 
Diccionario de brujas
Diccionario de brujasDiccionario de brujas
Diccionario de brujas
 
CATÁLOGO DE PIRATAS
CATÁLOGO DE PIRATASCATÁLOGO DE PIRATAS
CATÁLOGO DE PIRATAS
 
Web 2.0 Business Models
Web 2.0 Business ModelsWeb 2.0 Business Models
Web 2.0 Business Models
 
Web Real-time Communications
Web Real-time CommunicationsWeb Real-time Communications
Web Real-time Communications
 
Brain Rules for Presenters
Brain Rules for PresentersBrain Rules for Presenters
Brain Rules for Presenters
 

Similar to DNN Database Tips & Tricks: 38 Essential SQL Scripts

Famo.us - New generation of HTML5 Web Application Framework
Famo.us - New generation of HTML5 Web Application FrameworkFamo.us - New generation of HTML5 Web Application Framework
Famo.us - New generation of HTML5 Web Application FrameworkHina Chen
 
Bye bye $GLOBALS['TYPO3_DB']
Bye bye $GLOBALS['TYPO3_DB']Bye bye $GLOBALS['TYPO3_DB']
Bye bye $GLOBALS['TYPO3_DB']Jan Helke
 
DBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should Know
DBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should KnowDBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should Know
DBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should KnowAlex Zaballa
 
DBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should Know
DBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should KnowDBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should Know
DBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should KnowAlex Zaballa
 
DBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should Know
DBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should KnowDBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should Know
DBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should KnowAlex Zaballa
 
Permissions script for SQL Permissions
Permissions script for SQL PermissionsPermissions script for SQL Permissions
Permissions script for SQL PermissionsTobias Koprowski
 
Oracle Database 12c - New Features for Developers and DBAs
Oracle Database 12c - New Features for Developers and DBAsOracle Database 12c - New Features for Developers and DBAs
Oracle Database 12c - New Features for Developers and DBAsAlex Zaballa
 
Oracle Database 12c - New Features for Developers and DBAs
Oracle Database 12c  - New Features for Developers and DBAsOracle Database 12c  - New Features for Developers and DBAs
Oracle Database 12c - New Features for Developers and DBAsAlex Zaballa
 
Basic - Oracle Edition Based Redefinition Presentation
Basic - Oracle Edition Based Redefinition PresentationBasic - Oracle Edition Based Redefinition Presentation
Basic - Oracle Edition Based Redefinition PresentationN/A
 
PostgreSQL Database Slides
PostgreSQL Database SlidesPostgreSQL Database Slides
PostgreSQL Database Slidesmetsarin
 
I am getting an errormsg 911, Level 16, State 1, Line 12 Database.pdf
I am getting an errormsg 911, Level 16, State 1, Line 12 Database.pdfI am getting an errormsg 911, Level 16, State 1, Line 12 Database.pdf
I am getting an errormsg 911, Level 16, State 1, Line 12 Database.pdfirshadkumar3
 
Debugging in drupal 8
Debugging in drupal 8Debugging in drupal 8
Debugging in drupal 8Allie Jones
 
07 Using Oracle-Supported Package in Application Development
07 Using Oracle-Supported Package in Application Development07 Using Oracle-Supported Package in Application Development
07 Using Oracle-Supported Package in Application Developmentrehaniltifat
 
Staying Sane with Drupal NEPHP
Staying Sane with Drupal NEPHPStaying Sane with Drupal NEPHP
Staying Sane with Drupal NEPHPOscar Merida
 
[WLDN] Supercharging word press development in 2018
[WLDN] Supercharging word press development in 2018[WLDN] Supercharging word press development in 2018
[WLDN] Supercharging word press development in 2018Adam Tomat
 
Useful PL/SQL Supplied Packages
Useful PL/SQL Supplied PackagesUseful PL/SQL Supplied Packages
Useful PL/SQL Supplied PackagesMaria Colgan
 

Similar to DNN Database Tips & Tricks: 38 Essential SQL Scripts (20)

Msql
Msql Msql
Msql
 
Famo.us - New generation of HTML5 Web Application Framework
Famo.us - New generation of HTML5 Web Application FrameworkFamo.us - New generation of HTML5 Web Application Framework
Famo.us - New generation of HTML5 Web Application Framework
 
Bye bye $GLOBALS['TYPO3_DB']
Bye bye $GLOBALS['TYPO3_DB']Bye bye $GLOBALS['TYPO3_DB']
Bye bye $GLOBALS['TYPO3_DB']
 
Sah
SahSah
Sah
 
DBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should Know
DBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should KnowDBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should Know
DBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should Know
 
DBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should Know
DBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should KnowDBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should Know
DBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should Know
 
DBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should Know
DBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should KnowDBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should Know
DBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should Know
 
Permissions script for SQL Permissions
Permissions script for SQL PermissionsPermissions script for SQL Permissions
Permissions script for SQL Permissions
 
Oracle Database 12c - New Features for Developers and DBAs
Oracle Database 12c - New Features for Developers and DBAsOracle Database 12c - New Features for Developers and DBAs
Oracle Database 12c - New Features for Developers and DBAs
 
Oracle Database 12c - New Features for Developers and DBAs
Oracle Database 12c  - New Features for Developers and DBAsOracle Database 12c  - New Features for Developers and DBAs
Oracle Database 12c - New Features for Developers and DBAs
 
Basic - Oracle Edition Based Redefinition Presentation
Basic - Oracle Edition Based Redefinition PresentationBasic - Oracle Edition Based Redefinition Presentation
Basic - Oracle Edition Based Redefinition Presentation
 
PostgreSQL Database Slides
PostgreSQL Database SlidesPostgreSQL Database Slides
PostgreSQL Database Slides
 
I am getting an errormsg 911, Level 16, State 1, Line 12 Database.pdf
I am getting an errormsg 911, Level 16, State 1, Line 12 Database.pdfI am getting an errormsg 911, Level 16, State 1, Line 12 Database.pdf
I am getting an errormsg 911, Level 16, State 1, Line 12 Database.pdf
 
Debugging in drupal 8
Debugging in drupal 8Debugging in drupal 8
Debugging in drupal 8
 
07 Using Oracle-Supported Package in Application Development
07 Using Oracle-Supported Package in Application Development07 Using Oracle-Supported Package in Application Development
07 Using Oracle-Supported Package in Application Development
 
Staying Sane with Drupal NEPHP
Staying Sane with Drupal NEPHPStaying Sane with Drupal NEPHP
Staying Sane with Drupal NEPHP
 
[WLDN] Supercharging word press development in 2018
[WLDN] Supercharging word press development in 2018[WLDN] Supercharging word press development in 2018
[WLDN] Supercharging word press development in 2018
 
Mysql
MysqlMysql
Mysql
 
Oracle SQL Tuning
Oracle SQL TuningOracle SQL Tuning
Oracle SQL Tuning
 
Useful PL/SQL Supplied Packages
Useful PL/SQL Supplied PackagesUseful PL/SQL Supplied Packages
Useful PL/SQL Supplied Packages
 

More from Will Strohl

DNN Community Newsletter: An In-Person Review of Recent Open-Source Activity
DNN Community Newsletter: An In-Person Review of Recent Open-Source ActivityDNN Community Newsletter: An In-Person Review of Recent Open-Source Activity
DNN Community Newsletter: An In-Person Review of Recent Open-Source ActivityWill Strohl
 
Unveiling the Secrets of Software Company Transitions: Navigating the Path to...
Unveiling the Secrets of Software Company Transitions: Navigating the Path to...Unveiling the Secrets of Software Company Transitions: Navigating the Path to...
Unveiling the Secrets of Software Company Transitions: Navigating the Path to...Will Strohl
 
DNN Awareness Group Presentation
DNN Awareness Group Presentation DNN Awareness Group Presentation
DNN Awareness Group Presentation Will Strohl
 
DNN Summit 2021: DNN Upgrades Made Simple
DNN Summit 2021: DNN Upgrades Made SimpleDNN Summit 2021: DNN Upgrades Made Simple
DNN Summit 2021: DNN Upgrades Made SimpleWill Strohl
 
DNN Summit: Robots.txt & Multi-Site DNN Instances
DNN Summit: Robots.txt & Multi-Site DNN InstancesDNN Summit: Robots.txt & Multi-Site DNN Instances
DNN Summit: Robots.txt & Multi-Site DNN InstancesWill Strohl
 
DNN CMS Awareness Group Meeting: December 2020
DNN CMS Awareness Group Meeting: December 2020DNN CMS Awareness Group Meeting: December 2020
DNN CMS Awareness Group Meeting: December 2020Will Strohl
 
Tips & Tricks: Working from Home and Staying Productive
Tips & Tricks: Working from Home and Staying ProductiveTips & Tricks: Working from Home and Staying Productive
Tips & Tricks: Working from Home and Staying ProductiveWill Strohl
 
DNN Awareness Meeting July 2019
DNN Awareness Meeting July 2019DNN Awareness Meeting July 2019
DNN Awareness Meeting July 2019Will Strohl
 
DNN-Connect 2019: DNN Horror Stories
DNN-Connect 2019: DNN Horror StoriesDNN-Connect 2019: DNN Horror Stories
DNN-Connect 2019: DNN Horror StoriesWill Strohl
 
DNN-Connect 2019: Build a Module in Minutes
DNN-Connect 2019: Build a Module in MinutesDNN-Connect 2019: Build a Module in Minutes
DNN-Connect 2019: Build a Module in MinutesWill Strohl
 
DNN Awareness Meeting May 2019
DNN Awareness Meeting May 2019DNN Awareness Meeting May 2019
DNN Awareness Meeting May 2019Will Strohl
 
DNN Awareness Meeting April 2019
DNN Awareness Meeting April 2019DNN Awareness Meeting April 2019
DNN Awareness Meeting April 2019Will Strohl
 
DNN Awareness Meeting March 2019
DNN Awareness Meeting March 2019DNN Awareness Meeting March 2019
DNN Awareness Meeting March 2019Will Strohl
 
DNN Awareness Meeting February 2019
DNN Awareness Meeting February 2019DNN Awareness Meeting February 2019
DNN Awareness Meeting February 2019Will Strohl
 
DNN Awareness Meeting January 2019
DNN Awareness Meeting January 2019DNN Awareness Meeting January 2019
DNN Awareness Meeting January 2019Will Strohl
 
DNN Awareness Meeting December 2018
DNN Awareness Meeting December 2018DNN Awareness Meeting December 2018
DNN Awareness Meeting December 2018Will Strohl
 
DNN Upgrades Made Simple (DNN Summit 2019)
DNN Upgrades Made Simple (DNN Summit 2019)DNN Upgrades Made Simple (DNN Summit 2019)
DNN Upgrades Made Simple (DNN Summit 2019)Will Strohl
 
DNN Awareness EAG Meeting September 2018
DNN Awareness EAG Meeting September 2018DNN Awareness EAG Meeting September 2018
DNN Awareness EAG Meeting September 2018Will Strohl
 
DNN Awareness EAG Meeting August 2018
DNN Awareness EAG Meeting August 2018DNN Awareness EAG Meeting August 2018
DNN Awareness EAG Meeting August 2018Will Strohl
 
June 2018 DNN Awareness Group Meeting
June 2018 DNN Awareness Group MeetingJune 2018 DNN Awareness Group Meeting
June 2018 DNN Awareness Group MeetingWill Strohl
 

More from Will Strohl (20)

DNN Community Newsletter: An In-Person Review of Recent Open-Source Activity
DNN Community Newsletter: An In-Person Review of Recent Open-Source ActivityDNN Community Newsletter: An In-Person Review of Recent Open-Source Activity
DNN Community Newsletter: An In-Person Review of Recent Open-Source Activity
 
Unveiling the Secrets of Software Company Transitions: Navigating the Path to...
Unveiling the Secrets of Software Company Transitions: Navigating the Path to...Unveiling the Secrets of Software Company Transitions: Navigating the Path to...
Unveiling the Secrets of Software Company Transitions: Navigating the Path to...
 
DNN Awareness Group Presentation
DNN Awareness Group Presentation DNN Awareness Group Presentation
DNN Awareness Group Presentation
 
DNN Summit 2021: DNN Upgrades Made Simple
DNN Summit 2021: DNN Upgrades Made SimpleDNN Summit 2021: DNN Upgrades Made Simple
DNN Summit 2021: DNN Upgrades Made Simple
 
DNN Summit: Robots.txt & Multi-Site DNN Instances
DNN Summit: Robots.txt & Multi-Site DNN InstancesDNN Summit: Robots.txt & Multi-Site DNN Instances
DNN Summit: Robots.txt & Multi-Site DNN Instances
 
DNN CMS Awareness Group Meeting: December 2020
DNN CMS Awareness Group Meeting: December 2020DNN CMS Awareness Group Meeting: December 2020
DNN CMS Awareness Group Meeting: December 2020
 
Tips & Tricks: Working from Home and Staying Productive
Tips & Tricks: Working from Home and Staying ProductiveTips & Tricks: Working from Home and Staying Productive
Tips & Tricks: Working from Home and Staying Productive
 
DNN Awareness Meeting July 2019
DNN Awareness Meeting July 2019DNN Awareness Meeting July 2019
DNN Awareness Meeting July 2019
 
DNN-Connect 2019: DNN Horror Stories
DNN-Connect 2019: DNN Horror StoriesDNN-Connect 2019: DNN Horror Stories
DNN-Connect 2019: DNN Horror Stories
 
DNN-Connect 2019: Build a Module in Minutes
DNN-Connect 2019: Build a Module in MinutesDNN-Connect 2019: Build a Module in Minutes
DNN-Connect 2019: Build a Module in Minutes
 
DNN Awareness Meeting May 2019
DNN Awareness Meeting May 2019DNN Awareness Meeting May 2019
DNN Awareness Meeting May 2019
 
DNN Awareness Meeting April 2019
DNN Awareness Meeting April 2019DNN Awareness Meeting April 2019
DNN Awareness Meeting April 2019
 
DNN Awareness Meeting March 2019
DNN Awareness Meeting March 2019DNN Awareness Meeting March 2019
DNN Awareness Meeting March 2019
 
DNN Awareness Meeting February 2019
DNN Awareness Meeting February 2019DNN Awareness Meeting February 2019
DNN Awareness Meeting February 2019
 
DNN Awareness Meeting January 2019
DNN Awareness Meeting January 2019DNN Awareness Meeting January 2019
DNN Awareness Meeting January 2019
 
DNN Awareness Meeting December 2018
DNN Awareness Meeting December 2018DNN Awareness Meeting December 2018
DNN Awareness Meeting December 2018
 
DNN Upgrades Made Simple (DNN Summit 2019)
DNN Upgrades Made Simple (DNN Summit 2019)DNN Upgrades Made Simple (DNN Summit 2019)
DNN Upgrades Made Simple (DNN Summit 2019)
 
DNN Awareness EAG Meeting September 2018
DNN Awareness EAG Meeting September 2018DNN Awareness EAG Meeting September 2018
DNN Awareness EAG Meeting September 2018
 
DNN Awareness EAG Meeting August 2018
DNN Awareness EAG Meeting August 2018DNN Awareness EAG Meeting August 2018
DNN Awareness EAG Meeting August 2018
 
June 2018 DNN Awareness Group Meeting
June 2018 DNN Awareness Group MeetingJune 2018 DNN Awareness Group Meeting
June 2018 DNN Awareness Group Meeting
 

Recently uploaded

Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDGMarianaLemus7
 

Recently uploaded (20)

Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDG
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 

DNN Database Tips & Tricks: 38 Essential SQL Scripts

  • 1. PRESENTS DNN Database Tips & Tricks
  • 2. Will Strohl Director, Product Development @WillStrohl Author, founder of DNNCon, former ODUG President, 20+ OSS projects, former DNN Corp employee
  • 3. @WillStrohl #QCDUG DNN Database Tips & Tricks WHY?
  • 4. @WillStrohl #QCDUG DNN DATABASE TIPS & TRICKS • Can’t get to the UI • Troubleshoot development • Quick fix/edit • It’s the only way or faster • Repeatable scripts • Database information • Wipe out a database Why?
  • 5. @WillStrohl #QCDUG AUTOMATE! HanselMinutes.com “If you have to do it more than once and it can be automated, automate it!”
  • 7. SQL Server Management Studio DNN > Host > SQL @WillStrohl #QCDUG DNN SQL SCRIPTS SELECT * FROM [dbo].[Users] ORDER BY [CreatedOnDate] DESC; SELECT * FROM {databaseOwner}[{objectQualifier}Users] ORDER BY [CreatedOnDate] DESC;
  • 9. @WillStrohl #QCDUG CLEAR SPACE Symptoms Problem • Tables have too much data • Page loads consistently slow • Event Viewer page won’t load • EventLog is too big • SiteLog is too big
  • 10. @WillStrohl #QCDUG CLEAR SPACE DELETE FROM [dbo].[EventLog]; -- or TRUNCATE TABLE [dbo].[EventLog]; DELETE FROM [dbo].[SiteLog]; -- or TRUNCATE TABLE [dbo].[SiteLog];
  • 11. @WillStrohl #QCDUG CLEAR SPACE Better… DELETE FROM [dbo].[EventLog] WHERE [LogCreateDate] <= DATEADD(day, -30, GETDATE()); DELETE FROM [dbo].[SiteLog] WHERE [DateTime] <= DATEADD(day, -30, GETDATE());
  • 13. @WillStrohl #QCDUG CHANGE DBO ROLE OWNER Symptoms Problem • [Create|Drop] failed for user ‘<username>’. • User, group, or role ‘<username>’ already exists in the current database. • The database principal owns a database role and cannot be dropped. • Your database already has a user of the same name • Common across development teams http://bit.ly/changednnroleowner
  • 14. @WillStrohl #QCDUG CHANGE DBO ROLE OWNER ALTER AUTHORIZATION ON ROLE::[aspnet_Membership_FullAccess] TO [dbo]; ALTER AUTHORIZATION ON ROLE::[aspnet_Membership_BasicAccess] TO [dbo]; ALTER AUTHORIZATION ON ROLE::[aspnet_Membership_ReportingAccess] TO [dbo]; /* -- Necessary for Pre DNN 7.x ALTER AUTHORIZATION ON ROLE::[aspnet_Profile_FullAccess] TO [dbo]; ALTER AUTHORIZATION ON ROLE::[aspnet_Profile_BasicAccess] TO [dbo]; ALTER AUTHORIZATION ON ROLE::[aspnet_Profile_ReportingAccess] TO [dbo]; ALTER AUTHORIZATION ON ROLE::[aspnet_Membership_FullAccess] TO [dbo]; ALTER AUTHORIZATION ON ROLE::[aspnet_Roles_FullAccess] TO [dbo]; ALTER AUTHORIZATION ON ROLE::[aspnet_Roles_BasicAccess] TO [dbo]; ALTER AUTHORIZATION ON ROLE::[aspnet_Roles_ReportingAccess] TO [dbo]; */ DROP USER <your_username>;
  • 16. @WillStrohl #QCDUG CHANGE OR REPLACE THEMES Symptoms Problem • Have a rogue theme • Need to replace theme • Need to start fresh • No tool to reset theme • Resetting theme manually is too time consuming • Resetting the theme is dangerous http://bit.ly/cleardnnskins
  • 17. @WillStrohl #QCDUG CHANGE OR REPLACE THEMES Find & Clear Default Site Settings -- find site settings for default theme settings SELECT [PortalID],[SettingName],[SettingValue] FROM [dbo].[PortalSettings] WHERE [SettingName] IN (N'DefaultAdminContainer', N'DefaultAdminSkin', N'DefaultPortalContainer', N'DefaultPortalSkin') AND [PortalID] = 0; -- update the site settings to remove the default theme settings UPDATE [dbo].[PortalSettings] SET [SettingValue] = NULL WHERE [SettingName] IN (N'DefaultAdminContainer', N'DefaultAdminSkin', N'DefaultPortalContainer', N'DefaultPortalSkin') AND [PortalID] = 0;
  • 18. @WillStrohl #QCDUG CHANGE OR REPLACE THEMES Find & Clear Page Settings -- find pages with the skin set SELECT [TabID],[PortalID],[TabName],[SkinSrc],[ContainerSrc] FROM [dbo].[Tabs]; -- update all pages to remove skin settings UPDATE [dbo].[Tabs] SET [SkinSrc] = NULL, [ContainerSrc] = NULL WHERE [PortalID] = 0;
  • 19. @WillStrohl #QCDUG CHANGE OR REPLACE THEMES Find & Clear Module Settings -- find modules with the container set SELECT [TabModuleID],[TabID],[ModuleID],[ContainerSrc] FROM [dbo].[TabModules]; -- update all modules to remove container settings UPDATE [dbo].[TabModules] SET [SkinSrc] = NULL, [ContainerSrc] = NULL WHERE [PortalID] = 0;
  • 20. @WillStrohl #QCDUG CHANGE OR REPLACE THEMES Find & Replace Page Settings -- find pages with the skin set SELECT [TabID],[PortalID],[TabName],[SkinSrc],[ContainerSrc] FROM [dbo].[Tabs] WHERE [SkinSrc] LIKE N'%FutureGravity%' OR [ContainerSrc] LIKE N'%FutureGravity%'; -- update all pages to remove skin settings UPDATE [dbo].[Tabs] SET [SkinSrc] = REPLACE([SkinSrc], N'FutureGravity', N'Gravity'), [ContainerSrc] = REPLACE([ContainerSrc], N'FutureGravity', N'Gravity') WHERE [PortalID] = 0;
  • 22. @WillStrohl #QCDUG DATABASE OBJECT SIZES Symptoms Problem • Database fails • Disk space errors • Page load performance issues • Web host limits reached • The size of one or many database objects are too large http://bit.ly/dnndbsize
  • 23. @WillStrohl #QCDUG DATABASE SIZE SELECT CASE TYPE WHEN 'U' THEN 'User Defined Tables' WHEN 'S' THEN 'System Tables' WHEN 'IT' THEN 'Internal Tables' WHEN 'P' THEN 'Stored Procedures' WHEN 'PC' THEN 'CLR Stored Procedures' WHEN 'X' THEN 'Extended Stored Procedures' END, COUNT(*) FROM SYS.OBJECTS WHERE TYPE IN ('U', 'P', 'PC', 'S', 'IT', 'X') GROUP BY TYPE SELECT database_name = DB_NAME(database_id) , log_size_mb = CAST(SUM(CASE WHEN type_desc = 'LOG' THEN size END) * 8. / 1024 AS DECIMAL(8,2)) , row_size_mb = CAST(SUM(CASE WHEN type_desc = 'ROWS' THEN size END) * 8. / 1024 AS DECIMAL(8,2)) , total_size_mb = CAST(SUM(size) * 8. / 1024 AS DECIMAL(8,2)) FROM sys.master_files WITH(NOWAIT) WHERE database_id = DB_ID() -- for current db GROUP BY database_id
  • 24. @WillStrohl #QCDUG TABLE SIZE -- For storing values in the cursor DECLARE @TableName VARCHAR(100); -- Cursor to get the name of all user tables from the sysobjects listing DECLARE [tableCursor] CURSOR FOR SELECT [name] FROM [dbo].[sysobjects] WHERE OBJECTPROPERTY([id], N'IsUserTable') = 1 FOR READ ONLY; -- A procedure level temp table to store the results CREATE TABLE #TempTable ( [tableName] VARCHAR(100), [numberofRows] VARCHAR(100), [reservedSize] VARCHAR(50), [dataSize] VARCHAR(50), [indexSize] VARCHAR(50), [unusedSize] VARCHAR(50) ); -- Open the cursor OPEN [tableCursor]; -- Get the first table name from the cursor FETCH NEXT FROM [tableCursor] INTO @TableName; -- Loop until the cursor was not able to fetch WHILE (@@Fetch_Status >= 0) BEGIN -- Dump the results of the sp_spaceused query to the temp table
  • 25. TAKE OVER A SITE LOCALLY
  • 26. @WillStrohl #QCDUG TAKE OVER A SITE LOCALLY Symptoms Problem • Site inheritance issues • Need to create a login • Need to change user to host • Support has a time limit • Need to do this repeatedly • Production/local URL mismatch • Default URL setting gets in the way
  • 27. @WillStrohl #QCDUG TAKE OVER A SITE LOCALLY /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * must be run before being able to see the site * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ DECLARE @NewAlias NVARCHAR(255), @PortalId INT; SET @NewAlias = N'somenewdomain.loc'; SET @PortalId = 0; -- change the old site URL to the new local one IF NOT EXISTS (SELECT 1 FROM [dbo].[PortalAlias] WHERE [HTTPAlias] = @NewAlias) BEGIN INSERT INTO [dbo].[PortalAlias] ([PortalID], [HTTPAlias], [CreatedByUserID], [CreatedOnDate], [LastModifiedByUserID], [LastModifiedOnDate], [IsPrimary]) VALUES (@PortalId, @NewAlias, -1, GETDATE(), -1, GETDATE(), 1); UPDATE [dbo].[PortalAlias] SET [IsPrimary] = 0 WHERE NOT [HTTPAlias] = @NewAlias AND [PortalId] = @PortalId; END ELSE BEGIN UPDATE [dbo].[PortalAlias] SET [IsPrimary] = 1 WHERE [HTTPAlias] = @NewAlias;
  • 28. The passing of the buck… NEED MORE INFO?
  • 29. @WillStrohl #QCDUG Paul Scarlett Adv. Systems Developer, HP Enterprise Services • Long time DNN enthusiast • SqlGridSelectedView • SQL expert • TressleWorks.ca • @PaulScarlett

Editor's Notes

  1. DELETE is slower because it keeps logs and therefore can be rolled back without a TRANSACTION DELETE can use a WHERE clause TRUNCATE is faster because it doesn’t keep logs and therefore must be wrapped in a TRANSACTION in order to be rolled back TRUNCATE cannot use a WHERE clause