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

Thread: insufficient privileges - execute immediate

  1. #1
    Join Date
    Dec 2008
    Posts
    1

    Post insufficient privileges - execute immediate

    I granted dba to the user,
    but the user gets "insufficient privileges"
    when executing:

    create table gebruikers
    ( id varchar2(11), ww varchar2(11), naam varchar2(25), voornaam varchar2(25));

    create or replace procedure create_user(p_id varchar2, p_ww varchar2)
    is
    pragma autonomous_transaction;
    Begin
    execute immediate ‘create user ‘||p_id||’ identified by ‘||p_ww||’’;
    execute immediate ‘grant connect to ‘||p_id||’’;
    End;
    /
    create or replace trigger tr_user
    after insert on gebruikers
    for each row
    begin
    create_user(:new.id,:new.ww);
    end;
    /

  2. #2
    Join Date
    Mar 2007
    Location
    Ft. Lauderdale, FL
    Posts
    3,555
    First, no reason to grant DBA to an user.

    Second, may we ask:

    -- which one is offending user?
    -- who owns the table and the procedure?
    -- when executing "what" the user gets the error?
    Pablo (Paul) Berzukov

    Author of Understanding Database Administration available at amazon and other bookstores.

    Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.

  3. #3
    Join Date
    Sep 2002
    Location
    England
    Posts
    7,334
    you havent granted create user explicitly to the user

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