• No results found

Installation and configuration op5 Oracle Extension

N/A
N/A
Protected

Academic year: 2021

Share "Installation and configuration op5 Oracle Extension"

Copied!
16
0
0

Loading.... (view fulltext now)

Full text

(1)

Installation and configuration op5

Oracle Extension

Installation and configuration op5 Oracle Extension©

(2)

Installation and configuration op5 Oracle Extension Version 1, Rev 1

Author: op5 Professional Services

© 2011 op5 AB

op5, and the op5 logo are trademarks, servicemarks, registered servicemarks or registered trademarks of op5 AB.

All other trademarks, servicemarks, registered trademarks, and registered servicemarks mentioned herein may be the property of their respective owner(s). The information contained herein is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE.

op5 web site

www.op5.com

op5 support

www.op5.com/support

op5, and the op5 logo are trademarks, servicemarks, registered servicemarks or registered trademarks of op5 AB

(3)

Contents

op5 Oracle Extension

Introduction ... 1

Oracle database configuration ...2

Database schemas ... 2

Merlin database setup... 2

Create a listner ... 2

Create the database ... 2

Setup the database... 3

Nacoma database setup ... 3

Create a listener ... 3

Create the database ... 3

Setup the database... 3

op5 Monitor configuration ...5

Ninja configuration - The user interface ... 5

Direct database access ... 5

TNS database access - for RAC setups ... 6

Nagvis configuration - The visualization and map tool... 8

Direct database setup... 8

TNS database setup - for RAC setups ... 8

Merlin configuration – The backend data collector... 9

Direct database access ... 9

TNS database access - for RAC setups ... 10

Config verification ... 11

Nacoma configuration – The configuration tool... 11

Direct database access ... 11

TNS database access - for RAC setups ... 11

(4)
(5)

op5 Oracle Extension

Introduction

This document is intended for the System administrator that has the operational responsibility for the op5 system. You are expected to have good knowledge and understanding of computers and Oracle database managment tools.

This manual shows how to setup database connections from op5 Monitor to a Oracle database backend under Solaris and Red Hat Enterprise Linux.

This manual only covers installation of Oracle extension for op5 Monitor, for further information please consult op5 Monitor User manual and op5 Monitor Administration manual found on www.op5.com/manuals

(6)

2 op5 Oracle Extension

Oracle database configuration

Oracle database configuration

First we need to setup the database schema in Oracle database server before configuring op5 Monitor.

These should be provided to you with the product.

Database schemas

Two databases should be created, merlin and nacoma. The merlin database will be used to store status information for the monitored objects. The nacoma database is used while changes to the monitored objects are beeing made. These database schemas should have been provided with the delivery this product.

To create the required databases, the following schemas should be used: merlin database:

• merlin_seq-<version>.sql • ninja_seq-<version>.sql

Default dbuser/password included: merlin/merlin (edit file to change this) nacoma database:

• nacoma-<version>.sql • nacoma_roles-<version>.sql

Default dbuser/password included: nacoma/nacoma (edit file to change this)

.

Merlin database setup

To setup the merlin database follow the steps below:

Create a listner

Create a listener using the Oracle tool 'Net Configuration Assistant'. Suggested parameters:

Name: merlin Protocol: TCP Port: 1521

Create the database

(7)

Oracle database configuration

assistant' using the following parameters: Template: General purpose

Global Database Name: merlin SID: merlin

Listener: merlin

Note: it is important to set and remember the password for the 'system' user since it will be used when setting up the database.

Setup the database

Start sqlplus from the dir where the sql scripts are located. sqlplus merlin (Username: system, Password: ****) Execute the two merlin sql scripts listed above: @merlin_seq-<version>.sql

@ninja_seq-<version>.sql

Nacoma database setup

To setup the nacoma database follow the steps below:

Create a listener

Create a listener using the Oracle tool 'Net Configuration Assistant'. Suggested parameters:

Name: nacoma Protocol: TCP Port: 1521

Create the database

Create a database named 'nacoma' using the Oracle tool: 'Database configuration assistant' using the following parameters:

Template: General purpose Global Database Name: nacoma SID: nacoma

listener: nacoma

Note: it is important to set and remember the password for the 'system' user since it will be used when setting up the database.

Setup the database

(8)

4 op5 Oracle Extension

Oracle database configuration

sqlplus nacoma (Username: system, Password: ****)

Execute the two nacoma sql scripts listed above: @nacoma-<version>.sql

(9)

op5 Monitor configuration

op5 Monitor configuration

Two methods exist for configuring database access.

Direct database access - This mean all database parameters are configured in the configuration file for the respective module. For MySQL this is the only allowed option.

TNS database access - This move database name, address and port

configuration to config file tnsnames.ora. This method is only supported for Oracle databases. To use RAC (Real Application Cluster) this is the only supported method to configure database access. The configuration examples below are based on the example tnsnames.ora file described in section tnsnames.ora

Ninja configuration - The user interface

Copy /opt/monitor/op5/ninja/application/config/database.php to /opt/monitor/ op5/ninja/application/config/custom/database.php and edit the destination file.

cp /opt/monitor/op5/ninja/application/config/database.php /opt/ monitor/op5/ninja/application/config/custom/database.php

Direct database access

For both the $config['default'] and $config['nacoma'] sections: set ‘type’ to oracle

set ‘host’ to the address of the oracle server

set ‘port’ to the database port (if different than default) Depending on oracle configuration you might also need to: set ‘user’ to the db username (if different than default) set ‘pass’ to the database password (if different than default) set ‘database’ to the database name (if different than default) Example: $config['default'] = array ( 'benchmark' => TRUE, 'persistent' => FALSE, 'connection' => array ( 'type' => #'pdomysql', 'oracle',

(10)

6 op5 Oracle Extension

op5 Monitor configuration

'user' => 'merlin', 'pass' => 'merlin',

# these are only used by the oracle driver 'host' => '172.27.86.215',

'port' => '1521', 'socket' => FALSE, 'database' => 'merlin',

# this is only used by the mysql driver

'dsn' => 'mysql:host=localhost;dbname=merlin' ), 'character_set' => 'latin1', 'table_prefix' => '', 'object' => TRUE, 'cache' => FALSE, 'escape' => TRUE ); $config['nacoma'] = array ( 'benchmark' => TRUE, 'persistent' => FALSE, 'connection' => array ( 'type' => #'pdomysql', 'oracle',

# these are only used by oracle 'user' => 'nacoma', 'pass' => 'nacoma', 'host' => '172.27.86.215', 'port' => '1521', 'socket' => FALSE, 'database' => 'nacoma',

# this is only used by pdomysql

'dsn' => 'mysql:host=localhost;dbname=nacoma' ), 'character_set' => 'latin1', 'table_prefix' => '', 'object' => TRUE, 'cache' => FALSE, 'escape' => TRUE );

TNS database access - for RAC setups

For both the $config['default'] and $config['nacoma'] sections: set ‘type’ to oracle

(11)

op5 Monitor configuration

Depending on oracle configuration you might also need to: set ‘user’ to the db username (if different than default) set ‘pass’ to the database password (if different than default)

Example: $config['default'] = array ( 'benchmark' => TRUE, 'persistent' => FALSE, 'connection' => array ( 'type' => #'pdomysql', 'oracle', 'user' => 'merlin', 'pass' => 'merlin',

# these are only used by the oracle driver 'host' => '172.27.86.215', 'port' => '1521', 'socket' => FALSE, 'database' => 'merlin', 'conn_str' => 'merlindbs', ), 'character_set' => 'latin1', 'table_prefix' => '', 'object' => TRUE, 'cache' => FALSE, 'escape' => TRUE ); $config['nacoma'] = array ( 'benchmark' => TRUE, 'persistent' => FALSE, 'connection' => array ( 'type' => #'pdomysql', 'oracle',

# these are only used by oracle 'user' => 'nacoma', 'pass' => 'nacoma', 'host' => '172.27.86.215', 'port' => '1521', 'socket' => FALSE, 'database' => 'nacoma', 'conn_str' => 'nacomadbs', ),

(12)

8 op5 Oracle Extension

op5 Monitor configuration

'character_set' => 'latin1', 'table_prefix' => '', 'object' => TRUE, 'cache' => FALSE, 'escape' => TRUE );

Nagvis configuration - The visualization and map tool

Direct database setup

Edit /opt/monitor/op5/nagvis/etc/nagvis.ini.php In the [defaults] section

set backend="merlinoci_1" In the [backend_merlinoci_1]

set dbhost to the oracle server adress

Depending on oracle configuration you might also need to: set ‘dbuser’ to the db username

set ‘dbpass’ to the database password

set ‘dbname’ to the database name set ‘dbport’ to the database port Example:

[defaults]

; default backend (id of the default backend) backend="merlinoci_1"

… …

[backend_merlinoci_1]

; type of backend - MUST be set backendtype="merlinoci"

; hostname for Merlin db dbhost="172.27.86.215"

; database name for Merlin db dbname="merlin"

; username for Merlin db dbuser="merlin"

; password for Merlin db dbpass="merlin"

; portname for Merlin db dbport=1521

TNS database setup - for RAC setups

Edit /opt/monitor/op5/nagvis/etc/nagvis.ini.php In the [defaults] section

(13)

op5 Monitor configuration

set backend="merlinoci_1" In the [backend_merlinoci_1]

set dbconnstr to the merlin database identifier from configuration file

“tnsnames.ora ”

Depending on oracle configuration you might also need to: set ‘dbuser’ to the db username

set ‘dbpass’ to the database password Example:

[defaults]

; default backend (id of the default backend) backend="merlinoci_1"

… …

[backend_merlinoci_1]

; type of backend - MUST be set backendtype="merlinoci"

; username for Merlin db dbuser="merlin"

; password for Merlin db dbpass="merlin"

; override the configuration above with a custom connection description

dbconnstr="merlindbs"

NOTE 1: There should not be any blank lines with in a section in the

configuration above. A section start with a identifier enclosed in square brackets ([backend_merlinoci_1] in the example above.

NOTE 2: The Geomap only works when using https.

Merlin configuration – The backend data collector

Direct database access

To configure merlin you first need to edit /opt/monitor/op5/merlin/merlin.conf. In the database {} section set host and type. Depending on your oracle install name (database name), user and password might also need to be edited.

By default merlin uses ‘auto_commit’ meaning every statement is commited. This will impact performance in large environments. To enable bulk operation you use the parameters commit_interval and commit_queries.

Enabling these as in the example below mean we commit when we have 2000 queries or when 3 seconds have elapsed, which ever come first. If the database server is heavily loaded it might be beneficial to decrease the number of queries in each operation, commit_interval=1 and commit_queries=500 could be a suitable setting in such cases.

(14)

10 op5 Oracle Extension

op5 Monitor configuration

database { name = merlin; user = merlin; pass = merlin; host = 172.27.86.215; type = oracle; port = 1521; commit_interval = 3; commit_queries = 2000; }

Secondly you need to edit the config options in the top of /opt/monitor/op5/ merlin/import.php Example: $imp->db_type = 'oracle'; $imp->db_host = '172.27.86.215'; $imp->db_user = 'merlin'; $imp->db_pass = 'merlin'; $imp->db_database = 'merlin'; $imp->db_port = '1521';

TNS database access - for RAC setups

To configure merlin you first need to edit /opt/monitor/op5/merlin/

merlin.conf. In the database {} section set conn_str to the merlin identifier from configuration file tnsnames.ora

Depending on your oracle install user and password might also need to be edited. By default merlin uses ‘auto_commit’ meaning every statement is commited. This will impact performance in large environments. To enable bulk operation you use the parameters commit_interval and commit_queries. Enabling these as in the example below mean we commit when we have 2000 queries or when 3 seconds have elapsed, which ever come first.

NOTE: host and port should not be defined when using tns access.

database { user = merlin; pass = merlin; type = oracle; commit_interval = 3; commit_queries = 2000; conn_str = ‘merlindbs’; }

Secondly you need to edit the config options in the top of /opt/monitor/ op5/merlin/import.php

Example:

$imp->db_type = 'oracle'; $imp->db_user = 'merlin';

(15)

op5 Monitor configuration

$imp->db_pass = 'merlin';

$imp->db_conn_str = 'merlindbs';

Config verification

Verify import functionality by executing On Solaris:

/opt/csw/php5/bin/php /opt/monitor/op5/merlin//import.php

Successful import should produce output similar to:

Disabling indexes

Importing objects to database merlin

importing objects from /opt/monitor/var/objects.cache importing status from /opt/monitor/var/status.log Enabling indexes

Nacoma configuration – The configuration tool

Direct database access

To configure Nacoma (the object configuration tool) you edit /opt/monitor/op5/ nacoma/include/db_config.inc.php

Example:

$db_type = 'oracle'; // mysql or oracle

$db_host = '172.27.86.215'; $db_user = 'nacoma';

$db_passwd = 'nacoma'; $db_database = 'nacoma'; $db_port = 1521;

TNS database access - for RAC setups

To configure Nacoma (the object configuration tool) you edit /opt/monitor/op5/ nacoma/include/db_config.inc.php

Example:

(16)

12 op5 Oracle Extension

op5 Monitor configuration

$db_user = 'nacoma'; $db_passwd = 'nacoma'; $db_conn_str = 'nacomadbs';

TNS - the tnsnames.ora configration file

On Redhat/CentOS the tnsnames.ora file should be placed in the /etc/ directory On Solaris the tnsnames.ora file should be placed in the /var/opt/oracle/ directory The configuration examples above is based on the following tnsnames.ora example: nacomadbs= (DESCRIPTION= (ADDRESS_LIST= (FAILOVER=on) (LOAD_BALANCE=off) (ADDRESS=(PROTOCOL=tcp)(HOST=172.27.86.215)(PORT=1521)) (ADDRESS=(PROTOCOL=tcp)(HOST=172.27.86.219)(PORT=1521))) (CONNECT_DATA=(SERVICE_NAME=nacoma))) merlindbs= (DESCRIPTION= (ADDRESS_LIST= (FAILOVER=on) (LOAD_BALANCE=off) (ADDRESS=(PROTOCOL=tcp)(HOST=172.27.86.215)(PORT=1521)) (ADDRESS=(PROTOCOL=tcp)(HOST=172.27.86.219)(PORT=1521))) (CONNECT_DATA=(SERVICE_NAME=merlin)))

References

Related documents

Chemical fertilizers provide three major plant nutrients; nitrogen,.. phosphorus and potassium

At its September 23, 2020 meeting, the Academic Council approved a request from the Editorial Committee to align its members’ term of service with other systemwide Senate

With the zero-energy universe and the space-object structures, the origin of universes is the unified theory of physics as the theory of everything to explain fully cosmology,

• Use UMS Administrator to set up a new data source of type Derby with the hostname of the Derby server and the server port (default port is 1527), username rmlogin and database

Iannucci L and Willows ML (2006) An energy based damage mechanics approach to modelling impact onto woven composite materials – part I: numerical models. Composites Part A:

CVS Branches And Tagging merge-trunk-to-BRANCHID-M root-BRANCHID merged-from-trunk-to-BRANCHID-M HEAD branch-BRANCHID merge-BRANCHID-to-trunk-N

More than 2,500 patients have benefitted from our program, which includes laparoscopic gastric bypass, adjustable gastric band, gastric sleeve and revision surgical procedures..

The next step in estimating adult productivity benefits is to link the impact of various Latin American and Caribbean early child- hood programs on childhood cognitive skills