Question
6
Replies
191
Views
Posted: September 13, 2019
Last activity: September 30, 2019
Closed
SQL Script to Generate Schemas
I'm installing Pega Platform 8.2 for the first time and I'm a little confused on the SQL configuration portion. I would like to use Pega best practices with dual-schema and dual-user configurations but I'm not familiar with creating schemas in SQL. Does anyone have a sql script that creates them per best practices?
***Moderator Edit-Vidyaranjan: Updated Platform Capability***
***Edited by Moderator Marissa to update SR Details***
Within the installation media you should find a script call generateddl .sh or .bat under the /scripts directory.
You can use this to generate the schema file for your system.
Before running the script you'll need to configure the setupDatabase.properties file for your system.
In particular for the schema generation you'll need to fill in the #CONNECTION INFORMATION.
For example, I'm using (for Oracle): -
# CONNECTION INFORMATION
pega.jdbc.driver.jar=C:/JDBC/ojdbc7.jar
pega.jdbc.driver.class=oracle.jdbc.OracleDriver
pega.database.type=oracledate
pega.jdbc.url=jdbc:oracle:thin:@localhost:1521/PRPC2
pega.jdbc.username=sa
pega.jdbc.password=nottelling
And the schema information: -
# RULES SCHEMA NAME
# The default is the value specified for the user name
rules.schema.name=PEGARULES
# DATA SCHEMA NAME
# The default is the value specified for the rules schema name
data.schema.name=PEGADATA
# CUSTOMER DATA SCHEMA NAME
# The default is the value specified for the data schema name
customerdata.schema.name=PEGACUSTOM
Then run the generateddl script.
If this finishes successfully it should generate the schema file in a subdirectory structure under the /schema directory (where this structure will depend on your DB type)