RichardHowells posted on April 27, 2016 08:26
SQL Scripts for DNN normally contain a pair of special extra tokens not seen in 'normal' SQL. For example a CREATE TABLE statement would say:
CREATE TABLE {databaseOwner}[{objectQualifier}TABLENAME]...
When processed by the SQL processor inside DNN the tokens are replaced with values read from the Web,Config file. Typical web config values set both to an empty string making the real statement
CREATE TABLE [TABLENAME]...
If you choose to run DNN SQL in external tools such as Query Manager or SQL Server Management Studio then you must manually edit out the tokens.
Why it's done this way
In the early days of DNN, web site hosting with SQL server was expensive and often priced per database. Manipulating the {databaseOwner} and {objectQualifier} values allowed mutiple DNN installations in the same database using different objectQualifier values. One install could have a family of tables prefixed (say) install01 and another could have a family of tables prefixed (say) install02.