Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents
outlinetrue
stylenone


Note: Oracle is not supported for new installs; existing installations require Oracle version 12.2 or greater is required.

Install Notes

  • Schema names are case sensitive as of Oracle 12 and need to be in all caps in the PCR-360 config file to avoid errors
  • Included in the installation package is a file named oracle-create.sql; log into the main schema and execute these commands. Also included is a file named oracle-create-metadata.sql; log into the metadata schema and execute these commands.
  • If PHP is upgraded, you may need to update or install the latest instant client. A general rule of thumb is if PHP packages are upgraded, plan on upgrading the instant client as well. This package is frequently updated, so if the server is updated and the application stops working, try upgrading to the latest instant client.
    • To upgrade to the latest instant client, you should uninstall the old version, and install the latest.
  • The Database should be using a UTF8 format and the column lengths should all be Characters instead of Bytes.
    • If your Database was built using Bytes instead of Characters, often each column has to be converted individually, simply running "ALTER SESSIONSET NLS_LENGTH_SEMANTICS ='CHAR';" will not work because it does not convert existing columns, only new columns added after running the command are affected.

Instant Client Installation

...

Code Block
languagebash
rpm -ivh oracle-instantclient18.3-basic-18.3.0.0.0-1.x86_64.rpm
rpm -ivh oracle-instantclient18.3-devel-18.3.0.0.0-1.x86_64.rpm
rpm -ivh oracle-instantclient18.3-sqlplus-18.3.0.0.0-1.x86_64.rpm
yum -y install libnsl

Install OCI8 (for PHP < 7):

...

Impersonate the oracle user and login to the database. This requires sqlplus to be installed and configured:

Code Block
languagebash
sh -c "echo /usr/lib/oracle/19.5/client64/lib > /etc/ld.so.conf.d/oracle-instantclient.conf";
ldconfig

sudo su
su - oracle
sqlplus / as sysdba

...

Code Block
languagesql
ALTER SESSION SET NLS_LENGTH_SEMANTICS = 'CHAR';
CREATE USER pcr360_prod IDENTIFIED BY <password>password1;
CREATE USER pcr360_prod_archive IDENTIFIED BY <password>;
CREATE USER pcr360_prod_metadata IDENTIFIED BY <password>password2; 
 
 
GRANT CREATE TABLE TO pcr360_prod;
GRANT CREATE SEQUENCE TO pcr360_prod;
GRANT CREATE ANY INDEX TO pcr360_prod;
GRANT CREATE PROCEDURE TO pcr360_prod;
GRANT CREATE VIEW TO pcr360_prod;
GRANT CREATE SESSION TO pcr360_prod;
GRANT ALTER ANY TABLE TO pcr360_prod;
GRANT ALTER SESSION TO pcr360_prod;
GRANT LOCK ANY TABLE TO pcr360_prod;
GRANT DROP ANY SEQUENCE TO pcr360_prod;
GRANT SELECT ON V_$SESSION TO pcr360_prod;
GRANT UNLIMITED TABLESPACE TO pcr360_prod;

GRANT CREATE TABLE TO pcr360_prod_archive;
GRANT CREATE SEQUENCE TO pcr360_prod_archive;
GRANT CREATE ANY INDEX TO pcr360_prod_archive;
GRANT CREATE PROCEDURE TO pcr360_prod_archive;
GRANT CREATE VIEW TO pcr360_prod_archive;
GRANT CREATE SESSION TO pcr360_prod_archive;
GRANT ALTER ANY TABLE TO pcr360_prod_archive;
GRANT ALTER SESSION TO pcr360_prod_archive;
GRANT LOCK ANY TABLE TO pcr360_prod_archive;
GRANT DROP ANY SEQUENCE TO pcr360_prod_archive;
GRANT SELECT ON V_$SESSION TO pcr360_prod_archive;
GRANT UNLIMITED TABLESPACE TO pcr360_prod_archive; 
GRANT CREATE TABLE TO pcr360_prod_metadata;
GRANT CREATE SEQUENCE TO pcr360_prod_metadata;
GRANT CREATE ANY INDEX TO pcr360_prod_metadata;
GRANT CREATE PROCEDURE TO pcr360_prod_metadata;
GRANT CREATE VIEW TO pcr360_prod_metadata;
GRANT CREATE SESSION TO pcr360_prod_metadata;
GRANT ALTER ANY TABLE TO pcr360_prod_metadata;
GRANT ALTER SESSION TO pcr360_prod_metadata;
GRANT LOCK ANY TABLE TO pcr360_prod_metadata;
GRANT DROP ANY SEQUENCE TO pcr360_prod_metadata;
GRANT SELECT ON V_$SESSION TO pcr360_prod_metadata;
GRANT UNLIMITED TABLESPACE TO pcr360_prod_metadata;

...