select 'Grant all on '||table_name||'to user2 ;' from all_tables where owner = upper(user1); 然后执行该语句的结果就可以了