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:
- 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
- Replace all semicolons (;) with the string GO in the customSQL.sql.
- Send both files to the database administrator.
- The database administrator must run the customSQLAdmin.sql file on the database server.
- The database administrator must run the customSQL.sql file on the new database created with the previous query.