Difference between revisions of "Installation"

From zzat
Jump to: navigation, search
(Prerequisites)
 
(14 intermediate revisions by the same user not shown)
Line 1: Line 1:
== Installation prerequisites ==
+
== Prerequisites ==
The following requirements must be met in order for zztat to install and run successfully:
+
'''<u>Before you begin, ensure that the [[Installation Prerequisites|installation prerequisites]] have been fulfilled.</u>'''
* Oracle version 11.2.0.4, 12.1.0.1, 12.1.0.2, 12.2.0.1 or higher
 
* Access to basic SYS packages for the zztat users (normally these are executable by PUBLIC):
 
** dbms_aq
 
** dbms_aqadm
 
** dbms_crypto
 
** dbms_db_version
 
** dbms_utility
 
** dbms_lob
 
** dbms_lock
 
** dbms_scheduler
 
** dbms_session
 
** dbms_sql
 
** dbms_stats
 
** utl_call_stack (Oracle 12.1+)
 
** utl_mail (see details below)
 
** utl_raw
 
* job_queue_processes must be set to a value greater than 0. 10 is a good starting point if you don't run many jobs apart from zztat.
 
* Your environment and policies should allow granting the following system privileges to the zztat users:
 
** CREATE ANY CONTEXT
 
** CREATE CLUSTER
 
** CREATE JOB
 
** CREATE PROCEDURE
 
** CREATE SEQUENCE
 
** CREATE SESSION
 
** CREATE SYNONYM
 
** CREATE TABLE
 
** CREATE TRIGGER
 
** CREATE TYPE
 
** CREATE VIEW
 
** DROP ANY CONTEXT
 
** MANAGE SCHEDULER
 
** Note that these privileges are mandatory for zztat to function. Granting them to zztat via roles is currently not supported - they must be direct grants.
 
 
 
=== Requirements for optional features ===
 
The following components can be configured at your discretion, based on how you set up the setup.sql configuration file (see below for details). Additional requirements are applicable if you intend to enable the following features.
 
 
 
==== Emails ====
 
* zztat can send emails as part of its reaction framework to alert you
 
* Emails can be sent to pager email aliases to trigger immediate alerts
 
* Alternate emails can be configured for warning and critical type alerts.
 
In order for zztat to be able to send emails when an alert occurs, the following requirements apply:
 
* The XML Database component must be installed in your database. Starting with Oracle 12.1 this has become a mandatory component. If you are still running Oracle 11.2, you need to have XDB installed to be able to get emails from zztat.
 
* smtp_out_server must be configured
 
* ACLs must be configured for the servers specified in smtp_out_server. The installer does this automatically for you. Please note that it uses dbms_network_acl_admin to do so.
 
* The utl_mail package must be installed. See the Oracle documentation [https://docs.oracle.com/database/121/ARPLS/u_mail.htm#ARPLS71200 here] for details.
 
 
 
==== Tracing and Dumps ====
 
There are two distinct features that can be enabled. First and foremost, zztat's ability to trace itself. It has automatic tracing built-in that can be enabled if there are performance problems with zztat's own procedures.
 
 
 
Secondly, zztat offers several reactions that make use of the various Oracle events and dumps available. Some examples include hanganalyze, library cache dumps, event 10046, etc. It's also important to note that the more intrusive dumps, such as a systemstate dump or a hanganalyze are disabled by default - even after enabling the basic tracing functionality in zztat.
 
* To be able to use traces and diagnostics dumps, the zztat users will require the ALTER SESSION system privilege. The installer will grant this automatically if you enable this option.
 
 
 
==== Session Management ====
 
zztat has several metrics, gauges and reactions defined by default that make session management easier for the DBA:
 
* Idle sessions with uncommitted transactions can be terminated
 
* Sessions which are causing a cascading effect blocking many other sessions can be terminated
 
In order to make use of those tools, the zztat user will require the ALTER SYSTEM system privilege. The installer will grant this automatically if you enable this option.
 
 
 
==== Alert Log Messages ====
 
To integrate with existing monitoring solutions, zztat has the ability to write messages to the alert log. If you enable this functionality, the zztat user will require access to the dbms_system package.
 
  
 
== Setting up your Installation ==
 
== Setting up your Installation ==
Line 72: Line 12:
 
# The database link name to use
 
# The database link name to use
 
# Email configuration (optional but highly recommended)
 
# Email configuration (optional but highly recommended)
# dbms_system configuration (optional)
 
 
# alter session configuration (optional but highly recommended)
 
# alter session configuration (optional but highly recommended)
# alter system configuration (optional)
 
 
# zztat sys-helper configuration (optional but highly recommended)
 
# zztat sys-helper configuration (optional but highly recommended)
 
The first section in points 1 through 5 are the mandatory configuration. These determine how and where zztat will be setup by the installer.  
 
The first section in points 1 through 5 are the mandatory configuration. These determine how and where zztat will be setup by the installer.  
  
The second section in points 6 through 10 are the optional configuration. These determine which advanced zztat features will be available in your installation.  
+
The second section in points 6 through 8 are the optional configuration. These determine which advanced zztat features will be available in your installation.  
  
<u>Go through the setup.sql file in detail - it contains a lot of information. Failing to edit the file properly may result in a failing or broken installation.</u>
+
<u>Go through the setup.sql file in detail - it contains a lot of information. Failing to edit the file properly may result in a failed or broken installation.</u>
  
 
== Installing the Repository ==
 
== Installing the Repository ==
To begin the zztat repository installation, run the init_r.sql script. The script requires no parameters, everything is configured within setup.sql
+
To begin the zztat repository installation, run the install_repo.sql script. The script requires no parameters, everything is configured within setup.sql
  
 
== Installing Targets ==
 
== Installing Targets ==
To add a new target database to the zztat environment, run the init_r.sql script on the target database. If you have updated setup.sql before installing the repository, remember to copy the file across to the target database host.
+
To add a new target database to the zztat environment, run the install_target.sql script on the target database. If you have updated setup.sql before installing the repository, remember to copy the file across to the target database host.
  
 
== Installation Notes & Tips ==
 
== Installation Notes & Tips ==
 
Please be aware of the following when running the installation script:
 
Please be aware of the following when running the installation script:
 +
* Run the installation script when connected as SYS.
 
* The script automatically creates the necessary users and grants the necessary privileges.
 
* The script automatically creates the necessary users and grants the necessary privileges.
 
* The installer will drop the users before creating them. Do not use this script to correct a problem - you will loose any and all historic zztat data in your repository and / or targets.
 
* The installer will drop the users before creating them. Do not use this script to correct a problem - you will loose any and all historic zztat data in your repository and / or targets.
 
** Do not specify an existing user to install zztat in if it contains any application or user data already. zztat must be installed in a dedicated database schema / user account.
 
** Do not specify an existing user to install zztat in if it contains any application or user data already. zztat must be installed in a dedicated database schema / user account.
 
* The script is designed to be fully re-executable. If you specified the wrong tablespace, or anything else went wrong, you can safely run the script again.
 
* The script is designed to be fully re-executable. If you specified the wrong tablespace, or anything else went wrong, you can safely run the script again.
* The installation script should raise no errors, it may however do so when the script is re-executed, which is expected.
+
* The installation script should raise no errors, it may however do so when the script is re-executed, which is expected. BETA1: The script will always raise a few errors at the very beginning when it calls deinstall.sql. This is expected and no cause for concern.
 
* Close all database connections you may have to any of the zztat users to avoid problems with the install script. Do not connect to the repository owner schema or the application user schema while running the installer.
 
* Close all database connections you may have to any of the zztat users to avoid problems with the install script. Do not connect to the repository owner schema or the application user schema while running the installer.
 
* Run the zzdiag.sql script after the installation completes.
 
* Run the zzdiag.sql script after the installation completes.
 +
Once you have zztat installed and up and running, take a look at our [[Quick Guides]] to see what else you can do now!
 +
 +
For a list of known issues when installing or running zztat, please see [[Known Issues|here]].

Latest revision as of 11:17, 7 February 2018

Prerequisites

Before you begin, ensure that the installation prerequisites have been fulfilled.

Setting up your Installation

zztat is delivered as a tar-ball. To begin, you may want to distribute this to at least two servers hosting Oracle databases: One which will become the zztat repository and one which will become a target database monitored by zztat.

After you extract the tar-ball you will find a number of scripts. The first file to work with is setup.sql, which is grouped into several sections:

  1. Tablespace where we store our data
  2. The schema name of the application user on TARGETS 
  3. The schema name of the repository owner on the REPOSITORY
  4. The database link user account
  5. The database link name to use
  6. Email configuration (optional but highly recommended)
  7. alter session configuration (optional but highly recommended)
  8. zztat sys-helper configuration (optional but highly recommended)

The first section in points 1 through 5 are the mandatory configuration. These determine how and where zztat will be setup by the installer.

The second section in points 6 through 8 are the optional configuration. These determine which advanced zztat features will be available in your installation.

Go through the setup.sql file in detail - it contains a lot of information. Failing to edit the file properly may result in a failed or broken installation.

Installing the Repository

To begin the zztat repository installation, run the install_repo.sql script. The script requires no parameters, everything is configured within setup.sql

Installing Targets

To add a new target database to the zztat environment, run the install_target.sql script on the target database. If you have updated setup.sql before installing the repository, remember to copy the file across to the target database host.

Installation Notes & Tips

Please be aware of the following when running the installation script:

  • Run the installation script when connected as SYS.
  • The script automatically creates the necessary users and grants the necessary privileges.
  • The installer will drop the users before creating them. Do not use this script to correct a problem - you will loose any and all historic zztat data in your repository and / or targets.
    • Do not specify an existing user to install zztat in if it contains any application or user data already. zztat must be installed in a dedicated database schema / user account.
  • The script is designed to be fully re-executable. If you specified the wrong tablespace, or anything else went wrong, you can safely run the script again.
  • The installation script should raise no errors, it may however do so when the script is re-executed, which is expected. BETA1: The script will always raise a few errors at the very beginning when it calls deinstall.sql. This is expected and no cause for concern.
  • Close all database connections you may have to any of the zztat users to avoid problems with the install script. Do not connect to the repository owner schema or the application user schema while running the installer.
  • Run the zzdiag.sql script after the installation completes.

Once you have zztat installed and up and running, take a look at our Quick Guides to see what else you can do now!

For a list of known issues when installing or running zztat, please see here.