add container tablespace
This commit is contained in:
parent
a7e8fc34aa
commit
4928914de0
|
@ -122,7 +122,7 @@ sub new {
|
||||||
'free' => { name => 'free' },
|
'free' => { name => 'free' },
|
||||||
'skip' => { name => 'skip' },
|
'skip' => { name => 'skip' },
|
||||||
'notemp' => { name => 'notemp' },
|
'notemp' => { name => 'notemp' },
|
||||||
'container' => { name => 'container' },
|
'add-container' => { name => 'add_container' },
|
||||||
});
|
});
|
||||||
|
|
||||||
return $self;
|
return $self;
|
||||||
|
@ -137,11 +137,11 @@ sub prefix_tablespace_output {
|
||||||
sub manage_container {
|
sub manage_container {
|
||||||
my ($self, %options) = @_;
|
my ($self, %options) = @_;
|
||||||
|
|
||||||
return if (!defined($self->{option_results}->{container}));
|
return if (!defined($self->{option_results}->{add_container}));
|
||||||
|
|
||||||
# request from check_oracle_health.
|
# request from check_oracle_health.
|
||||||
my $query;
|
return if (!$self->{sql}->is_version_minimum(version => '9'));
|
||||||
if ($self->{sql}->is_version_minimum(version => '9')) {
|
|
||||||
my $tbs_sql_undo = q{
|
my $tbs_sql_undo = q{
|
||||||
-- freier platz durch expired extents
|
-- freier platz durch expired extents
|
||||||
-- speziell fuer undo tablespaces
|
-- speziell fuer undo tablespaces
|
||||||
|
@ -203,7 +203,7 @@ sub manage_container {
|
||||||
1
|
1
|
||||||
};
|
};
|
||||||
|
|
||||||
$query = sprintf(
|
my $query = sprintf(
|
||||||
q{
|
q{
|
||||||
SELECT /*+ opt_param('optimizer_adaptive_features','false') */
|
SELECT /*+ opt_param('optimizer_adaptive_features','false') */
|
||||||
e.name||'_'||a.tablespace_name "Tablespace",
|
e.name||'_'||a.tablespace_name "Tablespace",
|
||||||
|
@ -261,9 +261,7 @@ sub manage_container {
|
||||||
defined($self->{option_results}->{notemp}) ? "AND (b.contents != 'TEMPORARY' AND b.contents != 'UNDO')" : '',
|
defined($self->{option_results}->{notemp}) ? "AND (b.contents != 'TEMPORARY' AND b.contents != 'UNDO')" : '',
|
||||||
defined($self->{option_results}->{notemp}) ? "" : $tbs_sql_temp
|
defined($self->{option_results}->{notemp}) ? "" : $tbs_sql_temp
|
||||||
);
|
);
|
||||||
} else {
|
|
||||||
return ;
|
|
||||||
}
|
|
||||||
$self->{sql}->query(query => $query);
|
$self->{sql}->query(query => $query);
|
||||||
my $result = $self->{sql}->fetchall_arrayref();
|
my $result = $self->{sql}->fetchall_arrayref();
|
||||||
|
|
||||||
|
@ -633,7 +631,7 @@ Perfdata show free space
|
||||||
|
|
||||||
skip temporary or undo tablespaces.
|
skip temporary or undo tablespaces.
|
||||||
|
|
||||||
=item B<--container>
|
=item B<--add-container>
|
||||||
|
|
||||||
Add tablespaces of container databases.
|
Add tablespaces of container databases.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue