Question
JP Morgan Chase & Co.
US
Last activity: 15 Apr 2020 18:51 EDT
Connection to MS SQL server database from PEGA
We need to connect to a Microsoft SQL server database from PEGA 8.2.2 which is running on IBM Websphere 8.5.5.
1. I have created a data source "ABC" with JNDI name as "jdbc/ABC" in IBM websphere console, provided database name, server name, port number, user name and password in console.
2. Test Connection from Websphere console is working fine for this data source
3. Created a database instance rule in PEGA and configured its how to connect as "use JDBC Connection pool" and JNDI name as "jdbc/ABC". On save of rule getting below error
ERROR:
We need to connect to a Microsoft SQL server database from PEGA 8.2.2 which is running on IBM Websphere 8.5.5.
1. I have created a data source "ABC" with JNDI name as "jdbc/ABC" in IBM websphere console, provided database name, server name, port number, user name and password in console.
2. Test Connection from Websphere console is working fine for this data source
3. Created a database instance rule in PEGA and configured its how to connect as "use JDBC Connection pool" and JNDI name as "jdbc/ABC". On save of rule getting below error
ERROR:
DatabaseException caused by prior exception: javax.naming.NameNotFoundException: Context: <XXXX>/clusters/<XXX>_cluster1, name: jdbc/ABC: First component in name ABC not found. [Root exception is org.omg.CosNaming.NamingContextPackage.NotFound: IDL:omg.org/CosNaming/NamingContext/NotFound:1.0]
4. I believe this error is cause I have not defined this data source in prconfig.xml file.
Trying to figure out the syntax to define this data source in prconfig file. On PDN, I have seen articles where its asking to mention below settings but in my case, I believe its not required as I have already given database details, user name and password in web console.
database/databases/PegaRULES/url
database/databases/PegaRULES/userName
database/databases/PegaRULES/password
Should I just give this setting?
<env name="database/databases/ABC/dataSource" value="ABC"/>
Also, is it required to again give driver name in prconfig.xml like below? I have already copied sql jar file on my server and have mentioned path in jdbc provider class path.
<env name="database/drivers" value="com.microsoft.jdbc.sqlserver.SQLServerDriver"/>