#!/usr/bin/perl
use strict;
use warnings;
#select file_id ,Tablespace_name, file_name, bytes/1024/1024 mbytes, AUTOEXTENSIBLE, MAXBYTES/1024/1024 maxbytes, INCREMENT_BY nextmb from dba_data_files where Tablespace_name='SYSAUX';
#select file_id, file_name, bytes/1024/1024 mbytes, AUTOEXTENSIBLE, MAXBYTES/1024/1024 maxbytes, INCREMENT_BY nextmb from dba_data_files where Tablespace_name='TS_DATA_01';
#column file_name format a45;
#select file_id ,file_name,Tablespace_name from dba_data_files;
my @to_8000 = (1..10);
my @to_4000 = (1..10);
print "\nproducao\n";
for (@to_8000){
print "alter database datafile $_ autoextend on next 500m maxsize 8000m;\n";
}
print "\naerp\n";
for (@to_4000){
print "alter database datafile $_ autoextend on next 500m maxsize 4000m;\n";
}
Example:
producao
alter database datafile 1 autoextend on next 500m maxsize 8000m;
alter database datafile 2 autoextend on next 500m maxsize 8000m;
stdby
alter database datafile 1 autoextend on next 500m maxsize 4000m;
alter database datafile 2 autoextend on next 500m maxsize 4000m;
alter database datafile 3 autoextend on next 500m maxsize 4000m;
alter database datafile 4 autoextend on next 500m maxsize 4000m;
alter database datafile 5 autoextend on next 500m maxsize 4000m;
alter database datafile 6 autoextend on next 500m maxsize 4000m;
0 comentários:
Post a Comment