Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: insufficient privileges on create trigger ?

Re: insufficient privileges on create trigger ?

From: Mark C. Stock <mcstockX_at_Xenquery>
Date: Sun, 17 Jul 2005 17:26:36 -0400
Message-ID: <9NadnbCLYbuTUEffRVn-sA@comcast.com>

<mikelarry88_at_yahoo.com> wrote in message news:1121608118.359753.132690_at_f14g2000cwb.googlegroups.com...
> why does my SQLPlus complain that I dont have privileges ? Table C is
> created by me. What am I doing wrong here ?
>
> SQL> run ;
> 1 CREATE TRIGGER C_TRIG
> 2 BEFORE INSERT ON C
> 3 FOR EACH ROW
> 4 BEGIN
> 5 :NEW.val2 = :NEW.val2 + 10;
> 6* END C_TRIG;
> BEFORE INSERT ON C
> *
> ERROR at line 2:
> ORA-01031: insufficient privileges
>
> Thanks much.
>

first, realize that it's not SQL*Plus, it's the database (SQL*Plus just happens to be the tool you're using to access the database)

check session privileges with the query

select * From session_privs

this will show what privileges your account currently has active. unless you have non-default roles, this list should match the list of privileges that your account has been granted (either directly or indirectly via roles)

check out the concept manual for more information about grants and privileges, as well as the sql manual under 'GRANT'

what you're seeing is that the CREATE TABLE privilege and the CREATE TRIGGER privilege are separate. CREATE TABLE does bundle 'CREATE INDEX' (it is not a separate privilege). But even the privilege to create a table and associated indexes is constrained by additional factors such as tablespace quotas

++ mcs Received on Sun Jul 17 2005 - 16:26:36 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US