Download as pdf or txt
Download as pdf or txt
You are on page 1of 22

TAFJ-O r a cl e 1 2 c I n s t a ll

R20
TAFJ-O r a cl e 1 2 c I n s t a ll

Document History:

Revisio
Date Amended Name Description
n

11 1st April 2011 TAFJ team Initial version

12 7st February 2012 H. Aubert R12GA review

13 16th January 2013 R. Vincent R13GA review

14 10th September 2013 H. Aubert R14GA review

15 20th February 2014 R. Vincent R14GA review

15 15th April 2014 H. Aubert R14GA review

G.Gowriman
16 4th Feb 2015 Altered the Database creation steps
i

17 15th March 2016 R. Vincent R16 AMR review

18 20th September 2017 JN. Charpin Grant for XA recovery

19 12th December 2017 S. Vinod Altered the user creation dbscript

Change correct oracle DB creation screen prints


20 23rd Jan 2019 Mkumar
using custom database option.

21 21st March 2019 Praveen D R19 AMR Review

22 9th March 2019 R. Vincent Add JSON documentation

23 26th Mar 2020 Praveen D R20 AMR Review

Page 2
TAFJ-O r a cl e 1 2 c I n s t a ll

Copyri g h t
Copyright © Temenos Headquarters SA 2009-2020. All rights reserved
This document contains proprietary information that is protected by copyright. No part of this
document may be reproduced, transmitted, or made available directly or indirectly to a third
party without the express written agreement of TEMENOS UK Limited. Receipt of this
material directly TEMENOS UK Limited constitutes its express permission to copy.
Permission to use or copy this document expressly excludes modifying it for any purpose, or
using it to create a derivative therefrom.

Errat a and Com m e n t s


If you have any comments regarding this manual or wish to report any errors in the
documentation, please document them and send them to the address below:
Technology Department

Temenos Headquarters SA
2 Rue de l’Ecole-de-Chimie,
CH - 1205 Geneva,
Switzerland

Tel SB: +41 (0) 22 708 1150


Fax: +41 (0) 22 708 1160

Please include your name, company, address, and telephone and fax numbers, and email
address if applicable. TAFJdev@temenos.com

Page 3
TAFJ-O r a cl e 1 2 c I n s t a ll

Table of Contents
Copyright................................................................................................................................................ 3
Errata and Comments............................................................................................................................ 3
Introduction............................................................................................................................................. 5
Install Oracle........................................................................................................................................... 5
Create a Database Instance................................................................................................................... 5
 Launch the Database configuration assistant............................................................5
Create TableSpace and a User............................................................................................................ 15
Load the necessary Stored functions................................................................................................... 18
Storing JSON........................................................................................................................................ 19
Procedure for applying JSON fix......................................................................................... 20

Page 4
TAFJ-O r a cl e 1 2 c I n s t a ll

Intro d u c t i o n
This document will show all steps to configure a database, ready to be used by T24 with
TAFJ. At this time TAFJ only supports Oracles Version 11 and up.

This procedure is for Windows® platform. For all other OS please refer to the official product
documentation.

Inst a l l Oracl e
Most steps aren’t shown. Please follow the official Oracle document setup.

For 12c, see http://docs.oracle.com/cd/E16655_01/nav/portal_11.htm

Creat e a Data b a s e Inst a n c e


 Launc h th e Dat a b a s e co nf i g u r a t i o n as si s t a n t .

Or

 Execute %ORACLE_HOME%\BIN\dbca.bat

Page 5
TAFJ-O r a cl e 1 2 c I n s t a ll

 Select Create a Database...

 Press Next…
 Choose Advanced mode

Page 6
TAFJ-O r a cl e 1 2 c I n s t a ll

 Choose custom Database


 Next

Page 7
TAFJ-O r a cl e 1 2 c I n s t a ll

 Set a Global Database name. You will have to report this name in the property file
of your project to the key temn.tafj.jdbc.url

 uncheck configure Enterprise Manager

 Press Next…

 Enter the Administrative password for the DB.

(This is NOT (!) the password you will set in the properties file...)

Page 8
TAFJ-O r a cl e 1 2 c I n s t a ll

 Press Next…

 Uncheck Flash recovery

 Press Next…

 Choose Oracle JVM

Page 9
TAFJ-O r a cl e 1 2 c I n s t a ll

 Press Next…

 IMPORTANT! Specify AL32UTF8 in the Character Sets tab...

Page 10
TAFJ-O r a cl e 1 2 c I n s t a ll

 Press Next…

Page 11
TAFJ-O r a cl e 1 2 c I n s t a ll

 Press Next…

 Press Finish…

 and let it run.

Page 12
TAFJ-O r a cl e 1 2 c I n s t a ll

 Press Exit… (The URL will be used as to connect to the database monitor.)

 Press Close…

 You can check your installation:


Browse the URL : https://localhost:5500/em

(The port number will be the one mentioned in the Database configuration Assistant)

Page 13
TAFJ-O r a cl e 1 2 c I n s t a ll

You can check your installation:

User Name : SYS

Password : The password you gave before

Connect as SYSDBA

Page 14
TAFJ-O r a cl e 1 2 c I n s t a ll

Page 15
TAFJ-O r a cl e 1 2 c I n s t a ll

Creat e Tabl e S p a c e and a Us er

In the TAFJ installation <TAFJ_HOME> \dbscripts\oracle, you will find 2 SQL scripts:

 createtablespace.sql
 createuser.sql

You will need to edit this script to reflect the correct data.

In the createtablespace_oracle.sql, you will need to change 2 values (in Green):

1. The tablespace name : <TableSpace_Name> should be oracle SID


2. The full path to the file holding the data : '<TableSpace_FullPathName>.dbf'

CREATE SMALLFILE TABLESPACE <TableSpace_Name> DATAFILE


'<TableSpace_FullPathName>.dbf' SIZE 7G AUTOEXTEND ON NEXT 100M
MAXSIZE UNLIMITED LOGGING EXTENT MANAGEMENT LOCAL SEGMENT SPACE
MANAGEMENT AUTO;

i.e:

CREATE SMALLFILE TABLESPACE T24DB DATAFILE


'C:\product\database\oracle\oradata\T24DB.dbf' SIZE 7G
AUTOEXTEND ON NEXT 100M MAXSIZE UNLIMITED LOGGING EXTENT
MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO;

Page 16
TAFJ-O r a cl e 1 2 c I n s t a ll

In the createuser_oracle.sql, you will need to change the username and the password and
the tablespace name (in Green):

The tablespace Name : <TableSpace_Name>


The DB User Name : <DBUser>
The DB Password : <DBPassword>

CREATE USER <DBUser> PROFILE "DEFAULT" IDENTIFIED BY <DBPassword>


DEFAULT TABLESPACE “<TableSpace_Name>” TEMPORARY TABLESPACE "TEMP"
ACCOUNT UNLOCK;
GRANT "CONNECT" TO <DBUser>;
GRANT "RESOURCE" TO <DBUser>;
grant query rewrite to <DBUser>;
grant create synonym to <DBUser>;
grant drop any procedure to <DBUser>;
grant create any table to <DBUser>;
grant select any table to <DBUser>;
grant update any table to <DBUser>;
grant insert any table to <DBUser>;
grant delete any table to <DBUser>;
grant drop any table to <DBUser>;
grant create any index to <DBUser>;
grant alter any index to <DBUser>;
grant drop any index to <DBUser>;
grant create any view to <DBUser>;
grant drop any view to <DBUser>;
grant create any directory to <DBUser>;
grant select_catalog_role to <DBUser>;
grant xdbadmin to <DBUser>;
grant execute on dbms_lock to <DBUser>;
grant unlimited tablespace to <DBUser>;
grant select on sys.dba_pending_transactions TO <DBUser>;
grant select on sys.pending_trans$ TO <DBUser>;
grant select on sys.dba_2pc_pending TO <DBUser>;
grant execute on sys.dbms_xa TO <DBUser>;

i.e:

CREATE USER tafj PROFILE "DEFAULT" IDENTIFIED BY secret DEFAULT TABLESPACE


"T24BD" TEMPORARY TABLESPACE "TEMP" ACCOUNT UNLOCK;
GRANT "CONNECT" TO tafj;
GRANT "RESOURCE" TO tafj;
grant query rewrite to tafj;
grant create synonym to tafj;
grant drop any procedure to tafj;
grant create any table to tafj;
grant select any table to tafj;
grant update any table to tafj;

Page 17
TAFJ-O r a cl e 1 2 c I n s t a ll

grant insert any table to tafj;


grant delete any table to tafj;
grant drop any table to tafj;
grant create any index to tafj;
grant alter any index to tafj;
grant drop any index to tafj;
grant create any view to tafj;
grant drop any view to tafj;
grant create any directory to tafj;
grant select_catalog_role to tafj;
grant xdbadmin to tafj;
grant execute on dbms_lock to tafj;
grant unlimited tablespace to tafj;
grant select on sys.dba_pending_transactions to tafj;
grant select on sys.pending_trans$ to tafj;
grant select on sys.dba_2pc_pending to tafj;
grant execute on sys.dbms_xa to tafj;

Once these values have been changed, launch a console and from <TAFJ_HOME>
\dbscripts\oracle, type:

>sqlplus "/ as SYSDBA"

Then, type:

@createtablespace_oracle.
sql
And

@createuser_oracle.sq
l

You will have to give the full path to these scripts if there are not in the current directory.
These script can take several minutes to be executed.

Then, exit from sqlplus

exit

Page 18
TAFJ-O r a cl e 1 2 c I n s t a ll

Load th e ne c e s s a r y Stor e d fun c t i o n s

Modify the scripts in <TAFJ_HOME>/dbscripts/oracle javaload(.bat) and javaunload(.bat) to


have the correct user, and password. These values are the one you've specified in the
createuser.sql. Also, make sure that the database name is correct (“j24db” or whatever
you've specified during the database creation).

you will need to change the username and the password and the tablespace name (in
Green):

The database Name : <oracle_SID>


The DB User Name : <DBUser>
The DB Password : <DBPassword>
loadjava -user <DBUser>/<DBPassword>@localhost:1521:<oracle_SID>
-verbose -force -resolve -thin
[INSTALL_DIR]/dbscripts/BasicFunctions.java

i.e:

loadjava -user tafj/secret@localhost:1521:T24DB -verbose -force


-resolve -thin "C:\product\TAFJ\dbscripts\BasicFunctions.java"

Then run the javaload(.bat) script.

>javaload

On the console, you will get:

creating : source com/temenos/dbi/storedfunctions/BasicFunctions


loading : source com/temenos/dbi/storedfunctions/BasicFunctions
created : CREATE$JAVA$LOB$TABLE
resolving: source com/temenos/dbi/storedfunctions/BasicFunctions
Classes Loaded: 0
Resources Loaded: 0
Sources Loaded: 1
Published Interfaces: 0
Classes generated: 0
Classes skipped: 0
Synonyms Created: 0
Errors: 0

Page 19
TAFJ-O r a cl e 1 2 c I n s t a ll

Once done, launch sqlplus with the user you created

>sqlplus <DBUser>

And type

@javafunctions_oracle.sql

This should create your sqlfunction which bind to the java functions you created earlier.

Then, exit from sqlplus

exit

Once this is finished you should be able to run a DBImport for oracle. Don’t forget to copy
the ORACLE drivers from <TAFJ_HOME>/dbdrivers to <TAFJ_HOME>/ext. The
properties that go in the TAFJ properties file look like this:

temn.tafj.jdbc.url = jdbc:oracle:thin:@localhost:1521:T24DB
temn.tafj.jdbc.driver = oracle.jdbc.driver.OracleDriver
temn.tafj.jdbc.username = tafj
temn.tafj.jdbc.password = secret

Stori n g JSON
Oracle supports storing and querying JSON, and TAFJ now supports storing it in Blob
columns. To import your data in JSON format:

1) Put T24’s AllRecords.jar into <TAFJ_HOME>/ext (this jar stores the metadata for
JSON representation of different tables and is needed by TAFJ)

2) Run a DBImport and select JSON as the data type.

JSON tables are created with a constraint to ensure it is valid JSON. An example CREATE
TABLE statement follows.

Page 20
TAFJ-O r a cl e 1 2 c I n s t a ll

CREATE TABLE <TableName> (RECID VARCHAR2(255) NOT NULL PRIMARY KEY,


XMLRECORD BLOB CONSTRAINT <TableName>_json CHECK (XMLRECORD IS JSON))
LOB (XMLRECORD) STORE AS (CACHE)";

During the DBImport, JSON views will be created with a json_table for single attribute
columns. Multi-value columns will be formed using json_exists function dynamically. Putting
multi-value columns inside a json_table creates an unwanted Cartesian product.

JSON columns can be promoted and indexed. Please see the Oracle documentation.

Note that Oracle has a bug with prepared statements with version 12.2.0.1 that
requires a patch. To get around this bug, one can set the property
temn.tafj.jdbc.use.ps.json.oracle.fix=true in tafj.properties (default is false as applying
the patch is better)

Proc e d u r e for applyi n g JSON fix.


Apply Oracle patch 28662603 and 25028996.

1. Download the patches from support.oracle.com and extract the contents of the patch on
Oracle Server. Ensure that the ORACLE_HOME is set to the correct path and there are no
processes running in the ORACLE_HOME(database or oracle listener)

Note: Before applying the opatch, download the latest version for opatch from the following
Oracle Metalink Note: 6880880 (p6880880_122010_Linux-x86-64.zip) or else you will get
errors apply $ORACLE_HOME/OPatch/opatch lsinventory or
$ORACLE_HOME/OPatch/opatch apply

Reference: https://support.oracle.com/knowledge/Oracle%20Database
%20Products/274526_1.html

2. After downloading the OPatch and copy the p6880880_122010_Linux-x86-64.zip file in


$ORACLE_HOME. Rename the current OPatch to OPatch_old and extract the contents
of p6880880_122010_Linux-x86-64.zip

To check current inventory for ORACLE_HOME

$ORACLE_HOME/OPatch/opatch lsinventory

1 ) Navigate to 28662603

a. cd 28662603

b. $ORACLE_HOME/OPatch/opatch apply

2) Navigate to 25028996

a. cd 25028996

b. $ORACLE_HOME/OPatch/opatch apply

Page 21
TAFJ-O r a cl e 1 2 c I n s t a ll

Check the applied patches running

$ORACLE_HOME/OPatch/opatch lsinventory

Page 22

You might also like