|
Home > Archive > Other Oracle database topics > July 2005 > insufficient privileges on create trigger ?
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
insufficient privileges on create trigger ?
|
|
| mikelarry88@yahoo.com 2005-07-17, 9:23 am |
| 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.,
| |
| Sybrand Bakker 2005-07-17, 11:23 am |
| On 17 Jul 2005 06:48:38 -0700, mikelarry88@yahoo.com wrote:
>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.,
You did verify you actually do have the CREATE TRIGGER privilege?
--
Sybrand Bakker, Senior Oracle DBA
| |
| Mark C. Stock 2005-07-17, 8:23 pm |
|
<mikelarry88@yahoo.com> wrote in message
news:1121608118.359753.132690@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
|
|
|
|
|