也是从CSDN上找来的.....
(本文来源于图老师网站,更多请访问http://m.tulaoshi.com/bianchengyuyan/)1).Logon as grantor, for instance USER1
2). run PL/SQL scripts:
DECLARE
p_grantee VARCHAR2(30):='ywxt_module_admin';
BEGIN
FOR rec IN (SELECT object_name, object_type
, DECODE (object_type, 'TABLE', 'ALL', 'VIEW', 'SELECT', 'EXECUTE') grant_type FROM user_objects)
LOOP
BEGIN
EXECUTE IMMEDIATE 'grant all on ' || rec.object_name || ' to ' || p_grantee;
EXCEPTION
WHEN OTHERS THEN
DBMS_OUTPUT.PUT_LINE(SUBSTR (SQLERRM,1,240));
END;
END LOOP;
END;
/