Results 1 to 4 of 4
  1. #1
    Join Date
    Dec 2004
    Posts
    19

    Unanswered: ORA-01031: insufficient privileges

    Hi,

    I'm trying to create a new trigger on a table in Oracle 8. I use Toad to do so.
    I'm logged in as cas_owner, which is in my case the highest you can get. But if i try to execute the following statement:

    CREATE OR REPLACE TRIGGER CAS_OWNER.TRG_VERZEKERINGEN
    BEFORE INSERT
    ON CAS_OWNER.VERZEKERINGEN
    REFERENCING NEW AS NEW OLD AS OLD
    FOR EACH ROW
    DECLARE
    tmpVar NUMBER;
    /************************************************** ****************************
    NAME:
    PURPOSE:

    REVISIONS:
    Ver Date Author Description
    --------- ---------- --------------- ------------------------------------
    1.0 26-1-2005 1. Created this trigger.

    NOTES:

    Automatically available Auto Replace Keywords:
    Object Name:
    Sysdate: 26-1-2005
    Date and Time: 26-1-2005, 16:25:36, and 26-1-2005 16:25:36
    Username: (set in TOAD Options, Proc Templates)
    Table Name: (set in the "New PL/SQL Object" dialog)
    Trigger Options: (set in the "New PL/SQL Object" dialog)
    ************************************************** ****************************/
    BEGIN
    tmpVar := 0;

    SELECT MySeq.NEXTVAL INTO tmpVar FROM dual;
    :NEW.SequenceColumn := tmpVar;
    :NEW.CreatedDate := SYSDATE;
    :NEW.CreatedUser := USER;

    EXCEPTION
    WHEN OTHERS THEN
    -- Consider logging the error and then re-raise
    RAISE;
    END ;



    /
    It gives me ORA-01031: insufficient privileges and the focus stays on the word verzekeningen which is the name of one of my tables.

    Who has a clue or something which comes close.

    Regards,

    Jânio

  2. #2
    Join Date
    Jul 2003
    Posts
    2,296
    create trigger privilege.
    - The_Duck
    you can lead someone to something but they will never learn anything ...

  3. #3
    Join Date
    Dec 2004
    Posts
    19
    Hi,

    It must be that I'm too much of a Rookie, but as far as I know I'm the owner of the table, which (I geuss) would give me all the rights.
    If I check the privilages of the table, I can see and edit als the privilages of the users exept the owner.
    Has it something to do with the above text?

  4. #4
    Join Date
    Jul 2003
    Posts
    2,296
    i am not referring to table privs.
    I am referring to session privs:
    PHP Code:
    sqlselect from SESSION_PRIVS
      2  where PRIVILEGE like 
    '%TRIGGER';

    PRIVILEGE
    ----------------------------------------
    CREATE TRIGGER
    CREATE ANY TRIGGER
    ALTER ANY TRIGGER
    DROP ANY TRIGGER
    ADMINISTER DATABASE TRIGGER 
    my guess is that you do not have the CREATE TRIGGER privilege
    - The_Duck
    you can lead someone to something but they will never learn anything ...

Posting Permissions

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