Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

We are getting SQLServerException: Must declare the scalar error



While install PEGA7.2.1 with data base "Micro Soft SQL server 2012", the user noticed the following error.

SQLServerException: Must declare the scalar variable "@firstdayOfWeek".

see the error screen shot and logs.

Error Messages

java] Exception in thread "main" com.pega.pegarules.install.SQLLoaderException: Error executing SQL statements
[java] at com.pega.pegarules.install.SQLLoader.load(
[java] at com.pega.pegarules.install.SQLLoader.main(
[java] Caused by: Must declare the scalar variable "@firstdayOfWeek".
[java] at
[java] at
[java] at
[java] at$StmtExecCmd.doExecute(
[java] at
[java] at
[java] at
[java] at
[java] at
[java] at com.pega.pegarules.install.SQLLoaderInternal.readAndExecuteSQLStatements(
[java] at com.pega.pegarules.install.SQLLoaderInternal.load(
[java] at com.pega.pegarules.install.SQLLoader.loadInner(
[java] at com.pega.pegarules.install.SQLLoader.load(
[java] ... 1 more

Steps to Reproduce

  1. Configure MS SQL Server 2012
  2.  Install PRPC 7.2.1

Root Cause

Customer has configured a collation in MS-SQL which causes stored procedure content to be case sensitive.


Advised customer to update MS-SQL to use different collation.

Published October 7, 2016 - Updated October 8, 2020

Was this useful?

0% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us