How to set tablespace thresholds?
If you have very less no. of targets and you are using dbcontrol for each database, then use DBMS_SERVER_ALERT package to set. If you have OEM Cloud control 12c / 13c, then you can create a new Metric extension and and Rule and apply it. Here we ll discuss how to use DBMS_SERVER_ALERT package.
Use of the DBMS_SERVER_ALERT package as an early warning mechanism for space issues. The DBMS_SERVER_ALERT package as an early warning mechanism for space issues. These can be set database-wide, or for individual tablespaces. When the threshold is crossed warnings are sent by the Enterprise Manager (DB Control, Grid Control or Cloud Control).
Setting the OBJECT_NAME parameter to NULL sets the default threshold for all tablespace in the database. Setting the OBJECT_NAME parameter to a tablespace name sets the threshold for the specified tablespace and overrides any default setting.
There are two types of tablespace thresholds that can be set.
TABLESPACE_PCT_FULL : Percent full.
When the warning or critical threshold based on percent full is crossed a notification occurs.
TABLESPACE_BYT_FREE : Free Space Remaining (KB).
The constant name implies the value is in bytes, but it is specified in KB. When the warning or critical threshold based on remaining free space is crossed a notification occurs. When you view these thresholds in different tools the units may vary, for example
Cloud Control displays and sets these values in MB.
The thresholds are set using a value and an operator.
OPERATOR_LE : Less than or equal.
OPERATOR_GE : Greater than or equal.
Setting Thresholds:
Note: You should know of your existing thresholds before changing them, so you know what to set them back to.
The following examples show how to set the different types of alerts.
Example-1: Database-wide KB free threshold.
Begin
DBMS_SERVER_ALERT.set_threshold(
metrics_id => DBMS_SERVER_ALERT.tablespace_byt_free,
warning_operator => DBMS_SERVER_ALERT.operator_le,
warning_value => '1024000',
critical_operator => DBMS_SERVER_ALERT.operator_le,
critical_value => '102400',
observation_period => 1,
consecutive_occurrences => 1,
instance_name => NULL,
object_type => DBMS_SERVER_ALERT.object_type_tablespace,
object_name => NULL);
end;
/
Example-2: Database-wide percent full threshold.
Begin
DBMS_SERVER_ALERT.set_threshold(
metrics_id => DBMS_SERVER_ALERT.tablespace_pct_full,
warning_operator => DBMS_SERVER_ALERT.operator_ge,
warning_value => '80',
critical_operator => DBMS_SERVER_ALERT.operator_ge,
critical_value => '90',
observation_period => 1,
consecutive_occurrences => 1,
instance_name => NULL,
object_type => DBMS_SERVER_ALERT.object_type_tablespace,
object_name => NULL);
end;
/
Example-3: Tablespace-specific KB free threshold.
begin
DBMS_SERVER_ALERT.set_threshold(
metrics_id => DBMS_SERVER_ALERT.tablespace_byt_free,
warning_operator => DBMS_SERVER_ALERT.operator_le,
warning_value => '1024000',
critical_operator => DBMS_SERVER_ALERT.operator_le,
critical_value => '102400',
observation_period => 1,
consecutive_occurrences => 1,
instance_name => NULL,
object_type => DBMS_SERVER_ALERT.object_type_tablespace,
object_name => 'USERS');
end;
/
Example-4: Tablespace-specific percent full threshold.
begin
DBMS_SERVER_ALERT.set_threshold(
metrics_id => DBMS_SERVER_ALERT.tablespace_pct_full,
warning_operator => DBMS_SERVER_ALERT.operator_ge,
warning_value => '80',
critical_operator => DBMS_SERVER_ALERT.operator_ge,
critical_value => '90',
observation_period => 1,
consecutive_occurrences => 1,
instance_name => NULL,
object_type => DBMS_SERVER_ALERT.object_type_tablespace,
object_name => 'USERS');
end;
/
Example-5: Tablespace-specific reset to defaults ( Set warning and critical values to NULL)
--DBMS_SERVER_ALERT.set_threshold(
-- metrics_id => DBMS_SERVER_ALERT.tablespace_pct_full,
-- warning_operator => DBMS_SERVER_ALERT.operator_ge,
-- warning_value => NULL,
-- critical_operator => DBMS_SERVER_ALERT.operator_ge,
-- critical_value => NULL,
-- observation_period => 1,
-- consecutive_occurrences => 1,
-- instance_name => NULL,
-- object_type => DBMS_SERVER_ALERT.object_type_tablespace,
-- object_name => 'USERS');
>> Setting the warning and critical levels to '0' disables the notification.
Displaying Thresholds
The threshold settings can be displayed using the DBA_THRESHOLDS view.
SET LINESIZE 200
COLUMN tablespace_name FORMAT A30
COLUMN metrics_name FORMAT A30
COLUMN warning_value FORMAT A30
COLUMN critical_value FORMAT A15
SELECT object_name AS tablespace_name,
metrics_name,
warning_operator,
warning_value,
critical_operator,
critical_value
FROM dba_thresholds
WHERE object_type = 'TABLESPACE'
ORDER BY object_name;
Ref:
https://docs.oracle.com/cd/B19306_01/appdev.102/b14258/d_salt.htm#CHDIFIHI
If you have very less no. of targets and you are using dbcontrol for each database, then use DBMS_SERVER_ALERT package to set. If you have OEM Cloud control 12c / 13c, then you can create a new Metric extension and and Rule and apply it. Here we ll discuss how to use DBMS_SERVER_ALERT package.
Use of the DBMS_SERVER_ALERT package as an early warning mechanism for space issues. The DBMS_SERVER_ALERT package as an early warning mechanism for space issues. These can be set database-wide, or for individual tablespaces. When the threshold is crossed warnings are sent by the Enterprise Manager (DB Control, Grid Control or Cloud Control).
Setting the OBJECT_NAME parameter to NULL sets the default threshold for all tablespace in the database. Setting the OBJECT_NAME parameter to a tablespace name sets the threshold for the specified tablespace and overrides any default setting.
There are two types of tablespace thresholds that can be set.
TABLESPACE_PCT_FULL : Percent full.
When the warning or critical threshold based on percent full is crossed a notification occurs.
TABLESPACE_BYT_FREE : Free Space Remaining (KB).
The constant name implies the value is in bytes, but it is specified in KB. When the warning or critical threshold based on remaining free space is crossed a notification occurs. When you view these thresholds in different tools the units may vary, for example
Cloud Control displays and sets these values in MB.
The thresholds are set using a value and an operator.
OPERATOR_LE : Less than or equal.
OPERATOR_GE : Greater than or equal.
Setting Thresholds:
Note: You should know of your existing thresholds before changing them, so you know what to set them back to.
The following examples show how to set the different types of alerts.
Example-1: Database-wide KB free threshold.
Begin
DBMS_SERVER_ALERT.set_threshold(
metrics_id => DBMS_SERVER_ALERT.tablespace_byt_free,
warning_operator => DBMS_SERVER_ALERT.operator_le,
warning_value => '1024000',
critical_operator => DBMS_SERVER_ALERT.operator_le,
critical_value => '102400',
observation_period => 1,
consecutive_occurrences => 1,
instance_name => NULL,
object_type => DBMS_SERVER_ALERT.object_type_tablespace,
object_name => NULL);
end;
/
Example-2: Database-wide percent full threshold.
Begin
DBMS_SERVER_ALERT.set_threshold(
metrics_id => DBMS_SERVER_ALERT.tablespace_pct_full,
warning_operator => DBMS_SERVER_ALERT.operator_ge,
warning_value => '80',
critical_operator => DBMS_SERVER_ALERT.operator_ge,
critical_value => '90',
observation_period => 1,
consecutive_occurrences => 1,
instance_name => NULL,
object_type => DBMS_SERVER_ALERT.object_type_tablespace,
object_name => NULL);
end;
/
Example-3: Tablespace-specific KB free threshold.
begin
DBMS_SERVER_ALERT.set_threshold(
metrics_id => DBMS_SERVER_ALERT.tablespace_byt_free,
warning_operator => DBMS_SERVER_ALERT.operator_le,
warning_value => '1024000',
critical_operator => DBMS_SERVER_ALERT.operator_le,
critical_value => '102400',
observation_period => 1,
consecutive_occurrences => 1,
instance_name => NULL,
object_type => DBMS_SERVER_ALERT.object_type_tablespace,
object_name => 'USERS');
end;
/
Example-4: Tablespace-specific percent full threshold.
begin
DBMS_SERVER_ALERT.set_threshold(
metrics_id => DBMS_SERVER_ALERT.tablespace_pct_full,
warning_operator => DBMS_SERVER_ALERT.operator_ge,
warning_value => '80',
critical_operator => DBMS_SERVER_ALERT.operator_ge,
critical_value => '90',
observation_period => 1,
consecutive_occurrences => 1,
instance_name => NULL,
object_type => DBMS_SERVER_ALERT.object_type_tablespace,
object_name => 'USERS');
end;
/
Example-5: Tablespace-specific reset to defaults ( Set warning and critical values to NULL)
--DBMS_SERVER_ALERT.set_threshold(
-- metrics_id => DBMS_SERVER_ALERT.tablespace_pct_full,
-- warning_operator => DBMS_SERVER_ALERT.operator_ge,
-- warning_value => NULL,
-- critical_operator => DBMS_SERVER_ALERT.operator_ge,
-- critical_value => NULL,
-- observation_period => 1,
-- consecutive_occurrences => 1,
-- instance_name => NULL,
-- object_type => DBMS_SERVER_ALERT.object_type_tablespace,
-- object_name => 'USERS');
>> Setting the warning and critical levels to '0' disables the notification.
Displaying Thresholds
The threshold settings can be displayed using the DBA_THRESHOLDS view.
SET LINESIZE 200
COLUMN tablespace_name FORMAT A30
COLUMN metrics_name FORMAT A30
COLUMN warning_value FORMAT A30
COLUMN critical_value FORMAT A15
SELECT object_name AS tablespace_name,
metrics_name,
warning_operator,
warning_value,
critical_operator,
critical_value
FROM dba_thresholds
WHERE object_type = 'TABLESPACE'
ORDER BY object_name;
Ref:
https://docs.oracle.com/cd/B19306_01/appdev.102/b14258/d_salt.htm#CHDIFIHI
I am a happy person today having to have recovered a large amount of money worth 10,000, which I had lost in the hands of Bitcoin fraudulent, It has been an unfortunate year for me trying to recover my money back for the last 2months but luckily a friend of mine who also went through the same scamming issue referred me to this recovery agent called Boleyn Magic Hackers It took 3days for them to recovery the full amount at first I was hesitant and scared to believe them since I have also lost some money trying to recover my money back, But my friend assured me that they are very reliably and I decided to try it a try I have never been happy in my life until today, I would advise anyone out here trying to recover your money back you all should trust Boleyn Magic Hackers If you are a victim of bitcoin scam and believe in recovering all your lost funds, Their insights, and dedication showed me a path to success I never knew existed. This is the Email address you can use to reach out to them: Email:support@boleynonline.com. I am aware that sometimes Bitcoin cannot be recovered. However, I think it's critical to provide this choice to those who have misplaced their Bitcoin. We appreciate you offering this helpful service, Boleyn Magic Hackers (BMH). My life was spared by Boleyn Experts, which is why I am sharing this Bitcoin recovery success story in their honor. I am also appreciative of how popular Bitcoin recovery is becoming. This implies that more users will be able to use Boleyn Magic Hackers' online recovery through email:support@boleynonline.com to recover their lost Bitcoin because more people will be aware of the scam.
ReplyDelete