Table of Contents

ULS-Client for Oracle Databases

Aka the ORACLE_TOOLS, is the GPLv3-based ULS-client for gathering runtime metrics and status information, logging configuration settings and executing regular administrative jobs on Oracle database instances which are running on Unix-like operating systems.

The ORACLE_TOOLS are now splitted up into two packages, see:

on gitlab.

Overview

The ULS-Client for Oracle Databases consists of several perl scripts and modules, bash scripts and configuration files to:

It requires Perl to run and the ULS-Agent for Linux for data transmission to the ULS-server.

The monitoring script does only SELECTs against the database or call Oracle built-in utilities. No extra schema is needed but for most SELECTs the SYSDBA privileges are necessary. Usage of a more restrictive user (schema) is currently not considered.

All results and/or reports are generated as ULS value files in the ULS Value File Format which are sent to the ULS-server by using the ULS-Agent for Linux.

This description of the ULS-Client for Oracle Databases often uses “<orcl>” as a placeholder for an example ORACLE_SID, you have to replace it with the actual ORACLE_SID in your environment.

Features

The ULS-Client for Oracle Databases provide:

Download & Installation

The ORACLE_TOOLS are only available as a zip archive and only has to be unzipped in a destination folder, no rpm, no deb.

:!: be sure to have the ULS-Agent for Linux installed. Try:

$ whereis flush_test_values
flush_test_values: /usr/local/bin/flush_test_values

to check.

Download the oracle_tools_2013-10-13.zip and copy it to a destination folder (<oracle_tools_dir>).

Check the checksums:

$ sha1sum oracle_tools*.zip
914f04461a1a734066e7c0c8ba900be92ea59931  oracle_tools_2013-10-13.zip

Extract them:

$ unzip oracle_tools*.zip

Find or create a script to set the proper Oracle environment for your Oracle database instance, e.g. ~oracle/oracle_env_<orcl>. Should be similar to:

oracle_env_orcl
ORACLE_BASE=/oracle
export ORACLE_BASE
 
ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1
export ORACLE_HOME
 
ORACLE_SID=<orcl>
export ORACLE_SID
 
PATH=$PATH:/usr/local/bin:$ORACLE_HOME/bin
export PATH
 
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib
export LD_LIBRARY_PATH

Create a link to it:

$ ln -s ~oracle/oracle_env_<orcl> oracle_env

What You Got

The scripts of the ORACLE_TOOLS:

In conjunction with the SCript-CLuster:

For regular execution of scripts:

Miscellaneous:

What Happens?

The normal usage:

The hourly and nightly backups are delayed by a random number of minutes to avoid starting all database backups at the same time in the whole IT environment.

Regular Executions

A number of scripts is executed in regular time intervals to perform all actions. That is defined in the crontab.

Create the crontab entries. Adjust the ORACLE_SID in the crontab file:

$ sed -i "s/orcl/$ORACLE_SID/g" cron_oracle_tools

Check the contents of the “cron_oracle_tools” if it corresponds to the syntax of your flavor of operating system:!:

Become root and copy that file to its destination directory (that may differ depending on your operating system):

# cp cron_oracle_tools /etc/cron.d/oracle_tools_<orcl>

It should look like:

/etc/cron.d/oracle_tools_orcl
# -----
# Monitoring script for Oracle
1,11,21,31,41,51 * * * * oracle /oracle/admin/<orcl>/oracle_tools/watch_oracle
#
# -----
# Hourly actions (e.g. backup of archived redo logs)
2 * * * * oracle /oracle/admin/<orcl>/oracle_tools/hourly
#
# -----
# Nightly jobs, MON to SAT (database backup, removal of trace files, etc)
2 22 * * * oracle /oracle/admin/<orcl>/oracle_tools/nightly

Check the regular execution of the scripts :TODO:

Configuration

Configuration of all oracle_tools scripts is done in the “oracle_tools.conf”, which should be a customized copy of the “oracle_tools.conf.default”.

$ cp oracle_tools.conf.default oracle_tools.conf

Customize the “oracle_tools.conf” to your needs.

See the Detailed Script Descriptions for the script-specific customizations of the configuration file.

Detailed Script Descriptions

The detailed descriptions about the scripts can be found in specific documents:

When using the ORACLE_TOOLS together with the SCript-CLuster: