Max datafiles
Job details
Name: | Max datafiles |
Platform: | Oracle |
Category: | Availability |
Description: | Checks the ‘soft limit’ and the ‘hard limit’ of the maximum number of physical OS files, that can be mapped to an Oracle instance. |
Long description: | |
Version: | 1.0 |
Default schedule: | 45m |
Requires engine install: | No |
Compatibility tag: | .[type=‘instance’ & databasetype=‘oracle’] |
Parameters
Name | Default value | Description |
---|---|---|
warning_threshold | 20 | Number of database files left until max datafiles (db_files) is reached in order to generate warning |
alarm_threshold | 5 | Number of database files left until max datafiles (db_files) is reached in order to generate alarm |
Job Summary
- Purpose: The purpose of this job is to monitor the current number of datafiles in an Oracle database instance and compare it against the maximum allowed datafiles threshold set by the ‘db_files’ parameter.
- Why: This job is crucial for maintaining database availability and ensuring that the Oracle instance does not reach the limit of allocatable datafiles, potentially leading to critical issues such as inability to add new data or perform routine operations that require new datafiles. If the thresholds are reached, the system can generate warnings or alarms to notify the administrators for proactive actions.
- Manual checking: You can check this manually in the database by issuing these SQL commands:
select to_number(p.value) "Max datafiles", to_number(d.cnt) "Current datafiles"
from v$parameter p, (select count(*) as cnt from v$datafile d)
where upper(name) like 'DB_FILES';
Monitoring Logic
The specified SQL queries and Javascript processing logic within the monitoring job operates as follows:
- Two hidden properties use SQL checks to ensure that the job has read permissions on the ‘v$datafile’ and ‘v$parameter’ views.
- A primary SQL query retrieves the maximum number of datafiles allowed (‘db_files’) and the current count of datafiles.
- Javascript logic then analyzes these numbers. If the current datafile count approaches the maximum (within the thresholds set for warnings or alarms), appropriate status messages are generated.
- A default schedule of 45 minutes is set, meaning this check happens almost hourly unless otherwise specified.
Output Handling
- The job leverages a ‘dbwatch-report-template’ to generate a report on max datafiles status.
- This report contains a chapter focused on the “Details,” where information about the current status of datafiles compared to the maximum permittable is showcased.
- Presentation of the data is in a table format for clear and concise display.
Integration and Compatibility
- This monitoring job is specifically tailored for Oracle database instances without a specific engine (as indicated by the compatibility checks).
- The job is automatically installable if the conditions defined (in ‘compatability’ and ‘compatability-hide’ tags) about the database environment are met, ensuring that it is only utilized where applicable.
In summary, this job efficiently monitors crucial parameters related to datafile usage in Oracle databases, provides actionable intelligence through alarms, and reports, all of which assist in maintaining optimal database performance and avoiding potential outages.