Professional Documents
Culture Documents
Introduction
Repository Structure and Features
Repository Schema and Table Definitions
Getting Started With the Repository
Installation
Character Set Support
Enabling or Disabling Publication to the Repository
Configuring the Repository
Upgrading the Repository
Data Aging for the Repository
Examples and Guidelines for Creating Repository Queries
Logging Events
Location of Configuration Files
Location of Log Files
Searching the Log Files
Sample Queries for Capturing Event Information
Introduction
The Trafodion instance repository is a data warehouse for manageability data collected from a Trafodion instance. Each instance in a Trafodion
cluster contains a repository schema ("_REPOS_") that hosts the repository tables. To retrieve data from the repository, DBAs or end users can
query the repository tables directly using the Trafodion Command Interface (TrafCI) or any third-party tool like DbVisualizer or SQuirreL SQL
Client. Performance metrics such as query information, statistics, and session information are stored in repository tables.
See the overall Process Architecture diagram, which shows data being published to repository tables and events being written to log files via
log4ccp or log4j.
METRIC_QUERY_TABLE This table stores query statistics information gathered during the
compilation and execution of queries that run longer than the
configured interval. For descriptions of the fields in the table, see ME
TRIC_QUERY_TABLE (Release 1.1). If you are using Trafodion
Release 1.0, see METRIC_QUERY_TABLE (Release 1.0).
METRIC_SESSION_TABLE This table provides access to ODBC and JDBC session statistics,
which are gathered when clients connect to a Trafodion instance.
These statistics include the data that is collected at the start and
end of each client session. For descriptions of the fields in the table,
see METRIC_SESSION_TABLE (Release 1.1). If you are using
Trafodion Release 1.0, see METRIC_SESSION_TABLE (Release
1.0).
METRIC_TEXT_TABLE This table is reserved for future use. For descriptions of the fields in
the table, see METRIC_TEXT_TABLE (Release 1.1). This table
does not exist in Trafodion Release 1.0.
Header Columns, which are columns that appear in each of the repository tables. If you are using Trafodion Release 1.0, see Header
Columns (Release 1.0).
STATEMENT_TYPE, which is a field in METRIC_QUERY_TABLE. If you are using Trafodion Release 1.0, see STATEMENT_TYPE
(Release 1.0).
Installation
The repository is automatically installed on the platform by the Trafodion installer.
Aggregation statistics, which are aggregated and published at a specified interval during the session. The default interval is 60
seconds.
Query statistics, which are published when the query starts and are updated when query ends. By default, query statistics are
published only for queries that run longer than 60 seconds.
You can configure the type of statistics that are written to the repository by setting the property, dcs.server.user.program.statistics.
type, in the dcs-site.xml file to one of the following statistics types and then restarting the DCS servers:
For more information about setting this and other statistics properties, see the Trafodion Database Connectivity Services Reference Guide.
NOTE: Trafodion Release 1.0 supports the 'query' setting, which causes session statistics and query statistics to be published in the
repository for all queries and which prevents aggregation statistics from being published. This setting is no longer supported in Trafodion Release
1.1 and subsequent releases.
Upgrading the Repository
Repository tables are re-created on every reinstallation of Trafodion or if you execute the 'initialize trafodion, upgrade' command.
NOTE: Aging out repository data is currently not supported but will be part of a future release.
Logging Events
Trafodion components use log4cpp and log4j to log error or event messages. By default, all information is logged to files. Log files contain:
log4cpp.monitor.mon.config Monitor
NOTE: In Trafodion Release 1.0, all configuration files use the default log level of 'ERROR.'
Returned columns:
log_ts timestamp(6),
severity char(10 bytes) character set utf8,
component char(24 bytes) character set utf8,
node_number integer,
cpu integer,
pin integer,
process_name char(12 bytes) character set utf8,
sql_code integer,
query_id varchar(200 bytes) character set utf8,
message varchar(4000 bytes) character set utf8
This query reports the number of execution errors (with sql_code between 8000 and 9000) that occurred during a specific day:
This query reports the number of compiler processes started by each master executor:
select message
from udf(event_log_reader())
where log_ts between timestamp '2015-01-27 00:00:00'
and timestamp '2015-01-27 23:59:59'
and sql_code in (6007, 6008) ;