To make sure that the policy of "no datafiles should be autoextend on", if there are any datafiles have autoextend on, I have make them autoextend off. To automate it, here is a simple script.
set serveroutput on;
declare
stmt varchar2(600);
begin
for i in (select file_name from dba_data_files where AUTOEXTENSIBLE='YES')
loop
stmt := 'alter database datafile ''' || i.file_name || ''' autoextend off';
dbms_output.put_line(stmt);
execute immediate stmt;
end loop;
end;
/
No comments:
Post a Comment