I find this way easier begin for i in (select username from dba_users) LOOP dbms_stats.gather_schema_stats(i.username,estimate_percent=>dbms_stats.auto_sample_size,method_opt=> for all columns size repeat,degree =>7); end loop; end; / On 9/2/05, Chirag DBA <chiragdba@xxxxxxxxx> wrote: > > I want to generate a script for all users. > What is wrong here? There is one set parameter to set special characters > off. >