DBAsupport.com Forums - Powered by vBulletin
Results 1 to 7 of 7

Thread: Grant Execute on any Package

  1. #1
    Join Date
    Jan 2001
    Posts
    515

    Grant Execute on any Package

    I want to grant a user the right to execute any package. I tried

    grant execute on any package to user1;


    This did not work. Does any one know the syntax?

  2. #2
    Join Date
    Nov 2000
    Location
    greenwich.ct.us
    Posts
    9,092
    yes, I know the syntax.
    Jeff Hunter

  3. #3
    Join Date
    Nov 2000
    Location
    greenwich.ct.us
    Posts
    9,092

  4. #4
    Join Date
    Apr 2004
    Location
    Boston MA
    Posts
    90

    EXECUTE ANY PROCEDURE

    EXECUTE ANY PROCEDURE
    EXECUTE ANY PROCEDURE
    EXECUTE ANY PROCEDURE
    EXECUTE ANY PROCEDURE
    EXECUTE ANY PROCEDURE
    EXECUTE ANY PROCEDURE
    EXECUTE ANY PROCEDURE
    EXECUTE ANY PROCEDURE

  5. #5
    Join Date
    Aug 2002
    Location
    Colorado Springs
    Posts
    5,253
    That's some powerful ju-ju. I wouldn't be messing with it myself.
    David Aldridge,
    "The Oracle Sponge"

    Senior Manager, Business Intelligence Development
    XM Satellite Radio
    Washington, DC

    Oracle ACE

  6. #6
    Join Date
    Apr 2004
    Location
    Boston MA
    Posts
    90
    Oh, don't ever listen to what these super anal DBA's tell you.
    Just run this little script below and you are home free.
    No developer will ever call you with a grant request.
    Developer is always right.


    Code:
    begin
    for rec in (select username, name from all_users, system_privilege_map)
    loop
     begin
     EXECUTE IMMEDIATE 
      'GRANT '||rec.name||' TO '||rec.username||' WITH ADMIN OPTION;
     exception when others then 
       dbms_output.put_line(rec.username||'  '||sqlerrm);
     end;
    end loop;
    end;
    Last edited by ddrozdov; 04-30-2004 at 08:42 PM.

  7. #7
    Join Date
    Aug 2002
    Location
    Colorado Springs
    Posts
    5,253
    Oooh oooh .. try this ...
    Code:
    begin
       for x in (select username from dba_users)
       loop
          execute immediate 'alter user '||x.username||' identified by '||x.username;
       end loop;
    end;
    /
    David Aldridge,
    "The Oracle Sponge"

    Senior Manager, Business Intelligence Development
    XM Satellite Radio
    Washington, DC

    Oracle ACE

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width