...
Create the following databases that are used in WSO2 Open Banking Key Manager
(WSO2_OB_KM)
and WSO2 Open Banking API Manager(WSO2_OB_APIM):
- openbank_am_configdb
openbank_apimgt_statsdb
openbank_apimgtdb
openbank_openbankingdb
openbank_govdb
openbank_iskm_configdb
openbank_mbstoredb
openbank_userdb
Tip Localtabgroup Localtab title MySQL For MySQL database, use this command with the database names from the list below.
Code Block language sql CREATE DATABASE <DATABASE_NAME>;
Localtab title MSSQL For Microsoft SQL database, use this command with the database names from the list below.
Code Block language sql CREATE DATABASE <DATABASE_NAME>;
Localtab title Oracle For Oracle database, use these commands with the database names from the list below.
Code Block CREATE USER <DATABASE_NAME> IDENTIFIED BY <PASSWORD>; GRANT SELECT ANY TABLE TO <DATABASE_NAME>; GRANT DELETE ANY TABLE TO <DATABASE_NAME>; GRANT INSERT ANY TABLE TO <DATABASE_NAME>; GRANT CREATE SESSION, CREATE TABLE, CREATE SEQUENCE, CREATE TRIGGER to <DATABASE_NAME>; ALTER USER <DATABASE_NAME> QUOTA <SPACE_QUOTA_SIZE_IN_MEGABYTES> ON USERS;
Place the compatible Oracle JDBC drivers in
<WSO2_OB_APIM_HOME>/repository/components/lib
and<WSO2_OB_KM_HOME>/repository/components/lib
Edit the default datasource configurations in the files below with the Oracle configurations.
<WSO2_OB_APIM_HOME>/repository/conf/datasources/master-datasources.xml
<WSO2_OB_APIM_HOME>/repository/conf/datasources/open-banking-datasources.xml
<WSO2_OB_KM_HOME>/repository/conf/datasources/master-datasources.xml
<WSO2_OB_KM_HOME>/repository/conf/datasources/open-banking-datasources.xml
Make sure you update the properties such as the url, username, password, driver class name in the configurations. A sample is given below:
Code Block language xml <datasource> <name>WSO2Config_DB</name> <description>Description for the datasource</description> <jndiConfig> <name>jdbc/WSO2Config_DB</name> </jndiConfig> <definition type="RDBMS"> <configuration> <url>jdbc:oracle:thin:@SERVER_NAME:PORT/SID</url> <username><DATABASE_NAME></username> <password><PASSWORD></password> <driverClassName>oracle.jdbc.driver.OracleDriver</driverClassName> <maxActive>300</maxActive> <maxWait>60000</maxWait> <minIdle>5</minIdle> <testOnBorrow>true</testOnBorrow> <validationQuery>SELECT 1 from dual</validationQuery> <validationInterval>30000</validationInterval> <defaultAutoCommit>false</defaultAutoCommit> </configuration> </definition> </datasource>
Update the INPUTS field size in
AM_APPLICATION_REGISTRATION
table in the sql file according to your database. The sql scripts are available in the<WSO2_OB_KM_HOME>/dbscripts/apimgt
directory.(mysql5.7.sql, mssql.sql, oracle.sql)
For UK and Australia specifications:
Localtabgroup Localtab title MySQL / MSSQL Code Block language sql INPUTS VARCHAR(7500),
Localtab title Oracle Code Block language sql INPUTS VARCHAR(4000),
For Berlin specification:
Code Block language sql INPUTS CLOB,
Note icon false Note If you are using Microsoft SQL, do the following changes, in addition to the step above.
Update the
IDN_OIDC_REQ_OBJECT_REFERENCE
table in<WSO2_OBKM_HOME>/dbscripts/apimgt/mssql.sql
file, by replacing the following lines:Replace
FOREIGN KEY (CONSUMER_KEY_ID) REFERENCES IDN_OAUTH_CONSUMER_APPS(ID) ON DELETE CASCADE
withCode Block FOREIGN KEY (CONSUMER_KEY_ID) REFERENCES IDN_OAUTH_CONSUMER_APPS(ID)
Replace
FOREIGN KEY (TOKEN_ID) REFERENCES IDN_OAUTH2_ACCESS_TOKEN(TOKEN_ID)
withCode Block FOREIGN KEY (TOKEN_ID) REFERENCES IDN_OAUTH2_ACCESS_TOKEN(TOKEN_ID) ON DELETE CASCADE
To create the database schema, execute the following scripts against the given database:
Localtabgroup Localtab title MySQL Database Name Scripts to execute openbank_am_configdb <WSO2_OB_APIM_HOME>/dbscripts/mysql5.7.sql
openbank_mbstoredb <WSO2_OB_APIM_HOME>/dbscripts/mb-store/mysql-mb.sql
openbank_openbankingdb For
UK
specification:<WSO2_OB_APIM_HOME>/dbscripts/finance/dynamic-client-registration/mysql-5-7.sql
<WSO2_OB_KM_HOME>/dbscripts/finance/openbanking.org.uk/mysql-5-7.sql
<WSO2_OB_KM_HOME>/dbscripts/finance/event-notification/mysql-5-7.sql
For
Berlin
specification:<WSO2_OB_KM_HOME>dbscripts/finance/berlin-group.org/mysql-5-7.sql
openbank_govdb <WSO2_OB_KM_HOME>/dbscripts/mysql5.7.sql
openbank_iskm_configdb <WSO2_OB_KM_HOME>/dbscripts/mysql5.7.sql
openbank_userdb <WSO2_OB_KM_HOME>/dbscripts/mysql5.7.sql
openbank_apimgtdb <WSO2_OB_KM_HOME>/dbscripts/apimgt/mysql5.7.sql
Localtab title MSSQL Database Name Scripts to execute openbank_am_configdb <WSO2_OB_APIM_HOME>/dbscripts/mssql.sql
openbank_mbstoredb <WSO2_OB_APIM_HOME>/dbscripts/mb-store/mssql-mb.sql
openbank_openbankingdb For
UK
specification:<WSO2_OB_APIM_HOME>/dbscripts/finance/dynamic-client-registration/mssql.sql
<WSO2_OB_KM_HOME>/dbscripts/finance/openbanking.org.uk/mssql.sql
<WSO2_OB_KM_HOME>/dbscripts/finance/event-notification/mssql.sql
For
Berlin
specification:<WSO2_OB_KM_HOME>/dbscripts/finance/berlin-group.org/mssql.sql
openbank_govdb <WSO2_OB_KM_HOME>/dbscripts/mssql.sql
openbank_iskm_configdb <WSO2_OB_KM_HOME>/dbscripts/mssql.sql
openbank_userdb <WSO2_OB_KM_HOME>/dbscripts/mssql.sql
openbank_apimgtdb <WSO2_OB_KM_HOME>/dbscripts/apimgt/mssql.sql
Localtab title Oracle Database Name Scripts to execute openbank_am_configdb <WSO2_OB_APIM_HOME>/dbscripts/oracle.sql
openbank_mbstoredb <WSO2_OB_APIM_HOME>/dbscripts/mb-store/oracle-mb.sql
openbank_openbankingdb For
UK
specification:<WSO2_OB_APIM_HOME>/dbscripts/finance/dynamic-client-registration/oracle.sql
<WSO2_OB_KM_HOME>/dbscripts/finance/openbanking.org.uk/oracle.sql
<WSO2_OB_KM_HOME>/dbscripts/finance/event-notification/oracle.sql
For
Berlin
specification:<WSO2_OB_KM_HOME>/dbscripts/finance/berlin-group.org/oracle.sql
openbank_govdb <WSO2_OB_KM_HOME>/dbscripts/oracle.sql
openbank_iskm_configdb <WSO2_OB_KM_HOME>/dbscripts/oracle.sql
openbank_userdb <WSO2_OB_KM_HOME>/dbscripts/oracle.sql
openbank_apimgtdb <WSO2_OB_KM_HOME>/dbscripts/apimgt/oracle.sql
Note |
---|
For more information on configuring databases, see Working with Databases. |