Error received when creating MSSQL database

Error received when creating MSSQL database

When creating the database for MSSQL, you might receive an error similar to the following:
'CREATE SCHEMA' must be the first statement in a query batch.

Cause and solution

When you run the configureDb script specifying the execsql=false parameter, the customSQL.sql and customSQLAdmin.sql are created and stored locally.

Before sending them to the database administrator, perform the following steps:
  1. Add the following to strings to the customSQL.sql file:
    CREATE SCHEMA EVT
    GO
    CREATE SCHEMA PLN
    GO
    CREATE SCHEMA MDL
    GO
    CREATE SCHEMA LOG
    GO
    CREATE SCHEMA DWB
    GO
  2. Replace all semicolons (;) with the string GO in the customSQL.sql.
  3. Send both files to the database administrator.
  4. The database administrator must run the customSQLAdmin.sql file on the database server.
  5. The database administrator must run the customSQL.sql file on the new database created with the previous query.
For more information about the execsql parameter and the configureDb script, see Database configuration - configureDB script.