INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

create table command fails when user has create table privilege

create table command fails when user has create table privilege

create table command fails when user has create table privilege

(OP)
selecting from dba_sys_privs shows the grantee with CREATE SESSION, CREATE TABLE, and UNLIMITED TABLESPACE permissions (the ADM column is NO)

The command :
create table s ( valkey varchar2(40), today float, primary key (valkey));
Fails with ORA-01031: insufficient privileges

What other privileges are necessary if CREATE TABLE is already granted?

RE: create table command fails when user has create table privilege

What is the user's default tablespace? At a guess, I am thinking it is not the same as the tablespace he has unlimited permissions on.

RE: create table command fails when user has create table privilege

SCB,

Here is my transcript that duplicates your scenario:

CODE

SQL> create user scb identified by scb;

User created.

SQL> grant create session, create table, unlimited tablespace to scb;

Grant succeeded.

SQL> conn scb/scb
Connected.
SQL> create table s ( valkey varchar2(40), today float, primary key (valkey));

Table created. 

So, everything seems to work satisfactorily given your specifications. Do you see any differences between my creation/specification of my user "SCB" and yours?

santaMufasa
(aka Dave of Sandy, Utah, USA)
“People may forget what you say, but they will never forget how you made them feel."

RE: create table command fails when user has create table privilege

(OP)
Thanks all for your help. We ended up delegating the specific tasks needed to one user with DBA privilege.

RE: create table command fails when user has create table privilege

But, SCB, given my CREATE USER statement, above, that table-creating user has only create session, create table, and unlimited tablespace privileges. A DBA should not be necessary to successfully CREATE TABLE. Can you or your DBA please troubleshoot the differences between my successful experience and your initial, unsuccessful experience?

santaMufasa
(aka Dave of Sandy, Utah, USA)
“People may forget what you say, but they will never forget how you made them feel."

RE: create table command fails when user has create table privilege

(OP)
This is being done for an existing user. As I am not the DBA I am not sure how the user was created, however using the DBA account :
setting current_schema to dvpp717

Session altered.

dvpp717> grant create session, create table, unlimited tablespace to ops$scb;

Grant succeeded.

Then, logging in as scb in a different xterm:
setting current_schema to dvpp717

Session altered.

dvpp717> create table s (valkey varchar2(40), today float, primary key (valkey));
create table s (valkey varchar2(40), today float, primary key (valkey))
*
ERROR at line 1:
ORA-01031: insufficient privileges


So although it appears that it should work my user still does not have sufficient privileges. I have also tried running the grant command without setting the current schema and that has the same results.

As the user who needs to be able to perform this task performs very specific functionality it was deemed acceptable to allow him DBA status which resolved the problem.

RE: create table command fails when user has create table privilege

Can you toss in a

CODE

select user from dual; 
in there, just for yuks and grins?

RE: create table command fails when user has create table privilege

(OP)
Sure:

setting current_schema to dvpp717

Session altered.

dvpp717> select user from dual;

USER
------------------------------
OPS$SCB



RE: create table command fails when user has create table privilege

Doesn't ops$scb need "create any table" privileges to create a table in the dvpp717 schema?

RE: create table command fails when user has create table privilege

Ah, SCB, there's the rub...in your original post, you left out the teensy, tiny fact that user X was creating a table in the user Y schema. So, KarlUK is absolutely correct...if you wish to create a table in another schema, the creator needs the create any table privilege, which user OPS$SCB apparently does not have, even if s/he does successfully run the alter session set current_schema=dvpp717 command.

santaMufasa
(aka Dave of Sandy, Utah, USA)
“People may forget what you say, but they will never forget how you made them feel."

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close