set serverout on
declare 
  v_sql_stmt varchar2(200);
  cursor c_sql_stmt is select 'alter user "'||username||'" quota unlimited on DATA' sql_stmt from dba_users a 
    where oracle_maintained <> 'Y' 
      and username not in (select username from DBA_TS_QUOTAS where tablespace_name = 'DATA')
      and created > sysdate-1/24
    order by username;
begin
  for rec in c_sql_stmt loop
    v_sql_stmt := rec.sql_stmt;
    dbms_output.put_line('Running:     ' || v_sql_stmt);
    execute immediate(v_sql_stmt);
  end loop;
end;
/

exit
