Tomcat Pega 7.31 - dual user configuration SQL error with create index
Hi All,
I've been looking at the system as a whole and investigating required indexes to improve performance. To that end I looked at the Database Optimize Schema option to seem what PEGA recommended. There were some indexes it recommended so I decided to go a head and create one on our test box. However even though this returned a successful message the index wasn't created and there was an error in the log.
Following changes were applied sucessfully
A index (WORKTYPEIndex) is created on table PEGA720_DATA.CRM_LINK_OPERATOR_TERRITORY for the column WORKTYPE.
ERROR - Cannot find the object "PEGA720_DATA.CRM_LINK_OPERATOR_TERRITORY" because it does not exist or you do not have
permissions. com.microsoft.sqlserver.jdbc.SQLServerException: Cannot find the object "PEGA720_DATA.CRM_LINK_OPERATOR_TERRITORY"
because it does not exist or you do not have permissions.
I have checked and changed our configuration based on https://pdn.pega.com/how-provide-create-table-and-alter-table-database-privileges-admin-database-account but it still complains.
Here is my context.xml file :-
Hi All,
I've been looking at the system as a whole and investigating required indexes to improve performance. To that end I looked at the Database Optimize Schema option to seem what PEGA recommended. There were some indexes it recommended so I decided to go a head and create one on our test box. However even though this returned a successful message the index wasn't created and there was an error in the log.
Following changes were applied sucessfully
A index (WORKTYPEIndex) is created on table PEGA720_DATA.CRM_LINK_OPERATOR_TERRITORY for the column WORKTYPE.
ERROR - Cannot find the object "PEGA720_DATA.CRM_LINK_OPERATOR_TERRITORY" because it does not exist or you do not have
permissions. com.microsoft.sqlserver.jdbc.SQLServerException: Cannot find the object "PEGA720_DATA.CRM_LINK_OPERATOR_TERRITORY"
because it does not exist or you do not have permissions.
I have checked and changed our configuration based on https://pdn.pega.com/how-provide-create-table-and-alter-table-database-privileges-admin-database-account but it still complains.
Here is my context.xml file :-
<Resource name="jdbc/PegaRULES"
auth="Container"
type="javax.sql.DataSource"
driverClassName="com.microsoft.sqlserver.jdbc.SQLServerDriver"
url="jdbc:sqlserver://devserver:1433;databaseName=PEGADEV;selectMethod=cursor;sendStringParametersAsUnicode=false;multiSubnetFailover=true"
username="pegabaseuserdev"
password="password"
maxTotal="100"
maxIdle="30"
maxWaitMillis="10000"
/>
<Resource name="jdbc/AdminPegaRULES"
auth="Container"
type="javax.sql.DataSource"
driverClassName="com.microsoft.sqlserver.jdbc.SQLServerDriver"
url="jdbc:sqlserver://devserver:1433;databaseName=PEGADEV;selectMethod=cursor;sendStringParametersAsUnicode=false;multiSubnetFailover=true"
username="pegaadminuserdev"
password="password"
maxTotal="10"
maxIdle="5"
maxWaitMillis="5000"
/>
<Environment
name="prconfig/database/databases/PegaRULES/defaultSchema"
value="pega_rules"
type="java.lang.String" />
<Environment
name="prconfig/database/databases/PegaDATA/defaultSchema"
value="pega_data"
type="java.lang.String" />
<Environment name="url/initialization/explicittempdir"
value="C:\Pega\tmp"
type="java.lang.String"/>
<Environment
name="prconfig/database/databases/PegaRULES/dataSourceAdmin"
value="java:comp/env/jdbc/AdminPegaRULES"
type="java.lang.String" />
<Environment
name="prconfig/database/databases/PegaDATA/dataSourceAdmin"
value="java:comp/env/jdbc/AdminPegaRULES"
type="java.lang.String" />
And prconfig.xml
<env name="initialization/settingsource" value="merged" />
<env name="database/databases/PegaRULES/dataSource" value="java:comp/env/jdbc/PegaRULES"/>
<env name="database/databases/PegaDATA/dataSource" value="java:comp/env/jdbc/PegaRULES"/>
Also database/AutoDBSchemaChanges is set to true.
What am I missing here?
I have also read the Pega 7 Platform Installation Guide 7.2 for Tomcat and MSSQL. However in this guide it make reference to a binding pointing to PegaRULESdbAdmin but makes not further mention of it.
I should mention that I can execute the generated query manually with the defined Admin user account so it's not a database user issue.
PEGA 7.31, Tomcat 8.5, MS SQL 2014
Cheers
Craig