Instructions for DNN TurboSQL

Please read these instructions carefully to avoid data corruption and upgrade issues.
If you have any issues or questions, please contact us.

Minimum version supported is DNN 7.1.2; please do not apply to prior Versions.
The scripts take care of the DNN version currently running, i.e. you do not have to take care of it yourself.

Initial Install of TurboSQL for DNN Platform

  • Make sure you are running DNN 7.1.2 or above and got latest versions of these scripts
  • Do not run any or the scripts, if you are experiencing timeouts due to excessive transaction log size or DNN Event log size.
  • Always start with a backup of your database (files are not affected by any of these scripts).
  • Login as superuser (“host” by default) and go to “SQL” in “Host” menu
  • Scripts need to be applied in proper order:
    • always run TurboDNNxxx.sql first (xxx is max DNN version number to apply).
      This will optimize your database, correct some data, add indexes and relations as well as replace a number of views, functions and stored procedures with optimized versions
    • If TurboSQL has been applied properly, run TurboSchemaxxx.sql (xxx is max DNN version number to apply). This will add schemabinding to views and functions and add indexes to a number of views, further boosting performance.
      These changes need to be uninstalled, before you upgrade DNN in the future, please run TurboUnSchema for this purpose prior to the upgrade. 3rd party extensions are not affected.
    • Do not run TurboUnSchema, unless you are preparing for a future DNN upgrade (see next section)
  • Either load the scripts by locating it from local disk and upload or open scripts with a text editor and copy/paste complete content of the script into the text box.
  • For versions prior to DNN 7.2.0 you need to enable “Execute as Script”, before hitting execute
  • Check output for any errors reported – if not, it has been installed successfully.

Preparing a Future DNN Upgrade

  • Download versions of these scripts and make sure, the new version is already supported
  • Always start with a backup of your database (files are not affected by any of these scripts).
  • Login as superuser (“host” by default) and go to “SQL” in “Host” menu
  • Run TurboUnSchemaxxx.sql script as described before (xxx is max DNN version number to apply).
  • Perform your DNN upgrade
  • Re-apply latest version of TurboSQL script.
  • Re-Apply latest version of TurboSchema, in order to re-gain best performance.

Troubleshooting

  • In case you are experiencing an issue during the script running (like an application restart or timeout, you may re-run the script from inside a Database Tool like Microsoft SQL Server Management Studio (SSMS). In this case, you will paste or load the content of the script into a query window and Search&Replace all occurrences of “{databaseOwner}” with the proper value of “databaseOwner” in SqlDataProvider section in your web.config file with a trailing dot (“dbo.” by default) and “{objectQualifier}” with value of “databaseOwner” with a trailing “_”, if not empty (empty string by default).

Q & A

Q: What is the risk of applying the scripts?
A: If you do not apply PrepareDNNUpgrade.sqlscript, you might face upgrade issues

Q: How do the scripts improve performance of 3rd party extensions?
A: 3rd party extensions will benefit, when using core methods, however current script versions don’t include optimization for specific tables and procedures

Q: Does prepareforDNN_upgrade.sql undo all the changes previously applied
A: No, it just makes sure, DNN upgrades should run without issues, by removing schemabinding and applying version specific modifications, if DNN scripts are not properly written for re-run.

Q: How do I resolve, if the script didn't succeed or the DNN application restarted during execution?
A: You may run any of the scripts using e.g. SQL Server Management Studio, but need to replace {databaseOwner} and {objectQualifier} tokens with the appropriate values from web.config (by default {databaseOwner} is 'dbo.' (without quotes) and {objectQualifier} is an empty string.
---

Last edited Mar 19, 2015 at 12:07 PM by leupold, version 1