Professional Documents
Culture Documents
Silo - Tips Streamserve Persuasion Sp5 Oracle Database
Silo - Tips Streamserve Persuasion Sp5 Oracle Database
Oracle® Database
Database Guidelines
Rev A
StreamServe Persuasion SP5 Oracle® Database Database Guidelines
Rev A
© 2001-2011 STREAMSERVE, INC.
ALL RIGHTS RESERVED
United States patent #7,127,520
No part of this document may be reproduced or transmitted in any form or by any means, electronic or
mechanical, for any purpose, without the express written permission of StreamServe, Inc. Information in this
document is subject to change without notice. StreamServe Inc. assumes no responsibility or liability for any
errors or inaccuracies that may appear in this book. All registered names, product names and trademarks of
other companies mentioned in this documentation are used for identification purposes only and are
acknowledged as property of the respective company. Companies, names and data used in examples in this
document are fictitious unless otherwise noted.
StreamServe, Inc. offers no guarantees and assumes no responsibility or liability of any type with respect to
third party products and services, including any liability resulting from incompatibility between the third party
products and services and the products and services offered by StreamServe, Inc. By using StreamServe
and the third party products mentioned in this document, you agree that you will not hold StreamServe, Inc.
responsible or liable with respect to the third party products and services or seek to do so.
The trademarks, logos, and service marks in this document are the property of StreamServe, Inc. or other
third parties. You are not permitted to use the marks without the prior written consent of StreamServe, Inc.
or the third party that owns the marks.
Use of the StreamServe product with third party products not mentioned in this document is entirely at your
own risk, also as regards the StreamServe products.
Contents
This document provides an overview of how to install, maintain, and back up the
StreamServe repositories running on Oracle® Database.
Intended audience
This document is intended for developers, for example StreamServe consultants,
who are also familiar with Oracle databases.
The document also contains some information that may be of interest for a
database administrator, for example information about the tables with the highest
growth rate and how StreamServe jobs are deleted from the runtime repository.
In this section
• Overview of StreamServe repositories on page 6.
• Tools for handling StreamServe repositories on page 11.
For detailed information about the StreamServe components that interacts with
the repositories, see the Control Center documentation.
Default schema owner The schema owner and password are the same as the
and password database user name. That is, StrsSERAccess
Default database user StrsSERAccess
name The management gateway uses this default user
when accessing the enterprise repository.
Runtime repository
The runtime repository stores jobs and job related information in queues. The
repository also contains security profiles and web access information for the
StreamStudio web applications. Any persistent resources are also stored in the
repository. For example, document definitions for StreamStudio Composition
Center and exception rules to pause service-enabled StreamServe Messages.
If you pause Messages, the Messages are stored in a separate queue called the
Message storage. If you use the Document Broker Plus solution, the documents
are stored in a queue called the Post-processing storage.
Each StreamServe application domain requires a separate runtime repository. For
example, one repository can be used for the StreamServe applications in
development, and another for the StreamServe applications in production. One
runtime repository is shared by all the applications in the application domain.
The runtime repository is accessed by StreamServer, Archiver and Task
Scheduler applications. When a StreamStudio web portal accesses the runtime
repository, the requests and responses are sent through the service gateway.
StreamServe archive
The StreamServe archive stores output documents and related metadata to be
accessed from StreamStudio Collector. The StreamServe archive is optimized for
searching and querying for documents.
Each application domain can access one single StreamServe archive. However,
one StreamServe archive can be shared by several application domains.
An Archiver application transfers documents and related metadata from the
runtime repository to the StreamServe archive according to schedules defined in
Control Center. When the Collector user searches for documents in the
StreamServe archive, all requests and responses are sent through the service
gateway.
Default schema owner The default repository name, which is the name that
and password the Control Center user assigns when the
StreamServe archive is created. See the Control
Center documentation.
Default repository user strsWeb
The user that Collector uses to access the
StreamServe archive.
Default schema owner dbo (if you create the application domain using the
and password Application Domain Editor in Control Center) with
the same password as the web content profile with
the default user strsWebContent.
Default repository user strsWebContent
The user that Composition Center uses to access the
web content repository.
Priority order
Use the priority order below when deciding which tool to use:
1 Handle as much as possible using the configuration tools provided by
StreamServe, for example in Design Center, in Control Center or in the
StreamStudio web applications.
2 Use StreamServe Database Administration Tool only for tasks which cannot
be performed in the configuration tools above. For more information about
this tool, see the Database Administration Tool documentation.
3 Use an appropriate Oracle tool, for example Oracle SQL*Plus or Oracle
SQL Developer, only for tasks which cannot be performed using the
StreamServe tools.
When running external tools, you should primarily use the database scripts
provided by StreamServe. For example, the StreamServe maintenance
scripts referred to in this document.
Installing StreamServe
repositories
In this section
• Hardware and software requirements on page 14.
• Installing an Oracle database on page 16.
• Creating StreamServe repositories on page 21.
• Checking StreamServe repositories on page 22.
• Adjusting StreamServe repositories on page 23.
• Uninstalling StreamServe repositories on page 30.
Related topics
For information on how to set up StreamServe for Oracle RAC (Real Application
Cluster), see the Cluster Guidelines.
In this section
• Software requirements on page 14.
• Hardware requirements on page 14.
• Server configuration on page 14.
Software requirements
• Oracle Database
It is recommended to use Oracle Database Enterprise Edition for large
installations where the StreamServe archive is used.
For a complete list of supported versions, see the Supported platforms and
software documentation.
Hardware requirements
• 2 CPUs (minimum). The required number of CPUs depend on the data
volume and the number of users. If several StreamServe processes run
concurrently against the same database, more CPUs are recommended.
• 8 GB RAM (recommended minimum). The required memory depends on
the data volume and the number of users. A rule of thumb is 1 GB for the
SGA (System Global Area) and 1 GB for the PGA (Process Global Area).
It is recommended to run 64-bit Oracle.
Server configuration
• The computer where you install the database needs lots of memory and
numerous fast striped disks. Since StreamServer is an update/insert heavy
application, it is recommended to use RAID 1+0 (not RAID-5) for data.
• A good I/O strategy is the Oracle recommended S.A.M.E. method (stripe-
and-mirror-everything, using a stripe size of 1 MB).
For more information, see the Oracle user documentation.
• Another strategy, especially if the disks are single-disks, is to implement
Oracle ASM (Oracle Automatic Storage Management) with fail over
groups. ASM uses software raid with stripe size depending on the type of
Oracle file, and is capable of re-balancing the disks if new disks are added.
If you use ASM, you must use RMAN (Oracle Recovery Manager) for
database backups.
For more information, see the Oracle user documentation.
In this section
• Creating an Oracle database on page 16.
• Increasing Unicode support on page 17.
• Changing non-default database parameters on page 18.
• Disabling changed locking behavior on page 19.
• Placing data files and redo-log files on page 20.
• Configuring of Oracle Net on page 20.
2 Set the database time zone to UTC (that is, GMT). You can do this either by
editing the database creation scripts and adding a time zone clause to the
CREATE DATABASE command:
or by running the command below and restarting the database after creation
(but before creating the StreamServe repositories):
Problem
If a service-enabled Message is paused by an exception rule, the Message is stored
in a Message storage in the runtime repository. The Message storage tables are
created by the StreamServer application the first time the application is started.
If there are other ongoing transactions against certain tables in the runtime
repository, the StreamServer application may fail when enabling the required
foreign key constraints.
The following error message is displayed:
ORA-00054: resource busy and acquire with NOWAIT specified
Solution
A supported work-around from Oracle is to disable the patch 5909305 by running
the statement below. Disabling the patch means that no exclusive access to the
parent table will be required when enabling foreign key constraints.
Since the parameter is dynamic, you do not have to restart the Oracle database
after disabling the patch.
You can run the following query to check that the patch was disabled:
SELECT bugno,value,is_default
FROM V$SYSTEM_FIX_CONTROL
WHERE bugno = 5909305;
Prerequisites
An Oracle database must be installed before you create the StreamServe
repositories, see Installing an Oracle database on page 16.
If you find INVALID objects, you can recompile these objects by running the
following query:
In this section
• Tables with highest growth rate and number of rows on page 23.
• Editing the StreamServe tablespaces on page 24.
• Indexing on page 26.
• Partitioning on page 29.
• CXPOST_<8-DigitNumber>
StreamServe archive
The StreamServe archive table with highest growth rate and highest number of
rows is:
• Meta_<5-DigitNumber>
Indexing
For most tables, performance will be improved by indexing one or several of the
columns. You should consider indexing columns that are used when filtering out
a relatively small amount of rows from the tables.
Indexing columns improves the speed of the data retrieval operations, but at the
cost of increased storage space and slower writes.
You index columns using the appropriate Oracle tool, for example
Oracle SQL*Plus or Oracle SQL Developer.
Prerequisites
To create an index in your own schema, one of the following must apply:
• The table or cluster to be indexed must be in your own schema.
• You must have the INDEX object privilege on the table to be indexed.
To create an index in another schema, you must have the CREATE ANY INDEX
system privilege.
Also, the owner of the schema to contain the index must have space quota on the
tablespaces to contain the index or index partitions.
In this section
• Columns suitable for indexing on page 26.
• Indexing columns in the runtime repository on page 27.
• Indexing columns in the StreamServe archive on page 28.
Message storage
When a Message is paused by an exception rule, the Message is stored in the
Message storage. The Messages can then be invoked via service calls, for
example web service calls from Ad Hoc Correspondence or Correspondence
Reviewer.
If a large amount of rows are stored in a Message storage, the service call
performance may be improved by indexing one or several of the columns. The
columns most suitable for indexing are the ones for user defined metadata (that is,
the ones configured with the Message context in Design Center).
Post-processing storage
When Document Broker Plus is used, the documents are stored in a Post-
processing storage. Metadata is used when searching for, retrieving and post-
processing the documents.
If a large amount of rows are stored in the storage, the search performance may
be improved by indexing one or several of the columns. The columns most
suitable for indexing are the ones for user defined metadata (that is, the ones
configured with the Post-processing context in Design Center).
In this example, an index is added to the metadata column Col_1 for the document
type table META_00001.
Partitioning
For large tables (for example, larger than 2 GB), performance may be improved
by partitioning tables and indexes.
Tables and indexes are then split into smaller components, where each component
can be managed and manipulated individually. For example, when deleting
documents from the StreamServe archive you can drop one or several partitions
instead of deleting millions of documents.
Partitioning is a separately licensed option, on top of Oracle Database Enterprise
Edition. When setting up partitioning, it is recommended to consult an Oracle
expert. For detailed information, see the Oracle user documentation.
StreamServe archive
• Meta_<5-DigitNumber>
The field BlobInfo.CreationDateTime is suitable for range partitioning.
When you drop a repository, all data within the repository is lost.
Prerequisites
Before dropping a repository, the following must be fulfilled:
• The StreamServe components must be removed. If not, the repository
services are not deleted, resulting in a corrupt StreamServe installation. For
information on how to uninstall and remove StreamServe components, see
the Installation Guide.
• There must be no active sessions running against the repository.
To drop a repository
To drop a repository, you can run the following command as a user with
privileges at least corresponding to a DBA user.
Maintaining StreamServe
repositories
• Job deletion
You can optimize the way in which expired top jobs and job status
information are deleted from the runtime repository.
• Job status update
To be deleted from the runtime repository, the status of a top job must be set
to completed. You can optimize the way in which the status of top jobs are
updated.
• Maintenance package
StreamServe provides scripts for gathering statistics and rebuilding indexes.
These scripts are described in this chapter.
In this section
• Top jobs, input jobs and output jobs on page 33.
• Deleting expired jobs from the runtime repository on page 34.
• Updating top job statuses in the runtime repository on page 41.
• Gathering statistics on page 46.
• Rebuilding indexes on page 49.
• Running maintenance procedures as database jobs on page 52.
• Monitoring jobs in the runtime repository on page 55.
In this section
• Job deletion process on page 35.
• Prerequisites and recommendations on page 36.
• Scheduling StreamServers to delete jobs on page 38.
• Scheduling Task Schedulers to delete jobs on page 39.
• Scheduling the database to delete jobs on page 40.
In this section
• Design Center configurations on page 36.
• Job deletion schedule on page 37.
• If the available time periods are too short or if the workload is continuous,
you should start the job deletions at an available time period and then
schedule the remaining deletions in the following way:
– In general, schedule a continuous job deletion with a high frequency.
– Exception – If most of your top jobs generate many output jobs, you
may receive a better delete performance by running job deletion less
frequent or (if possible) after each top job is successfully completed.
Location of repositorymanager.xml
You can either edit the configuration in:
• The template file (used for all new StreamServer applications), located in:
Windows:
<StreamServe installation>\Applications\Management\<Version>\
etc\config\<Version>\STRSCS\
UNIX:
<StreamServe installation>/applications/managementgateway/
etc/config/<Version>/STRSCS/
The changes that you make to s template file only apply for new
applications, created after the changes are done. They do not
apply for already created applications.
Post requisites
• It is recommended to comment out the corresponding lines for job deletion
in the repositorymanager.xml files for the StreamServer applications. See
Scheduling StreamServers to delete jobs on page 38.
Delete expired jobs Select to mark expired top jobs for deletion
and delete these expired jobs from the
runtime repository at the scheduled interval.
Threads – The maximum number of threads
to be used when deleting expired jobs
marked for deletion. Several treads enables
the application to delete several jobs in
parallel. Note that only the first thread
searches for and marks jobs for deletion.
Note: Each thread consumes system
resources
Delete expired Messages Select to delete expired Messages from
Message storages in the runtime repository at
the scheduled interval.
Post requisites
• It is recommended to comment out the corresponding lines in
repositorymanager.xml files for the StreamServer applications. See
Scheduling StreamServers to delete jobs on page 38.
In this section
• Job status update process on page 42.
• Recommendations on page 42.
• Scheduling StreamServers to update job statuses on page 43.
• Scheduling Task Schedulers to update job statuses on page 44.
• Scheduling the database to update job statuses on page 45.
Recommendations
It is recommended to schedule the job status update in the following way:
• The job status update task must be scheduled in relation to the job deletion
tasks and any archiving tasks. The job status update task should run more
frequent than these tasks. See Deleting expired jobs from the runtime
repository on page 34.
• In general, the following applies:
– If most of the top jobs generate one or a few output jobs, it is
recommended to schedule a continuous job status update with a high
frequency.
– If most of the top jobs generate many output jobs, it is recommended to
schedule a job status update with a lower frequency.
• Since updating statuses is more resource intensive than reporting statuses,
you should let only one application (or, if you use several application for
redundancy, as few as possible) perform the update operation.
Location of repositorymanager.xml
You can either edit the configuration in:
• The template file (used for all new StreamServer applications), located in:
Windows:
<StreamServe installation>\Applications\Management\<Version>\
etc\config\<Version>\STRSCS\
UNIX:
<StreamServe installation>/applications/managementgateway/
etc/config/<Version>/STRSCS/
The changes that you make to a template file only apply for new
applications, created after the changes are done. They do not
apply for already created applications.
UNIX:
<Project location>/applications/<Application>/<Layer>
Recommendations
See Recommendations on page 42.
Recommendations
See Recommendations on page 42.
Post requisites
You must disable the configuration in the repositorymanager.xml files for the
StreamServer applications. You can either comment out the corresponding line or
you can keep the configuration, but change to update="false".
See Scheduling StreamServers to update job statuses on page 43.
Note: As an alternative, you can override the setting in the configuration file by
using the startup argument -statusevent 0. This argument must be
applied on each Project for which you want to override the setting.
For more information, see the Startup argument reference manual.
Note: If Status Messenger is used to generate status reports, you must keep the
configuration in repositorymanager.xml (with update="false" and
report="true") for the StreamServer application that runs the Status
Messenger Project.
Update job status Select to update and report the statuses of top jobs
according to the scheduled interval.
Update status – Select to let the application update
the statuses of top jobs.
Report status – Select to let the application report
updated statuses.
Note: Do not select Report status if Status
Messenger is used to generate status reports.
Recommendations
See Recommendations on page 42.
Post requisites
You must disable the configuration in the repositorymanager.xml files for the
StreamServer applications. You can either comment out the corresponding line or
you can keep the configuration, but change to update="false".
See Scheduling StreamServers to update job statuses on page 43.
Note: As an alternative, you can override the setting in the configuration file by
using the startup argument -statusevent 0. This argument must be
applied on each Project for which you want to override the setting.
For more information, see the Startup argument reference manual.
Note: If Status Messenger is used to generate status reports, you must keep the
configuration in repositorymanager.xml (with update="false" and
report="true") for the StreamServer application that runs the Status
Messenger Project.
Gathering statistics
In this section
• Gathering sample statistics on page 46.
• Gathering system statistics on page 48.
You must gather sample statistics when there are rows in the Part
table and the QStatusReport table.
If the tables are frequently emptied, you should gather the statistics
when the tables have a lot of data and then lock the statistics in the
whole schema. Do not forget to unlock the statistics if you wish to
gather the statistics again.
The procedure described in this section collects statistics in the following way:
• For ALL objects in the schema (not only the ones that Oracle judges as
having missing or stale statistics).
• Histograms are collected (FOR ALL COLUMNS SIZE AUTO).
• Oracle decides when to invalidate cursors
(DBMS_STATS.AUTO_INVALIDATE).
• Sample size is set through procedure parameters. If these are not set, then
DBMS_STATS.AUTO_SAMPLE_SIZE is used.
• Parallel degree is set through procedure parameters. If these are not set, then
DBMS_STATS.AUTO_DEGREE is used.
Example 4 gather_stats
-----------------------------------------------------------------
-- NAME: gather_stats
-- PURPOSE: Gather optimizer statistics on StreamServe schema
-- PARAMETERS:
-- v_estimate_pct: Estimation percent in dbms_stats command
-- - Don't set to let Oracle decide the
-- sample size (AUTO_SAMPLE_SIZE)
--
-- v_parallel_degree: Run n stats gathering processes in
-- parallel
-- - Don't set to let Oracle decide the
-- parallelism
-- (AUTO_DEGREE, depends on table size,
-- CPU's and initialization parameters)
-- - Set to NULL to run using default table
-- parallelism
-- - Set to 1 to run using no parallelism
-----------------------------------------------------------------
v_estimate_pct IN NUMBER DEFAULT DBMS_STATS.AUTO_SAMPLE_SIZE,
v_parallel_degree IN NUMBER DEFAULT DBMS_STATS.AUTO_DEGREE);
In this example, the gather sample size is 5%, letting Oracle decide on the
parallelism.
BEGIN
maintenance.gather_stats (v_estimate_pct=>5);
END;
/
Example 6 Gathering statistics when Oracle decides sample size and parallelism
In this example, Oracle decides the sample size and the degree of parallelism.
BEGIN
maintenance.gather_stats;
END;
/
In the following example, you must change the XX* values before running:
-- 1. Create table to hold stats
BEGIN
-- Create table to hold stats
DBMS_STATS.CREATE_STAT_TABLE (
ownname => 'XXMYOWNER',
stattab => 'XXMYTABLENAME',
tblspace => 'XXMYTABLESPACE');
END;
/
-- 2. Export old system stats from dictionary to created stattable
BEGIN
DBMS_STATS.EXPORT_SYSTEM_STATS (
statown => 'XXMYOWNER',
stattab => 'XXMYTABLENAME',
statid => 'XXMYSTATID_OLD');
END;
/
-- 3. Gather new system stats for one hour under normal system load
BEGIN
DBMS_STATS.GATHER_SYSTEM_STATS (
gathering_mode => 'INTERVAL',
interval => 60,
statown => 'XXMYOWNER',
stattab => 'XXMYTABLENAME',
statid => 'XXMYSTATID_NEW');
END;
/
-- 4. Import the gathered system stats from stattable to dictionary
BEGIN
DBMS_STATS.IMPORT_SYSTEM_STATS (
statown => 'XXMYOWNER',
stattab => 'XXMYTABLENAME'
statid => 'XXMYSTATID_NEW');
END;
/
Rebuilding indexes
Oracle does not recommend rebuilding of indexes. Instead you should use the
COALESCE function. For more information, see the Oracle user documentation.
However, if your indexes would require rebuilding, you can use the scripts
provided in this section. For example, if rows has been removed from a
(previously) large table to which no new rows will be added.
When rebuilding indexes, you must make sure there is sufficient free space in the
destination tablespaces. See Ensuring sufficient free space on page 50.
Example 8 rebuild_indexes
-----------------------------------------------------------------
-- NAME: rebuild_indexes
-- PURPOSE: Rebuild all StreamServe indexes
-- PARAMETERS:
-- v_maxrunhours: Max hours to run (will not exit immediately,
-- but no new loop iteration will be started)
--
-- v_indexname_regexp:Optional POSIX regexp case-insensitive
-- search string for only rebuilding a subset
-- of all indexes e.g. all indexes starting
-- with letter A-H: '^[A-H].*'$'
--
-- Reference: "Multilingual Regular Expression
-- Syntax" in "Oracle® Database SQL Reference"
--
-- v_tablespace_dest: Move indexes to new tablespace when
-- rebuilding
-- v_parallel_mb_breakpoint: Run in parallel for indexes larger
-- than this MB
-- v_online: Run rebuild commands with the ONLINE
-- clause
-- v_sort_area_size_mb: Set sort_area_size in MB for session
-- (Uses default Oracle initialization
-- parameter settings if not set)
--
-- MISCELLANEOUS:
-- Direct privilege "CREATE TABLE" is needed for package owner
-----------------------------------------------------------------
v_maxrunhours IN NUMBER DEFAULT 24*365,
v_indexname_regexp IN VARCHAR2 DEFAULT '.*',
v_tablespace_dest IN VARCHAR2 DEFAULT NULL,
v_parallel_mb_breakpoint IN INTEGER DEFAULT -1,
v_online IN BOOLEAN DEFAULT TRUE,
v_sort_area_size_mb IN INTEGER DEFAULT -1);
In this example, the indexes for all search tables (that is, tables that begins with
"META_") in the StreamServe archive are rebuilt in the following way:
• Rebuild to the same tablespace (that is, v_tablespace_dest not set).
• Use offline mode (since this is faster than the online mode).
• Use parallel mode for all indexes larger than 50 MB.
• Break after first index done after 12 hours.
• Use custom sort_area_size of 100 MB per parallel thread.
Note: Parallel or online rebuild requires the Enterprise Edition of the Oracle
Database.
BEGIN
maintenance.rebuild_indexes (
v_online=>false,
v_tablename regexp=>'META_.*',
v_parallell_mb_breakpoint=>50,
v_maxrunhours=>12,
v_sort_area_size_mb=>100
);
END;
/
In this example, the indexes for all tables in the StreamServe archive are rebuilt
using the default options:
BEGIN
maintenance.rebuild_indexes ();
END;
/
Note: You must make sure that there is space left in the file system for the data
files to extend.
SELECT
tablespace_name tablespace,
ROUND(SUM(filesize)/1024/1024) filesize_mb,
ROUND((SUM(filesize)-SUM(filefree))/1024/1024) used_mb,
ROUND(SUM(autoextend_max)/1024/1024) autoextend_max_mb,
ROUND((SUM(filefree)+SUM(autoextend_max)-SUM(filesize))/1024/
1024)
smartfree_mb,
ROUND(MAX(maxindexbytes)/1024/1024) maxindex_mb
FROM
(SELECT
tablespace_name,
0 filesize,
SUM(bytes) filefree,
0 autoextend_max,
0 maxindexbytes
FROM
dba_free_space
GROUP BY
tablespace_name
UNION ALL SELECT
tablespace_name,
SUM(bytes) filesize,
0 filefree,
sum(greatest(bytes,maxbytes)) autoextend_max,
0 maxindexbytes
FROM
dba_data_files
GROUP BY
tablespace_name
UNION ALL SELECT
tablespace_name,
0 filesize,
0 filefree,
0 autoextend_max,
MAX(bytes) maxindexbytes
FROM
dba_segments
WHERE
segment_type = 'INDEX'
GROUP BY
tablespace_name)
GROUP BY tablespace_name
ORDER BY tablespace_name;
In this example, the job gathers optimizer statistics every night at 5:00 AM. The
gather sample size is 5%, and Oracle decides the degree of parallelism.
DECLARE
jobno NUMBER;
BEGIN
DBMS_JOB.SUBMIT (
jobno,
'maintenance.gather_stats (
v_estimate_pct=>5);',-- Command
to_date('2007-08-18 05:00:00','YYYY-MM-DD HH24:MI:SS'),--
Startdate
'sysdate+1' -- Interval
);
END;
/
COMMIT;
/
SELECT module,
sid,
serial#
client_info,
TO_CHAR (logon_time, 'YYYY-MM-DD HH24:MI:SS') logon_time,
last_call_et,
username,
status
FROM v$session
WHERE module LIKE 'maintenance.%'
ORDER BY module, sid, serial#;
SELECT s.module,
s.sid,
s.serial#,
s.client_info,
so.username,
opname,
target_desc,
sofar,
totalwork,
units,
TO_CHAR (start_time, 'YYYY-MM-DD HH24:MI:SS') start_time,
TO_CHAR (last_update_time, 'YYYY-MM-DD HH24:MI:SS')
last_update_time,
time_remaining,
elapsed_seconds
FROM v$session s, v$session_longops so
WHERE s.sid = so.sid AND
s.serial# = so.serial# AND
s.module LIKE 'maintenance.%' AND
so.sofar < so.totalwork
ORDER BY s.module, s.sid, s.serial#;
SELECT *
FROM dba_scheduler_running_jobs
ORDER BY owner, job_name;
SELECT *
FROM dba_scheduler_job_run_details
ORDER BY owner, job_name, log_date;
SELECT *
FROM dba_jobs
ORDER BY schema_user;
StreamStudio Reporter
With the StreamStudio Reporter application you can administer jobs that are
received, processed, and produced by StreamServer applications. For example,
you can view job status, resend jobs and delete jobs from the queues.
For more information, see the Reporter documentation.
Status Description
0 N/A – A processing status is not applicable (for example, when a job
is being created). No processing state has yet been finished.
1 Completed – The job is completed, with or without errors.
2 Cancelled – The processing of the job is cancelled.
3 Aborted – The job has failed the maximum number of retries.
4 Removed – The job is marked for deletion and will be removed.
5 Failed over – Another StreamServer application has taken over the
job due to failure of execution.
StructureTypeID
In the queries, <PartType_Top_Empty> is the following Structure Type ID for
top jobs, as described in the dbo.StructureType table in the runtime repository:
AB04C620-0668-400A-B78B-7139722AA194
In this section
• Retrieving a summary of the current top job statuses on page 57.
• Retrieving a summary of events waiting for processing on page 57.
• Retrieving the queues that hold events waiting for processing on page 57.
• Retrieving the total number of failed top jobs on page 57.
• Retrieving all error messages on page 58.
• Retrieving a summary of each type of error message on page 58.
• Retrieving failed jobs with error messages on page 58.
• Retrieving expired top jobs with error codes and statuses on page 58.
SELECT count(*)
FROM Part
WHERE ((ErrorCode < o) OR (ErrorCode >= 0)) AND
ProcessingStatus NOT IN (0,4) AND
StructureTypeID='<PartType_Top_Empty>' ;
In this section
• Retrieving a summary of the spread of job deletion on page 59.
• Retrieving the number of generated top jobs on page 60.
• Retrieving the number of notifications on page 60.
To interpret the result, you must look up the structuretypeid values in the
dbo.StructureType table in the runtime repository:
• Delete event on top jobs – PartType_Top_Empty
• Delete event on input jobs – PartType_Inputdata_Entity
• Delete event on output jobs – PartType_Data_Entity
If the job deletion is spread over input and output jobs, it is strongly recommended
to select the Store information and job setting in Design Center.
SELECT count(*)
FROM Notification ;
Performing backup of
StreamServe repositories
1 The overall start time for the schedule. The time value is always in local
time for the computer that is parsing it. The number is formatted in the
following way: YYYYMMDDhhmmssfff, where:
• Y: year
• M: month
• D: day
• h: hour
• m: minute
• s: second
• f: millisecond
If no start time exists, the time can be replaced with *.
2 The overall stop time for the schedule, formatted as described above.
3 The type of time interval that the scheduling concerns:
• Y: Year
• MY: Month
• WY: Week of year
• WM: Week of month
• DY: Day of year
• DM: Day of month
• DW: Day of week
• H: Hour
• MH: Minute
• S: Second
• MS: Millisecond
4 The start value for the time interval. If no start value exists, the value can be
replaced with *.
5 The stop value for the time interval. If no stop value exists, the value can be
replaced with *.
6 The step value for the time interval.
Note: The start and stop values will include the specified values. For
example, if you specify "T II * * MH 3 15 2"/, the scheduled
event will run at 03:00, 05:00, 07:00, 09:00, 11:00, 13:00, and 15:00.
DECLARE
my_raw_value RAW(16):= '<MYRAWVALUE>'
BEGIN
SELECT * FROM my_table
WHERE my_raw_field = my_raw_value;
END;
/
• Easiest during testing and development phases – Use the CAST function in
your SQL statement. Note that this is only for testing, it is not how it is done
in the application code (where RAW bind variables are used). For example: