Oracle In-Memory Policy Analytics...configuration of Oracle In-Memory Policy Analytics, including a...

72
Oracle In-Memory Policy Analytics Technical Installation Overview November 2014 Copyright © 2014, Oracle and/or its affiliates. All rights reserved. November 2014

Transcript of Oracle In-Memory Policy Analytics...configuration of Oracle In-Memory Policy Analytics, including a...

Page 1: Oracle In-Memory Policy Analytics...configuration of Oracle In-Memory Policy Analytics, including a sample input database •For information on other administrative and configuration

Oracle In-Memory Policy AnalyticsTechnical Installation Overview

November 2014

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

November 2014

Page 2: Oracle In-Memory Policy Analytics...configuration of Oracle In-Memory Policy Analytics, including a sample input database •For information on other administrative and configuration

Who is this Technical Installation Overview For?

• This overview is for system administrators

• It provides information on the pre-requisites and steps involved to set up a default configuration of Oracle In-Memory Policy Analytics, including a sample input database

• For information on other administrative and configuration tasks, and how to use the product itself, see the following resources:

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

product itself, see the following resources:• Product Documentation

– http://documentation.custhelp.com/euf/assets/devdocs/november2014/PolicyAutomation/en/Default.htm

• Features and Benefits Presentation

– http://www.oracle.com/technetwork/apps-tech/policy-automation/overview/index-087567.html

• Demonstration Walkthrough

– http://www.oracle.com/technetwork/apps-tech/policy-automation/overview/index-087567.html

Page 3: Oracle In-Memory Policy Analytics...configuration of Oracle In-Memory Policy Analytics, including a sample input database •For information on other administrative and configuration

Product Background

Oracle In-Memory Policy Analytics

• Combines on-premise Oracle Policy Automation (OPA) product components with a new on-premise analysis server application

• Has a strict pre-requisite of only running on Exalytics hardware

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |

• Currently requires TimesTen, MySQL and WebLogic server–WebLogic Standard Edition license is included

• Is designed to work on data warehouse or application data that has been transported into the TimesTen database

3

Page 4: Oracle In-Memory Policy Analytics...configuration of Oracle In-Memory Policy Analytics, including a sample input database •For information on other administrative and configuration

Solution: Oracle In-Memory Policy Analytics

Empower policy owners to quickly

assess the impact

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |

assess the impact of existing and proposed

policy using real business rules and

real business data

4

Page 5: Oracle In-Memory Policy Analytics...configuration of Oracle In-Memory Policy Analytics, including a sample input database •For information on other administrative and configuration

Process Overview

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. 5

Model policy or legislation in Oracle Policy Modeling

Map your organization’s data onto the rules

Easily chart and compare policy options

Page 6: Oracle In-Memory Policy Analytics...configuration of Oracle In-Memory Policy Analytics, including a sample input database •For information on other administrative and configuration

High-Level Architecture

Policy Authors - Windows Desktop

Oracle Policy Modeling

Analyst Users - Client

Browser

OPA Hub Web OPA Batch Processor

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Exalytics Machine

6

OPA Analysis Output

Database

TimesTen

Customer Input Database

(read-only)

TimesTen

OPA Hub Web Application

OPA Analysis Server Web Application

WebLogic Server

OPA Batch Processor

OPA Hub Database

MySQL

Page 7: Oracle In-Memory Policy Analytics...configuration of Oracle In-Memory Policy Analytics, including a sample input database •For information on other administrative and configuration

This Presentation Covers the Server Components Only

Policy Authors - Windows Desktop

Oracle Policy Modeling

Analyst Users - Client

Browser

OPA Hub Web OPA Batch Processor

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |

Exalytics Machine

7

OPA Analysis Output

Database

TimesTen

Customer Input Database

(read-only)

TimesTen

OPA Hub Web Application

OPA Analysis Server Web Application

WebLogic Server

OPA Batch Processor

OPA Hub Database

MySQL

Page 8: Oracle In-Memory Policy Analytics...configuration of Oracle In-Memory Policy Analytics, including a sample input database •For information on other administrative and configuration

Roles

Role Privileges How Created

System Installer - Run install scripts on Exalytics box- Create Hub Administrator account

Pre-existing OS, WebLogic and database users.Different users can perform different steps if needed.

Hub Administrator - Create OPA hub users During install. Randomly

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. 8

Hub Administrator - Create OPA hub users- Create/update analysis connections

During install. Randomly generated password must be changed at first logon.

Policy Authors - Access data source metadata- Upload policy models

By Hub Administrator

Analysis User - Enter analysis parameters- Create scenarios and charts- Review analytical results

By Hub Administrator

Page 9: Oracle In-Memory Policy Analytics...configuration of Oracle In-Memory Policy Analytics, including a sample input database •For information on other administrative and configuration

Hardware Pre-requisites

Oracle In-Memory Policy Analytics is compatible with the following

1. Exalytics In-Memory Machine X2-4

2. Exalytics In-Memory Machine X3-4

3. Exalytics In-Memory Machine X4-4

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |

3. Exalytics In-Memory Machine X4-4

4. Exalytics In-Memory Machine T5-8

9

Page 10: Oracle In-Memory Policy Analytics...configuration of Oracle In-Memory Policy Analytics, including a sample input database •For information on other administrative and configuration

Setup Overview for In-Memory Policy Analytics

Prepare the Exalytics

Install In-Memory

Prepare Analysis

Configure Tune

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |

ExalyticsServer

Software

Memory Policy

Analytics

Analysis Input

Database

Configure Analysis

Users

Tune Performance

Settings

10

Page 11: Oracle In-Memory Policy Analytics...configuration of Oracle In-Memory Policy Analytics, including a sample input database •For information on other administrative and configuration

Prepare the Exalytics Server Software

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. 11

Page 12: Oracle In-Memory Policy Analytics...configuration of Oracle In-Memory Policy Analytics, including a sample input database •For information on other administrative and configuration

Prepare the Exalytics server software environment

Ensure the following pre-requisites are installed:

1. Exalytics base software

2. TimesTen database

3. JDK and WebLogic Application Server

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |

3. JDK and WebLogic Application Server

4. MySQL database

Note that Oracle Business Intelligence software is not required

12

Page 13: Oracle In-Memory Policy Analytics...configuration of Oracle In-Memory Policy Analytics, including a sample input database •For information on other administrative and configuration

1. Exalytics Base Software

• Install exalytics environment using standard Exalytics Base Image– Includes Oracle Enterprise Linux x86 64-bit version 5.6

• Can be virtualized into separate images if needed See http://docs.oracle.com/cd/E41246_01/bi.1/e39709/install_virtual.htm#CIHBHIGH for details.

Copyright © 2014, Oracle and/or its affiliates. All rights reserved 13

Page 14: Oracle In-Memory Policy Analytics...configuration of Oracle In-Memory Policy Analytics, including a sample input database •For information on other administrative and configuration

2. TimesTen Database

TimesTen database server is required– All analysis input data must be copied onto a local TimesTen database server

– All analysis output data is also stored on the same local TimesTen database server

–Only TimesTen version 11.2.2.7 or later is supported

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. 14

Page 15: Oracle In-Memory Policy Analytics...configuration of Oracle In-Memory Policy Analytics, including a sample input database •For information on other administrative and configuration

Additional TimesTen Configuration - #1

• Configure the OPA analysis output data store

– Add the OPA analysis connection to sys.odbc.ini• Either in /var/TimesTen/sys.odbc.ini, or

• /var/TimesTen/{TT_INSTANCE_NAME}/sys.odbc.ini

– TT_HOME is the TimesTen home directory• e.g. /apps/oracle/TimesTen/tt1122

[ODBC Data Sources]TT_1122=TimesTen 11.2.2 Driveropa_analysis=TimesTen 11.2.2 Driver

[opa_analysis]Driver={TT_HOME}/lib/libtten.soDataStore={TT_STORE}/opa_analysis_db

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |

• e.g. /apps/oracle/TimesTen/tt1122

– TT_STORE is the location for physical storage• e.g.: /var/TimesTen/tt1122/

– Ensure PLSQL=0

– Important: Optimize performance related settings• Choose appropriate PermSize and LogBufParallelism

• See Tune Performance Settings section for details

• Note: Data store is created on first use

15

DataStore={TT_STORE}/opa_analysis_dbPermSize=15360LogBufParallelism=8PLSQL=0DatabaseCharacterSet=AL32UTF8

sys.odbc.ini

Page 16: Oracle In-Memory Policy Analytics...configuration of Oracle In-Memory Policy Analytics, including a sample input database •For information on other administrative and configuration

Additional TimesTen Configuration - #2

• Check TimesTen is running

– Use ttStatus

– E.g. /apps/oracle/TimesTen/tt1122/bin/ttStatus

– Make sure PL/SQL is not enabled

• Check OPA analysis data store is configured

Not configured correctly.

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |

• Check OPA analysis data store is configured

– Use ttIsql to check the connection is correct

– E.g. /apps/oracle/TimesTen/tt1122/bin/ttIsql "dsn=opa_analysis”

– IMPORTANT: This step is also needed to ensure the database is created by the instance administrator

16

Page 17: Oracle In-Memory Policy Analytics...configuration of Oracle In-Memory Policy Analytics, including a sample input database •For information on other administrative and configuration

Additional TimesTen Configuration - #3

• Create the OPA analysis database user account

– Must be exclusively for the OPA analysis database

– Must have create permissions on OPA analysis database

Check that can create/drop tables with the new OPA analysis user

E.g. using ttisql, connected to OPA analysis DSN

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

• Check that can create/drop tables with the new OPA analysis user

17

Page 18: Oracle In-Memory Policy Analytics...configuration of Oracle In-Memory Policy Analytics, including a sample input database •For information on other administrative and configuration

3. JDK and WebLogic Application Server

Oracle Weblogic Application Server is required– Policy Automation Hub and Analysis Server are Java web applications

– JDK 1.7 64-bit is required

– Fusion Middleware 11g Linux x86 64-bit version of WebLogic is required

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |

• Install Oracle WebLogic Application Server 10.3.6

• Note: A license for Oracle WebLogic Standard Edition is included with Oracle In-Memory Policy Analytics. See http://docs.oracle.com/cd/E17904_01/doc.1111/e14860/products.htm#i1041725 for edition details.

18

Page 19: Oracle In-Memory Policy Analytics...configuration of Oracle In-Memory Policy Analytics, including a sample input database •For information on other administrative and configuration

Additional WebLogic Server Setup

Configure WebLogic paths to support connections to TimesTen– Edit the wl_install_dir/common/bin/commEnv.sh script• Add to the WEBLOGIC_CLASSPATH variable the path to the TimesTen JDBC driver ttjdbc7.jar - tt_home/lib

• For example:

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |

• Append to the LD_LIBRARY_PATH environment variable the path to the TimesTen shared libraries - tt_home/lib

• For example:

• Save the changes

– Restart the WebLogic admin server and any managed servers for the changes to take effect

19

Page 20: Oracle In-Memory Policy Analytics...configuration of Oracle In-Memory Policy Analytics, including a sample input database •For information on other administrative and configuration

4. MySQL Database

MySQL database server is required– Policy Automation Hub and Analysis Server use a shared MySQL database

– All user information, workspace, scenarios and chart details are stored here

– Use the free MySQL Community edition, or pay for support for the Standard or Enterprise edition. Paid versions use the 1-4 socket server pricing*

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |

Enterprise edition. Paid versions use the 1-4 socket server pricing*

–Only version 5.6 is supported. Standard and Enterprise editions are available for download from the Oracle Software Delivery Cloud:

20

*Exalytics X2-4, X3-4 and X4-4 are all powered by 4 multi-core Intel processors. Exalytics T5-8 is an 8 socket server, so requires the next tier of MySQL support subscription pricing

Page 21: Oracle In-Memory Policy Analytics...configuration of Oracle In-Memory Policy Analytics, including a sample input database •For information on other administrative and configuration

5. Memcached (optional)

Memcached is optional, but recommended

– When configured, memcached is used to reduce MySQL application database polling

– Memcached 1.4 is supported – version 1.4.17 or later

– Must be accessible from the Exalytics server on an appropriately configured port

• To configure memcache, use admin.sh to directly set the required configuration properties in the OPA Hub Application database

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |

• To configure memcache, use admin.sh to directly set the required configuration properties in the OPA Hub Application database

• admin.sh is found in the bin directory of the application package

– Ensure the bin/lib subdirectory is in the java library path when admin.sh is used

21

# ./admin.sh set_property –name=demo –dbconn=localhost:3306 –dbuser=root –dbpass=XXXX –propname=memcached_keyPrefix –propval=demo_opa_12_01Property updated: memcached_keyPrefix# ./admin.sh set_property –name=demo –dbconn=localhost:3306 –dbuser=root –dbpass=XXXX –propname=memcached_serverList –propval=demo_opa_12_01Property updated: memcached_serverList# ./admin.sh set_property –name=demo –dbconn=localhost:3306 –dbuser=root –dbpass=XXXX –propname=memcached_enabled –propval=demo_opa_12_01Property updated: memcached_enabled

Page 22: Oracle In-Memory Policy Analytics...configuration of Oracle In-Memory Policy Analytics, including a sample input database •For information on other administrative and configuration

Summary of Pre-requisites

• Exalytics X2-4, X3-4, X4-4 with OEL 5.6 x86-64 base image

• JDK 1.7 only

• WebLogic Server 11g Release 1 – 10.3.6 only

• MySQL x86-64 5.6 only

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |

• MySQL x86-64 5.6 only

• TimesTen 11g Release 2 - 11.2.2.7 or later only

• Memcached 1.4 (optional) – 1.4.17 or later only

22

Page 23: Oracle In-Memory Policy Analytics...configuration of Oracle In-Memory Policy Analytics, including a sample input database •For information on other administrative and configuration

To Check Correct Software is InstalledShell into the Exalytics box, then check for the expected output below

TimesTen: # <timesten_path>/bin/ttversionTimesTen Release 11.2.2.7.4 (64 bit Linux/x86_64)

Java:# java –versionjava version "1.7.0_45"Java(TM) SE Runtime Environment (build 1.7.0_45-b18)Java HotSpot(TM) 64-Bit Server VM (build 24.45-b08, mixed mode)

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |

Java HotSpot(TM) 64-Bit Server VM (build 24.45-b08, mixed mode)

WebLogic:# less /apps/oracle/weblogic-11g/user_projects/domains/base_domain/config/config.xml | grep domain-version

<domain-version>10.3.6.0</domain-version>

MySQL:# mysql –u <username> -p<password>mysql> SHOW VARIABLES LIKE "%version%";…| version | 5.6.21 || version_compile_machine | x86_64 || version_compile_os | Linux |…

23

Page 24: Oracle In-Memory Policy Analytics...configuration of Oracle In-Memory Policy Analytics, including a sample input database •For information on other administrative and configuration

Install Oracle In-Memory Policy Analytics

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. 24

Page 25: Oracle In-Memory Policy Analytics...configuration of Oracle In-Memory Policy Analytics, including a sample input database •For information on other administrative and configuration

Steps to Install Oracle In-Memory Policy Analytics

1. Download and unpack the software

2. Choose a deployment name

3. Grant MySQL user permissions

4. Run the provided interactive installer to:

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |

4. Run the provided interactive installer to:a) Prepare the analysis output TimesTen Database

b) Create and configure the MySQL application database

c) Deploy the web applications

5. Remove permissions no longer required

Note: This section explains the interactive install process for a single administrator with all necessary permissions. For information for separate administrators to perform or troubleshoot each install step, please consult the production documentation.

25

Page 26: Oracle In-Memory Policy Analytics...configuration of Oracle In-Memory Policy Analytics, including a sample input database •For information on other administrative and configuration

1. Download and Unpack In-Memory Policy Analytics

• Download software from E-Delivery

– Product Pack: Oracle Policy Automation Suite

– Platform: Linux x86-64

– Description: Oracle In-Memory Policy Analytics 12.0.1.xxx.0

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |

• Unpack downloaded media pack part

– E.g. V55555-01.zip

– Unzip to a safe location, e.g. /apps/oracle/weblogic_11g/opa_analytics

– Make scripts executable: e.g. chmod u+rx /apps/oracle/weblogic_11g/opa_analytics/bin/*.sh

26

Page 27: Oracle In-Memory Policy Analytics...configuration of Oracle In-Memory Policy Analytics, including a sample input database •For information on other administrative and configuration

2. Choose a Deployment Name

• The deployment name you choose influences– The application database schema name

– The application data source names (in WebLogic)

– The deployed web application name and URL

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |

• Choose a short but meaningful name that represents the use of Oracle In-Memory Policy Analytics in your organization (no spaces)

• Once chosen, use the same deployment name for each install task

• Note that “_opa” will be appended to the database name

27

Page 28: Oracle In-Memory Policy Analytics...configuration of Oracle In-Memory Policy Analytics, including a sample input database •For information on other administrative and configuration

3. Grant MySQL User Permissions

• The chosen MySQL user must have the following permissions to the Hub application database (called <deploymentname>_opa):– During install: ALL

– After install: INSERT, SELECT, UPDATE, DELETE

• For example, to create a dedicated opa user for install:

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

• For example, to create a dedicated opa user for install:

28

Page 29: Oracle In-Memory Policy Analytics...configuration of Oracle In-Memory Policy Analytics, including a sample input database •For information on other administrative and configuration

4. Run the Interactive Product Installer• Cd to <unpackdir>/bin. E.g. /apps/oracle/weblogic_11g/opa_analytics/bin

• Run ./install.sh with the required command-line parameters(see following slides)

• Choose option 1 – Full Install

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |

• When prompted enter each of the required passwords and encryption key

• IMPORTANT: The interactive installer uses WebLogic Scripting Tool (WLST). If WLST is not enabled, please consult the product documentation for manual install steps

29

Page 30: Oracle In-Memory Policy Analytics...configuration of Oracle In-Memory Policy Analytics, including a sample input database •For information on other administrative and configuration

Required Install Parameters – TimesTen Details

Parameter Comments

-ttpath=<TimesTen install path> e.g. –ttpath=/apps/oracle/TimesTen/tt1122(bin/ttIsql must be under this path)

-ttdburl=<TimesTen connection URL> e.g. –ttdburl=jdbc:timesten:opa_analysis

-ttuser=<TimesTen database user> e.g. –ttuser=OPA_ANALYSIS

-ttpwd=<TimesTen database password> For security reasons, should not be passed on command-line

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |

• The TimesTen connection details allow the installer to connect to TimesTen to initialize the analysis output database, and to create the database connection to it in both WebLogic and the OPA application database

30

-ttpwd=<TimesTen database password> For security reasons, should not be passed on command-line

Page 31: Oracle In-Memory Policy Analytics...configuration of Oracle In-Memory Policy Analytics, including a sample input database •For information on other administrative and configuration

Required Install Parameters – MySQL Details

Parameter Comments

-dbconn=<MySQL connection details> e.g. –dbconn=localhost:3306

-dbuser=<MySQL database user> e.g. –dbuser=opa_user

-dbpass=<MySQL database password> For security reasons, should not be passed on command-line

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |

• The MySQL Connection details allow the installer to connect to MySQL to initialize the application database, and to create the database connection to it in WebLogic

31

Page 32: Oracle In-Memory Policy Analytics...configuration of Oracle In-Memory Policy Analytics, including a sample input database •For information on other administrative and configuration

Required Install Parameters – WebLogic Details

Parameter Comments

-wldomain =<Domain path> e.g. -wldomain=/apps/oracle/weblogic-11g/user_projects/domains/base_domain

-wlstdir=<WebLogic scripting tools directory> e.g. -wlstdir=/apps/oracle/weblogic-11g/wlserver_10.3/common/bin

-wladminurl=<URL of WebLogic admin server> e.g. -wladminurl=t3://localhost:7001

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |

• The WebLogic details allow the installer to connect to WebLogic to create the required data sources, and to deploy and start the web applications

32

-wladminurl=<URL of WebLogic admin server> e.g. -wladminurl=t3://localhost:7001

-wladmin=<Name of admin server> e.g. -wladmin=AdminServer

-target =<Target WebLogic cluster or server> e.g. -target=Cluster-1 or -target=AdminServer

Page 33: Oracle In-Memory Policy Analytics...configuration of Oracle In-Memory Policy Analytics, including a sample input database •For information on other administrative and configuration

Required Install Parameters – Application Details

Parameter Comments

-name =<Deployment name> e.g. -name=demo

-resetpass=<Hub admin user password>

For security reasons, should not be passed on the command line. When running interactively, leaving the admin user password blank will cause a random password to be generated and displayed on the console.

-non-secure-cookie=<true if e.g. -non-secure-cookie=false

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. 33

-non-secure-cookie=<true if should allow non secure session cookies>

e.g. -non-secure-cookie=falseBy default the application requires the use of secure session cookies over https. To permit http (i.e. unsecure) set this parameter to true. Setting this parameter to true is not recommended for production environments.

-key=<Key to use for encrypting all database connection information>

For security reasons, should not be passed on the command line, and should be recorded separately from the application. When running interactively, leaving the key blank causes a random 32 character key to be generated and displayed. On reinstall, if the key is not available, all database connection information stored in the Hub will need to be re-configured i.e. all TimesTen input and output connections details.

Page 34: Oracle In-Memory Policy Analytics...configuration of Oracle In-Memory Policy Analytics, including a sample input database •For information on other administrative and configuration

Installation• Here is what a successful

install looks like, once all passwords and the encryption key have been entered

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

• NOTE: Secure unattended installation is also possible by piping the required passwords through to install.sh.

Consult the product documentation for details.

34

Page 35: Oracle In-Memory Policy Analytics...configuration of Oracle In-Memory Policy Analytics, including a sample input database •For information on other administrative and configuration

5. Remove Unneeded Permissions

• Once the install is complete, both the MySQL database user and the TimesTen database user should have more restricted permissions applied

• E.g. for MySQL:

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |

• E.g. for TimesTen

35

Using mysql to revoke permissions no longer needed after install

Using ttIsql to revoke permissions no longer needed after install

Page 36: Oracle In-Memory Policy Analytics...configuration of Oracle In-Memory Policy Analytics, including a sample input database •For information on other administrative and configuration

To Check Install Was SuccessfulTo check the application has installed successfully

1. Access the hub application URL at https://<weblogic Server><:port>/<deployment name>/opa-hub

2. Login with the admin username, and the hub admin password chosen during install

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. 36

Page 37: Oracle In-Memory Policy Analytics...configuration of Oracle In-Memory Policy Analytics, including a sample input database •For information on other administrative and configuration

Prepare Analysis Input Database

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. 37

Page 38: Oracle In-Memory Policy Analytics...configuration of Oracle In-Memory Policy Analytics, including a sample input database •For information on other administrative and configuration

In This Section

A. Setting up the example myBenefits database

B. Considerations for an analysis input database

C. Preparing an analysis input database

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | 38

Page 39: Oracle In-Memory Policy Analytics...configuration of Oracle In-Memory Policy Analytics, including a sample input database •For information on other administrative and configuration

A. Setting up the Example Database

• The myBenefits example project is included with Oracle Policy Modeling

• This project includes a folder called Sample Database Scripts

• In this folder are the scripts needed to create and populate a TimesTendatabase – copy the contents onto the Exalytics box – e.g. to /apps/oracle/opa_analytics/SampleDBScripts

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |

/apps/oracle/opa_analytics/SampleDBScripts

• To start, you will need to define an ODBC connection– Choose a database name, for example example_my_benefits

– Add appropriate entries to the TimesTen sys.odbc.ini file

39

Page 40: Oracle In-Memory Policy Analytics...configuration of Oracle In-Memory Policy Analytics, including a sample input database •For information on other administrative and configuration

Creating the Example Database User and Schema

Use the create_mybenefits_user.sql script to create a database user

• Edit the script– Replace the text [password] with an appropriate password

• Start the TimesTen tool ttIsql, and connect to the database

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |

• Run the script create_mybenefits_user.sql

• When complete, run the script create_mybenefits_tables.sql

40

Page 41: Oracle In-Memory Policy Analytics...configuration of Oracle In-Memory Policy Analytics, including a sample input database •For information on other administrative and configuration

Loading the Example Data

• There are two tables to load for the sample data

• The data for each table is in a separate dump file

• To load the sample data use ttBulkCP

• For example:

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |

• For example:

41

Page 42: Oracle In-Memory Policy Analytics...configuration of Oracle In-Memory Policy Analytics, including a sample input database •For information on other administrative and configuration

Create Analysis Connection in Hub - #1

• Login into the hub as a user with the Hub Admin role (e.g. admin)

• In the connections page, choose to Create a new Analysis connection

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | 42

Page 43: Oracle In-Memory Policy Analytics...configuration of Oracle In-Memory Policy Analytics, including a sample input database •For information on other administrative and configuration

Create Analysis Connection in Hub - #2

• Enter the connection details for the analysis input database you created–Name: Whatever you wish

– Username: OPA

– Password: The one entered in create_mybenefits_user.sql

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | 43

Page 44: Oracle In-Memory Policy Analytics...configuration of Oracle In-Memory Policy Analytics, including a sample input database •For information on other administrative and configuration

Create Analysis Connection in Hub - #3

• If configured correctly, the connection will appear with a green tickin the list of connections, indicating that it could be contacted

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |

• To start using this connection, consult the product documentation on creating and using analysis workspaces

44

Page 45: Oracle In-Memory Policy Analytics...configuration of Oracle In-Memory Policy Analytics, including a sample input database •For information on other administrative and configuration

B. Considerations for an Analysis Input Database

• Each analysis input database must follow the same steps as the example

– Add the connection to the TimesTen sys.odbc.ini file

– Add the connection to the list of Hub Connections

• Important database schema considerations

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |

• Important database schema considerations

– Only database tables are supported – not database views

– Each database table must have a single numeric primary key column

– Relationships between tables must be represented using foreign keys

– Data model must be tree-structured (strictly hierarchical)

• Many-to-many relationships must be flattened (denormalized)

– The schema is shown to policy modelers when mapping, so keep the names easy to understand • Note that field names are overridden for display in analysis workspaces, however

45

Page 46: Oracle In-Memory Policy Analytics...configuration of Oracle In-Memory Policy Analytics, including a sample input database •For information on other administrative and configuration

Example of a Valid Input Database Schema

HOUSEHOLDID : NUMBER INCOME : NUMBERASSET_VALUE : NUMBER INSURANCE PRODUCTS

ID : NUMBER POLICY_ID : NUMBERPRODUCT_TYPE : NUMBERHOUSEHOLD_MEMBER_ID : NUMBER

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | 46

HOUSEHOLD MEMBERID : NUMBER HOUSEHOLD_ID : NUMBERAGE : NUMBERGENDER : VARCHAR(8)

PRODUCT_TYPE : NUMBERHOUSEHOLD_MEMBER_ID : NUMBERPRODUCT_NAME : VARCHAR(80)ANN_PREMIUM : NUMBER1..N 1..N

Single field numeric primary keysTree-structured data modelForeign key relationships in place

Page 47: Oracle In-Memory Policy Analytics...configuration of Oracle In-Memory Policy Analytics, including a sample input database •For information on other administrative and configuration

Example of an Invalid Input Database Schema

HOUSEHOLDID : NUMBER INCOME : NUMBERASSET_VALUE : NUMBER

1..M HOUSEHOLD_TO_MEMBERSID : NUMBER HOUSEHOLD_ID : NUMBER [FK]HOUSEHOLD_MEMBER_NUMBER : VARCHAR(16) [FK]

N..1

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | 47

HOUSEHOLD MEMBERMEMBER_NUMBER : VARCHAR(16) AGE : NUMBERGENDER : VARCHAR(8)

INSURANCE PRODUCTSPOLICY_ID : NUMBER PRODUCT_TYPE : NUMBER HOUSEHOLD_MEMBER_NUMBER : VARCHAR(16)PRODUCT_NAME : VARCHAR(80)ANN_PREMIUM : NUMBER Non-numeric primary key

Multi field primary keysMany-to-many relationshipForeign key relationship missing

?..?

Page 48: Oracle In-Memory Policy Analytics...configuration of Oracle In-Memory Policy Analytics, including a sample input database •For information on other administrative and configuration

C. Preparing an Analysis Input TimesTen Database

• Prior to using an input database it must be populated with data– There are many ways to do this, including:• Use TimesTen tools to load data from an existing Oracle database – such as part of an existing BI

data warehouse

• Export data from the source database in a format that ttBulkCp can read, then load it into TimesTenusing ttBulkCp

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |

using ttBulkCp

• Use Oracle Data Integrator to read data from an existing application database, and apply any necessary transformations while writing it into the TimesTen database

• The maximum permitted memory usage must also be set

• The rest of this section gives an overview of these two steps– Consult the relevant product documentation for more information

48

Page 49: Oracle In-Memory Policy Analytics...configuration of Oracle In-Memory Policy Analytics, including a sample input database •For information on other administrative and configuration

TimesTen Tools for Loading from an Oracle Database

• ttImportFromOracle is provided with TimesTen to make it easy to efficiently import and size data from an existing Oracle Database – such as a data warehouse – into TimesTen

– The tool creates a series of scripts which can be executed to create the required schema, load data, and perform sizing on the resulting TimesTen database tables

• The ttIsql tool also includes built in commands for creating a table schema and loading it with data from an existing Oracle database

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |

with data from an existing Oracle database

• For more information:

– ttImportFromOracle: http://download.oracle.com/otn_hosted_doc/timesten/1122/quickstart/html/admin/howto_util_ttimportfromoracle.html

– ttIsql built in commands ttTableSchemaFromOraQueryGet and ttLoadFromOracle: http://docs.oracle.com/cd/E11882_01/timesten.112/e21633/ttisql.htm#TTOPR752

49

Page 50: Oracle In-Memory Policy Analytics...configuration of Oracle In-Memory Policy Analytics, including a sample input database •For information on other administrative and configuration

Sizing

• When adding the input database connection to sys.odbc.ini, be sure to set PermSize to an appropriate value–Must be large enough to hold all the input data in memory

– Should be as close as possible to the entire useful input database size

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |

• For more information on setting the PermSize parameter, consult the TimesTen product documentation

http://docs.oracle.com/cd/E21901_01/doc/timesten.1122/e21633/using.htm#TTOPR158

50

Page 51: Oracle In-Memory Policy Analytics...configuration of Oracle In-Memory Policy Analytics, including a sample input database •For information on other administrative and configuration

Configure Analysis Users

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | 51

Page 52: Oracle In-Memory Policy Analytics...configuration of Oracle In-Memory Policy Analytics, including a sample input database •For information on other administrative and configuration

Configuring Analysis Users in OPA Hub

• The Hub Administrator role is reserved for users who need permission to create database connections and manage user accounts

• All other users should have a new account created for them in OPA Hub, by a Hub Administrator, and be assigned only the following three roles– Policy Author – the detailed policy authors that use Oracle Policy Modeling

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |

– Policy Author – the detailed policy authors that use Oracle Policy Modeling

– Analysis User – the business users that want to try out and compare scenarios

– Deployment Administrator (optional) – can deploy interactive interviews

52

Page 53: Oracle In-Memory Policy Analytics...configuration of Oracle In-Memory Policy Analytics, including a sample input database •For information on other administrative and configuration

Policy Authors

• Policy Authors use Oracle Policy Modeling to –Write different policy rule versions and map them onto the input data

– Define what parameters will be available for each policy model

– Upload and download policy models from OPA Hub

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | 53

Page 54: Oracle In-Memory Policy Analytics...configuration of Oracle In-Memory Policy Analytics, including a sample input database •For information on other administrative and configuration

Analysis Users

• Analysis users login to OPA Hub with a web browser to– View existing and create new charts, workspaces and scenarios

– Set scenario parameters and run and compare scenarios

– Export data for further analysis in other tools

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | 54

Page 55: Oracle In-Memory Policy Analytics...configuration of Oracle In-Memory Policy Analytics, including a sample input database •For information on other administrative and configuration

Deployment Administrators

• Deployment administrators login to OPA Hub with a web browser to manage the policy models that are available as interactive interviews

– This allows simple case-by-case experimentation with a policy model to understand outcomes

– The link to the interviews must be communicated separately to users, e.g. via email

• If required, access to each interview URL must be controlled by the web server administrator(no built-in access control is provided)

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |

(no built-in access control is provided)

– By default, policy models are not deployed for use in interactive interviews

55

Page 56: Oracle In-Memory Policy Analytics...configuration of Oracle In-Memory Policy Analytics, including a sample input database •For information on other administrative and configuration

Tune Performance Settings

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | 56

Page 57: Oracle In-Memory Policy Analytics...configuration of Oracle In-Memory Policy Analytics, including a sample input database •For information on other administrative and configuration

Tuning Analysis Output Database Performance Settings

• It is important to choose the correct performance related settings for the Oracle In-Memory Policy Analytics TimesTen analysis output database

• This section gives a brief overview of how to choose those settings:1. Set up parallel processing

2. Tune sizing parameters

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |

2. Tune sizing parameters

3. Configure check-pointing

• More detailed information is available in the TimesTen and Oracle In-Memory Policy Analytics product documentation

Page 58: Oracle In-Memory Policy Analytics...configuration of Oracle In-Memory Policy Analytics, including a sample input database •For information on other administrative and configuration

1. Set up parallel processing

There are two tasks to perform in this section

• Specify the limit for OPA analysis server batch processors

• Configure TimesTen log file buffering

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |

Page 59: Oracle In-Memory Policy Analytics...configuration of Oracle In-Memory Policy Analytics, including a sample input database •For information on other administrative and configuration

Specify OPA analysis server output process limit

• It is important to limit the number of CPU cores used by OPA analysis batch processing

• The rule of thumb is to set this value as follows:

# physical cores / 2 (rounded down)

E.g. Exalytics X2-4 box with 40 physical cores, set this value to at most 20¼ Exalytics X2-4 box with 10 physical cores, set this to at most 5

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |

¼ Exalytics X2-4 box with 10 physical cores, set this to at most 5

• Note: The installer attempts to automatically set this value to a reasonable default

• The config property is called analysis_batch_procCount

– It’s value can be changed using the provided admin.sh script:

# ./admin.sh set_property -name=demo -dbconn=localhost:3306 -dbuser=root -dbpass=XXXXX -propname=analysis_batch_procCount -propvalue=4Property updated: analysis_batch_procCount

Page 60: Oracle In-Memory Policy Analytics...configuration of Oracle In-Memory Policy Analytics, including a sample input database •For information on other administrative and configuration

• By default, TimesTen datastore supports 4 parallel insertion processes

• If the TimesTen database is running on 10 or more physical cores (i.e. if analysis_batch_procCount is more than 4) then this needs to be increased:

– Edit the LogBufParallelism property for the analysis output connection in sys.odbc.ini

– Also update the LogBufMB and LogFileSize property to be at least LogBufParallelism * 8

Configure TimesTen log file buffering

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |

Tip: If LogBufParallelism is too low, warnings similar to the following appear in the TimesTen server logs:

(Log Marker) waiting for latch "Log Strand Insertion[0]"

Page 61: Oracle In-Memory Policy Analytics...configuration of Oracle In-Memory Policy Analytics, including a sample input database •For information on other administrative and configuration

2. Tune analysis output sizing parameters

There are two steps to tuning the sizing parameters for analysis output:

• Understand the number of analysis outcomes

• Set the sizing parameters

• Ensure sufficient RAM to hold all data in memory

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |

• Ensure sufficient RAM to hold all data in memory

• Tune hash indexes

Page 62: Oracle In-Memory Policy Analytics...configuration of Oracle In-Memory Policy Analytics, including a sample input database •For information on other administrative and configuration

Understand the number of analysis outcomes

• An “analysis outcome” is any value that is available for charting in an analysis workspace, as configured by using Oracle Policy Modeling

• One analysis outcome is created for each

– Mapped output value: i.e. a value determined by a policy model, which is mapped out for analysis

– Named input value: i.e. an input that has been given a name to allow it to be included in charts

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |

• To determine the total analysis outcomes:

– For each policy model used by any scenario, count the number of analysis outcomes P for that model

– Compute total scenario outcomes S, by adding up P each scenario Sn

– Compute the total T by adding together all the results S for each analysis scenario

• Another way to express this: T = I * S, where S = P(S1) + P(S2) … P(Sn)

Page 63: Oracle In-Memory Policy Analytics...configuration of Oracle In-Memory Policy Analytics, including a sample input database •For information on other administrative and configuration

Set the sizing parameters

• The average size to record each outcome in the analysis output is 570 bytes

– Compute the total analysis output TimesTen database size = T * 570 * 2

– For example:• 3 Scenarios, with 10 analysis outcomes in the policy model used by each scenario

• T = 1,000,000 input records * (20 analysis outcomes per scenario * 5 scenarios) = 10,000,000 total outcomes

• 10,000,000 * 570 Bytes * 2 = about 10,087MB

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |

• 10,000,000 * 570 Bytes * 2 = about 10,087MB

• Once the total output size is known, increase the PermSize parameter in sys.odbc.ini for the analysis output connection, if needed:

• Note: The PermSize parameter for the analysis output database may need to be increased from time-to-time as additional scenarios and analysis outcomes are created in the policy model. Consult the TimesTen documentation for more information on how to modify this for a running database.

Page 64: Oracle In-Memory Policy Analytics...configuration of Oracle In-Memory Policy Analytics, including a sample input database •For information on other administrative and configuration

Ensure sufficient RAM to process the input data• It is important that the total input and output database size should never be set to a value larger than

the total available RAM on the Exalytics server

• If PermSize for the input databases + PermSize for the output database is greater than about half the total RAM size, you should reduce the size of either the input or the output data:

– Eliminate some of the input data

– Decrease the total number of analysis outcomes that are generated

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |

Page 65: Oracle In-Memory Policy Analytics...configuration of Oracle In-Memory Policy Analytics, including a sample input database •For information on other administrative and configuration

Tune hash indexes• The analysis output TimesTen database has two hash indexes used for fast access to the outcome data

• If the indexes are too small, performance degrades significantly

• By default the hash indexes are sized for T = 2,000,000 or less (60,000 index pages)

• If you have T > 2,000,000 you should recreate the hash indexes to have

Number of index pages = total number of outcomes to be stored (T) / 32

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |

• For example, to drop and recreate the hash indexes with 1,000,000 pages, enough for 32,000,000 outcome records:

Command> drop index OPA_ANALYSIS.IX_ANALYSIS_DETAIL_HASH_1;Command> drop index OPA_ANALYSIS.IX_ANALYSIS_DETAIL_HASH_2;Command> create hash index IX_ANALYSIS_DETAIL_HASH_1 on OPA_ANALYSIS.ANALYSIS_DETAIL(analysis_scenario_id, analysis_label) pages = 1000000;Command> create hash index IX_ANALYSIS_DETAIL_HASH_2 on OPA_ANALYSIS.ANALYSIS_DETAIL(child_record_id, analysis_scenario_id, analysis_label, entity_name) pages = 1000000;

Using ttIsql to recreate hash indexes

Page 66: Oracle In-Memory Policy Analytics...configuration of Oracle In-Memory Policy Analytics, including a sample input database •For information on other administrative and configuration

3. Configure checkpointing

• By default, checkpointing of a TimesTen database is performed every 10 minutes

• For systems with certain characteristics, this frequency should be dropped to a smaller interval to ensure consistent performance:

– When there are a large number of scenarios that are being frequently changed

– When there are a very large number of analysis outcomes for several scenarios

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |

• This change should be made in the analysis output connection in sys.odbc.ini:

TIP: A sign that this setting should be changed is when the system slows down noticeably after a period of continuous interactive usage

66

Page 67: Oracle In-Memory Policy Analytics...configuration of Oracle In-Memory Policy Analytics, including a sample input database •For information on other administrative and configuration

For More Information

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | 67

Page 68: Oracle In-Memory Policy Analytics...configuration of Oracle In-Memory Policy Analytics, including a sample input database •For information on other administrative and configuration

Additional Resources

• For more information, consult the following resources:• Product Documentation

– https://documentation.custhelp.com/euf/assets/devdocs/november2014/PolicyAutomation/en/Default.htm

• Features and Benefits Presentation

– https://www.oracle.com/technetwork/apps-tech/policy-automation/overview/opapolicyanalytics-2372568.html

• Technical Installation Overview

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |

– https://www.oracle.com/technetwork/apps-tech/policy-automation/overview/opapolicyanalytics-2372568.html

• Demonstration Walkthrough

– https://www.oracle.com/technetwork/apps-tech/policy-automation/overview/opapolicyanalytics-2372568.html

• OPA Discussion Forum

– https://forums.oracle.com/forums/forum.jspa?forumID=828

Page 69: Oracle In-Memory Policy Analytics...configuration of Oracle In-Memory Policy Analytics, including a sample input database •For information on other administrative and configuration

References

1. Oracle Policy Automation November 2014 User Guidehttps://documentation.custhelp.com/euf/assets/devdocs/november2014/PolicyAutomation/en/Default.htm

2. Oracle Exalytics Software Release 1.0.0.3 Documentation Libraryhttps://docs.oracle.com/cd/E41246_01/index.htm

3. Oracle TimesTen In-Memory Database 11.2.2 Installation Guide

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |

3. Oracle TimesTen In-Memory Database 11.2.2 Installation Guidehttps://download.oracle.com/otn_hosted_doc/timesten/1122/doc/timesten.1122/e21632/install.htm#TTINS113

4. Online Quick Start Guide for Oracle TimesTen In-Memory Databasehttps://download.oracle.com/otn_hosted_doc/timesten/1122/quickstart/html/main/home.html

69

Page 70: Oracle In-Memory Policy Analytics...configuration of Oracle In-Memory Policy Analytics, including a sample input database •For information on other administrative and configuration

Social Media – Keep in Touch!

https://twitter.com/OracleOPA

https://www.facebook.com/OraclePolicyAutomation

http://www.linkedin.com/groups/Oracle-Policy-Automation-3431282/about

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |

http://www.linkedin.com/groups/Oracle-Policy-Automation-3431282/about

http://www.youtube.com/user/OraclePAVideos

https://blogs.oracle.com/OPA/

https://forums.oracle.com/forums/forum.jspa?forumID=828

70

Page 71: Oracle In-Memory Policy Analytics...configuration of Oracle In-Memory Policy Analytics, including a sample input database •For information on other administrative and configuration

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | 71

Page 72: Oracle In-Memory Policy Analytics...configuration of Oracle In-Memory Policy Analytics, including a sample input database •For information on other administrative and configuration