Call now: 252-767-6166  
Oracle Training Oracle Support Development Oracle Apps

 
 Home
 E-mail Us
 Oracle Articles
New Oracle Articles


 Oracle Training
 Oracle Tips

 Oracle Forum
 Class Catalog


 Remote DBA
 Oracle Tuning
 Emergency 911
 RAC Support
 Apps Support
 Analysis
 Design
 Implementation
 Oracle Support


 SQL Tuning
 Security

 Oracle UNIX
 Oracle Linux
 Monitoring
 Remote s
upport
 Remote plans
 Remote
services
 Application Server

 Applications
 Oracle Forms
 Oracle Portal
 App Upgrades
 SQL Server
 Oracle Concepts
 Software Support

 Remote S
upport  
 Development  

 Implementation


 Consulting Staff
 Consulting Prices
 Help Wanted!

 


 Oracle Posters
 Oracle Books

 Oracle Scripts
 Ion
 Excel-DB  

Don Burleson Blog 


 

 

 


 

 

 

 

 

Monitoring Operators

Oracle Database Tips by Donald Burleson

Operators were new to Oracle8i. They enable extensibility of Oracle by allowing users to add operators (+, -, AND, OR, BETWEEN) to the database. Operators are also a key component of the Oracle8i INDEXTYPE (domain indexes). The views used to monitor operators are DBA_OPERATORS, DBA_OPARGUMENTS, DBA_OPANCILLARY, and DBA_OPBINDINGS. The operators? series of views are diagrammed in Figure 10.6 along with the DIMENSION and OUTLINE views. Source 10.37 shows an example of an operator report. An example of the output from the script in Source 10.37 is shown in Listing 10.35.

Figure 10.6 Miscellaneous DBA_ view clusters.

SOURCE 10.37 Example of database OPERATOR report.

rem
rem NAME: operator.sql
rem FUNCTION: Generate a lit of all OPERATORS in the database
rem for a specific user or all users
rem HISTORY: MRA 5/12/98 Created
rem
COLUMN owner             FORMAT a8   HEADING 'Owner'
COLUMN operator_name     FORMAT a10  HEADING 'Operator|Name'
COLUMN number_of_binds   FORMAT 9999 HEADING 'Binds'
COLUMN position                      HEADING 'Position'
COLUMN argument_type     FORMAT A20  HEADING 'Argument|Type'
COLUMN function_name     FORMAT A20  HEADING 'Binding|Argument'
COLUMN return_schema     FORMAT A10  HEADING 'Return|Schema'
COLUMN return_type       FORMAT A20  HEADING 'Return|Type'
BREAK ON owner ON operator_name ON number_of_binds
SET PAGES 58 LINES 130 FEEDBACK OFF VERIFY OFF
START title132 'Database OPERATOR Report'
SPOOL rep_out\&db\operator.lis
SELECT
     a.owner,
     a.operator_name,
     a.number_of_bindings,
     b.position,
     b.argument_type,
     c.function_name,
     DECODE(c.return_schema,NULL,'Internal',c.return_schema) return_schema,
     c.return_type
FROM
     Dba_operators a, dba_oparguments b, dba_opbindings c
WHERE
         Owner LIKE '%&owner%'
     AND a.owner=b.owner
     AND a.operator_name=b.operator_name
     AND a.owner=c.owner
     AND a.operator_name=c.operator_name
     AND b.binding#=c.binding#;
SPOOL OFF
CLEAR BREAKS
CLEAR COLUMNS
TTITLE OFF
SET FEEDBACK ON VERIFY ON

LISTING 10.35 Example of output from database OPERATOR report.

Date: 06/17/99                                                 Page:  1
Time: 08:45 PM               Database OPERATOR Report          SYSTEM
                                 ORTEST1 database                      

       Operator               Argument Bound                 Return   Return
Owner  Name    Binds Position Type     Function              Schema   Type
------ ------  ----- -------- -------- --------------------- -------- --------
SYSTEM CONCAT      1        1 VARCHAR2 "CON"."CONCAT_STRING" Internal VARCHAR2
                            2 VARCHAR2 "CON"."CONCAT_STRING" Internal VARCHAR2

You should review the operator report to ensure that the operator bindings are properly ascribed and are of the correct type. Also, make sure that the function for the operator is properly assigned and that input and output types are properly defined.

Monitoring Dimensions

Dimensions, new to Oracle8i, are usually used in data warehouse applications to allow Oracle to remap queries efficiently against summaries (materialized views). Dimensions describe the relationships in a large denormalized table or a set of quasi-normalized tables such as would be found in a star or snowflake design DSS or data warehouse application. The views used to monitor dimensions are shown in Figure 10.6.

Dimensions contain levels and hierarchies that are linked using join keys. A report showing some of these aspects of dimensions is shown in Source 10.38. An example of the output from Source 10.38 is shown in Listing 10.36. Additional reports showing the relationship of dimension to hierarchy and dimension and attribute are shown in Sources 10.39 and 10.40. Example outputs are shown in Listings 10.36 and 10.37.

SOURCE 10.38 Example of database dimension-level report.

rem
rem NAME: dim_level.sql
rem FUNCTION: Generate a lit of all Dimensions and levels in the
rem database for a specific user or all users
rem HISTORY: MRA 5/12/98 Created
rem
COLUMN owner             FORMAT a8   HEADING 'Owner'
COLUMN dimension_name     FORMAT a10  HEADING 'Dimension|Name'
COLUMN level_name        FORMAT a10 HEADING 'Level|Name'
COLUMN column_name       FORMAT a20 HEADING 'Column|Name'
COLUMN key_position      FORMAT 9999 HEADING 'Key|Position'
BREAK ON owner ON operator_name ON number_of_binds
SET PAGES 58 LINES 130 FEEDBACK OFF VERIFY OFF
START title132 'Database Dimension Levels Report'
SPOOL rep_out\&db\dim_level.lis
SELECT
     a.owner,
     a.dimension_name,
     b.level_name,
     c.column_name,
     c.key_position
FROM
     Dba_dimensions a, dba_dim_levels b, dba_dim_level_key c
WHERE
          a.Owner LIKE '%&owner%'
      AND a.owner=b.owner
      AND a.dimension_name=b.dimension_name
      AND a.owner=c.owner
      AND a.dimension_name=c.dimension_name
      AND b.level_name=c.level_name
ORDER BY
      a.owner,
      a.dimension_name,
      b.level_name;
SPOOL OFF
CLEAR BREAKS
CLEAR COLUMNS
TTITLE OFF
SET FEEDBACK ON VERIFY ON

LISTING 10.36 Example of output from database dimension-level report.

Date: 05/13/99                                               Page:   1
Time: 11:25 PM        Database Dimension Levels Report          SYSTEM
                               ORTEST1 database                                

         Dimension  Level      Column               Key
Owner    Name       Name       Name                 Position
-------- ---------- ---------- -------------------- ---------
TELE_DBA TEST_DIM   CHILD_ID   ID                           1
         TEST_DIM   PARENT_ID  PARENT_ID                    1          

The database dimension-level report should be reviewed to ensure that the levels are assigned to the proper columns.

SOURCE 10.39 Example of database dimension hierarchy report.

rem
rem NAME: dim_hierarchies.sql
rem FUNCTION: Generate a lit of all dimensions and hierarchies in the
rem database for a specific user or all users
rem HISTORY: MRA 5/12/98 Created
rem
COLUMN owner             FORMAT a8   HEADING 'Owner'
COLUMN dimension_name    FORMAT a10  HEADING 'Dimension|Name'
COLUMN column_name       FORMAT a10  HEADING 'Column|Name'
COLUMN hierarchy_name    FORMAT a10  HEADING 'Hierarchy|Name'
COLUMN parent_level_name FORMAT a10  HEADING 'Parent|Level'
COLUMN child_level_name  FORMAT a10  HEADING 'Child|Level'
COLUMN join_key_id       FORMAT a20 HEADING 'Join Key|ID'
BREAK ON owner ON dimension_name
SET PAGES 58 LINES 78 FEEDBACK OFF VERIFY OFF
START title80 'Database Dimension Hierarchy Report'
SPOOL rep_out\&db\dim_hierarchies.lis
SELECT
     a.owner,
     a.dimension_name,
     b.hierarchy_name,
     c.parent_level_name,
     c.child_level_name,
     c.join_key_id
FROM
     Dba_dimensions a, dba_dim_hierarchies b, dba_dim_child_of c
WHERE
          a.Owner LIKE '%&owner%'
      AND a.owner=b.owner
      AND a.dimension_name=b.dimension_name
      AND a.owner=c.owner
      AND a.dimension_name=c.dimension_name
      AND b.hierarchy_name=c.hierarchy_name
ORDER BY
      a.owner,
      a.dimension_name,
      b.hierarchy_name;
SPOOL OFF
CLEAR BREAKS
CLEAR COLUMNS
TTITLE OFF
SET FEEDBACK ON VERIFY ON

Listing 10.37     Example of output from database dimension hierarchy Report

Date: 05/13/99                                               Page:   1
Time: 11:32 PM      Database Dimension Hierarchy Report         SYSTEM
                              ORTEST1 database  

         Dimension  Hierarchy  Parent     Child      Join Key
Owner    Name       Name       Level      Level      ID                   
-------- ---------- ---------- ---------- ---------- -------------- 
TELE_DBA TEST_DIM   PLAN       PARENT_ID  CHILD_ID   
                     

The database dimension hierarchy report should be reviewed to ensure that the hierarchies are using the proper level assignments and that the parent-child relationships make sense (that is, they aren't inverted).

SOURCE 10.40 Example of database dimension attribute report.

rem
rem NAME: dim_attribute.sql
rem FUNCTION: Generate a lit of all Dimensions and atrributes in the
rem database for a specific user or all users
rem HISTORY: MRA 5/12/98 Created
rem
COLUMN owner             FORMAT a8   HEADING 'Owner'
COLUMN dimension_name    FORMAT a10  HEADING 'Dimension|Name'
COLUMN column_name       FORMAT a20  HEADING 'Column|Name'
COLUMN level_name        FORMAT a20  HEADING 'Level|Name'
COLUMN inferred          FORMAT a10  HEADING 'Inferred'
BREAK ON owner ON level_name
SET PAGES 58 LINES 78 FEEDBACK OFF VERIFY OFF
START title80 'Database OPERATOR Report'
SPOOL rep_out\&db\dim_attribute.lis
SELECT
     a.owner,
     a.dimension_name,
     b.level_name,
     c.column_name,
     c.inferred
FROM
     Dba_dimensions a, dba_dim_levels b, dba_dim_attributes c
WHERE
          a.owner LIKE '%&owner%'
      AND a.owner=b.owner
      AND a.dimension_name=b.dimension_name
      AND a.owner=c.owner
      AND a.dimension_name=c.dimension_name
      AND b.level_name=c.level_name
ORDER BY
      a.owner,
      a.dimension_name,
      b.level_name;
SPOOL OFF
CLEAR BREAKS
CLEAR COLUMNS
TTITLE OFF
SET FEEDBACK ON VERIFY ON

LISTING 10.38 Example of output from database dimension attribute report.

Date: 05/13/99                                              Page:   1
Time: 11:34 PM            Database OPERATOR Report             SYSTEM
                              ORTEST1 database                                                                                                        

         Dimension  Level                Column
Owner    Name       Name                 Name                 Inferred
-------- ---------- -------------------- -------------------- --------
TELE_DBA TEST_DIM   PARENT_ID            STATEMENT_ID         N     
       

The database dimension attribute report should be reviewed to be sure that the proper attributes are being ascribed to the proper levels.

 
This is an excerpt from Mike Ault, bestselling author of "Oracle 10g Grid and Real Application Clusters".


 

   
 
��  
 
 
Oracle Training at Sea
 
 
 
 
oracle dba poster
 

 
Follow us on Twitter 
 
Oracle performance tuning software 
 
Oracle Linux poster
 
 
 

 

Burleson is the American Team

Note: This Oracle documentation was created as a support and Oracle training reference for use by our DBA performance tuning consulting professionals.  Feel free to ask questions on our Oracle forum.

Verify experience! Anyone considering using the services of an Oracle support expert should independently investigate their credentials and experience, and not rely on advertisements and self-proclaimed expertise. All legitimate Oracle experts publish their Oracle qualifications.

Errata?  Oracle technology is changing and we strive to update our BC Oracle support information.  If you find an error or have a suggestion for improving our content, we would appreciate your feedback.  Just  e-mail:  

and include the URL for the page.


                    









Burleson Consulting

The Oracle of Database Support

Oracle Performance Tuning

Remote DBA Services


 

Copyright © 1996 -  2020

All rights reserved by Burleson

Oracle ® is the registered trademark of Oracle Corporation.