Support Article
Error on running any query using Query Runner
SA-76930
Summary
Unable to use Query Runner. The user is able to access Query Runner and view the tables using Schema Tools, however, on running any query, an error occurs.
Error Messages
Unable to fetch SELECT query results select * from data.xxxxx LIMIT 10: code: <none> SQLState: The DataStoreConfiguration was not found for the DB Name "pegadata" as it is not registered in the configuration map Message: <none>
DatabaseException caused by prior exception: com.pega.platform.datastore.ConfigurationException: The DataStoreConfiguration was not found for the DB Name "pegadata" as it is not registered in the configuration map
Steps to Reproduce
- Log in to Designer Studio
- Assign a Database Administrator role to the user
- Log off from the application. Verify that the Query Runner page link displays as expected for the user
- Execute the queries in PegaRULES or PegaDATA Schema
Root Cause
The PegaRULES and PegaDATA datasource is not configured in read-only to use the Query Runner feature.
Resolution
Perform the following local-change:
- Add the following datasource in the context.xml file after the PegaRULES datasource:
<Resource name="jdbc/PegaRULESReadOnly"
auth="Container"
factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"
type="javax.sql.DataSource"
driverClassName="org.postgresql.Driver"
url="jdbc:postgresql://localhost:5433/pega_811"
username="postgres"
password="------"
maxActive="10"
maxIdle="10"
/>
Note : This is an additional source that is added as s read-only user from the Pega application. All configurations can be same except the JNDI name which is PegaRULESReadOnly.
- In the prconfig.xml, add the following JNDI entry for PegaRULES and PegaDATA:
<env name="database/databases/PegaRULES/dataSourceReadOnly" value="java:comp/env/jdbc/PegaRULESReadOnly"/>
<env name="database/databases/PegaDATA/dataSourceReadOnly" value="java:comp/env/jdbc/PegaRULESReadOnly"/>
- Restart the server and execute the query
Published August 15, 2019 - Updated December 2, 2021
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.