Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Granting privilege to add constraint

Veera90Jul 31 2015 — edited Aug 2 2015

Hi,

I have two users A and B.

B has been granted DML rights on A's objects.

I want user B to add a primary constraint on a table of A.
I ran 'GRANT ALTER ON A.tbl TO "B";


But when I run "alter table tbl ADD CONSTRAINT "const_name" primary key (col1,col2);" I get the below error,


SQL Error: ORA-01031: insufficient privileges
01031. 00000 -  "insufficient privileges"
*Cause:    An attempt was made to change the current username or password
           without the appropriate privilege. This error also occurs if
           attempting to install a database without the necessary operating
           system privileges.
           When Trusted Oracle is configure in DBMS MAC, this error may occur
           if the user was granted the necessary privilege at a higher label
           than the current login.
*Action:   Ask the database administrator to perform the operation or grant
           the required privileges.
           For Trusted Oracle users getting this error although granted the
           the appropriate privilege at a higher label, ask the database
           administrator to regrant the privilege at the appropriate label.

Any help is much appreciated.. Thanks.

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 30 2015
Added on Jul 31 2015
6 comments
3,000 views