Install Oracle and PostgreSQL databases
The whitepaper describes which parameters to set so that customers and partners can install Oracle, PostgreSQL, and AWS-RDS PostgreSQL databases on their own.
Parameter for Oracle database
General recommendations
Please follow these general recommendations for each Oracle database installation:
Parameter "NLS_CHARACTERSET" value must be "AL32UTF8".
Parameter “NLS_LENGTH_SEMANTICS” value must be “BYTE” and must also be specified as “Byte” by default.
The application server uses only a dedicated server process and has its own connection pool mechanism. No dispatchers.
Parameter “PROCESSES” must be extended from default 300 to (number of censhare Servers * censhare parameter max-open JDBC connections + number of background Oracle processes).Example: for 3 censhare Servers, the number of Oracle processes should be set to 500.
Also, the parameter “open-cursors” must be extended and set from the default of 50 to 300 in the database.
Operating system “Timezone” should be the same as the master “censhare server”. It should be “UTC” or “local timezone”.
At least 5 x 200MB redo log groups. For mission-critical environments the groups should be multiplexed.
SGA can be ranged from 1GB for small DEV servers to 60 GB for globally distributed environments with several hundred concurrent censhare users. Key factor for the SGA sizing is the number of censhare assets, features and relations.
Censhare v5 only requires one tablespace, which we usually name CORPUS. Sizing estimates range from 20 to 100 GB growth per year.
Grant connect, resource, select_catalog_role on the application user named "corpus".
Strict separation on the login to PROD from DEV schemas (aka. sourceIP -> DBschema pairs). For example: If PROD and DEV schemas are in the same database, then a login trigger should allow login to the PROD schema only from the IP on the PROD servers. If DEV and CONS schemas are in different databases, then firewall or listener rules (validnode_checking) on the PROD database should allow login only from the IP address on the PROD censhare servers.
Monitoring with thresholds, alerts and usage charts on Tablespace and FRA usage, listener and database availability. For example, Icinga, Enterprise Manager etc.
Since censhare version 2019.3 and if Oracle is version 12c, also set the parameter below in the Oracle database:
MAX_STRING_SIZE: Extended
https://dbaclass.com/article/max_string_size-parameter-oracle-12c/
Note: Except all of the above parameters, we assume the default values according to the following Oracle database reference documentation: https://docs.oracle.com/en/database/oracle/oracle-database/19/refrn/initialization-parameters-2.html
Parameter for PostgreSQL database
“timezone” and “log_timezone” parameter values in the “postgresql.conf” file should be identical to the master “censhare server”. It should be “UTC” or “local timezone”.
While creating the PostgreSQL database, we also need to create a “type cast” in the database from the “super” user like “postgres”.
XML--implicit type casts -- known case: master data removing, cast rowid varchar in Java to int in PG CREATE CAST (varchar AS integer) WITH INOUT AS IMPLICIT; -- known case: #3128479 CREATE CAST (bigint AS varchar) WITH INOUT AS IMPLICIT;
“postgresql-creat-user.sql” script for community version of PostgreSQL
CREATE USER corpus PASSWORD 'corpus';
CREATE DATABASE corpus OWNER corpus TEMPLATE template0 ENCODING 'UTF8';
\c corpus-- implicit type casts
-- known case: master data removing, cast rowid varchar in Java to int in PG
CREATE CAST (varchar AS integer) WITH INOUT AS IMPLICIT;
-- known case: #3128479
CREATE CAST (bigint AS varchar) WITH INOUT AS IMPLICIT;[corpus@cs-test20192-css01 database]$
CREATE USER corpus PASSWORD 'corpus';
grant corpus to postgres;
CREATE DATABASE corpus OWNER corpus TEMPLATE template0 ENCODING 'UTF8'; \c corpus postgres
-- implicit type casts
-- known case: master data removing, cast rowid varchar in Java to int in PG alter type varchar owner to postgres;
CREATE CAST (varchar AS integer) WITH INOUT AS IMPLICIT;
-- known case: #3128479
CREATE CAST (bigint AS varchar) WITH INOUT AS IMPLICIT;