iSelfSchooling.com - Copyright © 1999-2009  References  |  Job Openings  | Login (Staff | Members)
    Home  | Search more...  | Community of Sharing Knowledge (with FREE Online Video Training)
    Oracle Syntax  | Suggestions  | Private Tutoring  | Member Collaboration  | Get Translations...

  Copyright & User Agreement

    Email2aFriend  | Homepage us! |  Bookmark

Services

 Vision/Mission

 Services

 Biography

 Contact Us

 

 FREE Training

 SQL

 PL/SQL

 Forms 

 Reports

 Other TOOLS

 Fundamentals

 Performance

 OEM

 Application Server

 Grid Control

 Articles

 Prepare for OCP

 

More to know...

Acknowledgement___

 Who is who

 University Directory

 Links...

 

 

 

 

FREE Online Oracle Training for beginners and advanced - The most comprehensive Oracle tutorial

The authors do not guarantee or take any responsibility for the accuracy, or completeness of the information.

BASICS

SQL | PL/SQL

DEVELOPERS

FORMS 2 | REPORTS | Other TOOLS

DBAs

FUNDAMENTALS 2 | PERFORMANCE | OEM

ADVANCE

APPLICATION SERVER | GRID CONTROL | ARTICLES 2 3 4

Advanced - Articles I

Lesson 01 | Lesson 02 | Lesson 03 | Lesson 04 | Lesson 05 | Lesson 06 | Lesson 07 | Lesson 08 | Lesson 09 | Lesson 10 | Lesson 11 | Lesson 12 | Lesson 13 | Lesson 14 | Lesson 15 | Lesson 16 | Lesson 17 | Lesson 18 | Lesson 19 | Lesson 20 | Lesson 21 | Lesson 22 | Lesson 23 | Lesson 24 | Lesson 25 | Lesson 26 | Lesson 27 | Lesson 28 | Lesson 29 | Lesson 30 | Lesson 31 | Lesson 32 | Lesson 33 | Lesson 34 | Lesson 35 |

Lesson 11

When I despair, I remember that all through history the ways of truth and love have always won. There have been tyrants, and murderers, and for a time they can seem invincible, but in the end they always fall. Think of it - always.’ Gandhi

Tablespace Monitoring in the Oracle 10g database

Introduction

In the Oracle Database 10g, tablespace thresholds are defined in terms of a percentage of the tablespace size. When the threshold crosses their limits, an appropriate alert will raise or clear.

Since a shrink’s operation may cause ROWIDs to change in heap-organized segment, before executing a shrink operation you should enable row movement on a segment.

For example:

SQL> ALTER TABLE emp ENABLE ROW MOVEMENT;

SQL> ALTER TABLE emp SHRINK SPACE CASCADE;

 

Hands-On #1-Setting threshold

On the USERS tablespace, set a warning threshold of 80% and a critical threshold of 95%.

SQL> BEGIN

DBMS_SERVER_ALERT.set_threshold (

DBMS_SERVER_ALERT.tablespace_pct_full,

DBMS_SERVER_ALERT.operator_ge, 80,

DBMS_SERVER_ALERT.operator_ge, 95, 1, 1, NULL,

DBMS_SERVER_ALERT.object_type_tablespace, ‘USERS’);

END;

You can use the NULL value to return to the database-wide default values.

Check the database-wide threshold values for the USERS tablespace.

SQL> SELECT warning_value, critical_value

FROM dba_thresholds

WHERE metrics_name = ‘Tablespace Space Usage’ AND

object_name = ‘USERS’

/

 

Hands-On #2-Turn off the space usage tracking

Turn off the space-usage tracking for the USER tablespace.

SQL> BEGIN

DBMS_SERVER_ALERT.set_threshold (

DBMS_SERVER_ALERT.tablespace_pct_full,

DBMS_SERVER_ALERT.operator_do_not_check, ‘0’,

DBMS_SERVER_ALERT.operator_do_not_check, ‘0’, 1, 1, NULL,

DBMS_SERVER_ALERT.object_type_tablespace, ‘USERS’);

END;

Reset the database-wide threshold values of the USERS tablespace to the default database values.

SQL> BEGIN

DBMS_SERVER_ALERT.set_threshold (

DBMS_SERVER_ALERT.tablespace_pct_full,

NULL, NULL, NULL, NULL, 1, 1, NULL,

DBMS_SERVER_ALERT.object_type_tablespace, ‘USERS’);

END;

You can check the status of your threshold by using the following SQL statements.

SQL> SELECT reason, resolution

FROM dba_alert_history

WHERE object_name = ‘USERS’;

SQL> SELECT reason, message_level

FROM dba_outstanding_alerts

WHERE object_name = ‘USERS’;

 

 

 

“Like an unchecked cancer, hate corrodes the personality and eats away its vital unity. Hate destroys a man's sense of values and his objectivity. It causes him to describe the beautiful as ugly and the ugly as beautiful, and to confuse the true with the false and the false with the true.” Martin Luther King Jr.

Questions:

Questions on

Tablespace Monitoring in the Oracle 10g database

Q: How an alert will raise or clear based on a tablespace size?

Q: When do you need to enable row movement on a segment?

Q: On the USERS tablespace, set a warning threshold of 80% and a critical threshold of 95%.

Q: How do you check the database-wide threshold values for the USERS tablespace?

Q: How do you turn off the space-usage tracking for the USER tablespace?

Q: How do you reset the database-wide threshold values of the USERS tablespace to the default database values?

Q: How do you check the status of your threshold?

 

 

 
 
Google
 
Web web site