Results 1 to 4 of 4

Thread: privileges

  1. #1
    Join Date
    Oct 2002
    Posts
    3

    Question Unanswered: privileges

    Hi
    I need to give some privileges to a user that needs to use the sentence "execute immediate" when him does it the oracle answer with "insufficient privileges" . Someone can explain me wich are this privileges because i don't know.
    Thank you very much!

  2. #2
    Join Date
    Sep 2002
    Location
    UK
    Posts
    5,171
    Provided Answers: 1

    Re: privileges

    It is not "EXECUTE IMMEDIATE" that the user needs privileges for, it is the command he is trying to use within EXECUTE IMMEDIATE that he has insufficient privileges to do. For example:

    BEGIN
    EXECUTE IMMEDIATE 'CREATE TABLE t (a NUMBER)';
    END;

    This will fail with "ORA-01031: insufficient privileges" if the user cannot create tables.

  3. #3
    Join Date
    Oct 2002
    Posts
    3
    Thank you, i've just change the privileges of the user and now it's going perfectly.
    The problem was that the user has a role in which one of the privileges is "create table" but the procedure doesn't respect the role only the privileges asigned.

  4. #4
    Join Date
    Apr 2002
    Location
    California, USA
    Posts
    482

    Cool

    That's perfectlly correct. The object privileges have to be granted directly to the user, not via roles. The same rule applies when using views in PL/SQL stored procedures or functions.

    Hope that helps,

    clio_usa
    OCP - DBA

    .

Posting Permissions

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