| ROLES & PRIVILEGES [message #268589] |
Wed, 19 September 2007 02:29  |
dba_giri
Messages: 26 Registered: July 2007 Location: Hyderabad
|
Junior Member |
|
|
Hi..,
I've created a user that Test
Provided the following:
Grant connect,resource to test;
RESOURCE Role is a set of the following privileges:
Note :I've checked it using the query "select * from dba_sys_privs where grantee='RESOURCE'"
CREATE TRIGGER
CREATE SEQUENCE
CREATE TYPE
CREATE PROCEDURE
CREATE CLUSTER
CREATE OPERATOR
CREATE INDEXTYPE
CREATE TABLE
Without ALTER TABLE Privilege how can I able to Altering my table which is exists in test User..?
Can u pl. explain..?
Thanks in Advance,
Giri K.Y.
|
|
|
|
|
|
|
|
|
|
| Re: ROLES & PRIVILEGES [message #268856 is a reply to message #268589] |
Wed, 19 September 2007 22:48   |
muzahid
Messages: 281 Registered: September 2004 Location: Dhaka, Bangladesh
|
Senior Member |
|
|
create table allow the grantee to create,alter and drop tables in the grantee's own schema.
So if you have create table permission you can create, alter as well as drop table of your own schema.
|
|
|
|
|
|
| Re: ROLES & PRIVILEGES [message #268935 is a reply to message #268892] |
Thu, 20 September 2007 02:38   |
|
|
| Michel Cadot wrote on Thu, 20 September 2007 11:58 | | Quote: | So if you have create table permission you can create, alter as well as drop table of your own schema
|
Even if you don't have the privilege.
Regards
Michel
|
No, I think.
SQL> create user test identified by test;
User created.
SQL> grant create session to test;
Grant succeeded.
SQL> conn test/test;
Connected.
SQL> create table test ( a number);
create table test ( a number)
*
ERROR at line 1:
ORA-01031: insufficient privileges
|
|
|
|
| Re: ROLES & PRIVILEGES [message #268938 is a reply to message #268589] |
Thu, 20 September 2007 02:43   |
muzahid
Messages: 281 Registered: September 2004 Location: Dhaka, Bangladesh
|
Senior Member |
|
|
User test should have create table privilege not create session privilege
Connected to:
Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.1.0 - Production
SQL> create user test identified by test;
User created.
SQL> grant create table to test;
Grant succeeded.
SQL> create table test ( a number);
Table created.
SQL> alter table test add ( b number);
Table altered.
SQL> drop table test;
Table dropped.
SQL>
|
|
|
|
| Re: ROLES & PRIVILEGES [message #268940 is a reply to message #268589] |
Thu, 20 September 2007 02:45   |
|
|
I forgot to mention version. 10.0.2.1
SQL> create table test ( a number);
create table test ( a number)
*
ERROR at line 1:
ORA-01031: insufficient privileges
SQL> conn / as sysdba
Connected.
SQL> grant resource to test;
Grant succeeded.
SQL> conn test/test;
Connected.
SQL> create table test ( a number);
Table created.
SQL> show release
release 1002000100
|
|
|
|
| Re: ROLES & PRIVILEGES [message #268942 is a reply to message #268935] |
Thu, 20 September 2007 03:08   |
muzahid
Messages: 281 Registered: September 2004 Location: Dhaka, Bangladesh
|
Senior Member |
|
|
| Arju wrote on Thu, 20 September 2007 02:38 |
No, I think.
SQL> create user test identified by test;
User created.
SQL> grant create session to test;
Grant succeeded.
SQL> conn test/test;
Connected.
SQL> create table test ( a number);
create table test ( a number)
*
ERROR at line 1:
ORA-01031: insufficient privileges
|
You gave test user create session privilege, but i gave test user
create table privilege
| Quote: |
SQL> grant create table to test;
Grant succeeded.
|
Try with this
revoke resource from test
revoke create session from test
grant create table to test
And then create table , alter table and drop table
|
|
|
|
| Re: ROLES & PRIVILEGES [message #268945 is a reply to message #268589] |
Thu, 20 September 2007 03:17   |
|
|
Muzahid(Showrav), You misleadingly interpret my message. It is not a matter of that one you demonstrate.
I responded to Michel's answer in which he like to say no need of any privilege to create table in own schema.
|
|
|
|
|
|
| Re: ROLES & PRIVILEGES [message #268963 is a reply to message #268892] |
Thu, 20 September 2007 04:13   |
|
|
| Michel Cadot wrote on Thu, 20 September 2007 11:58 | | Quote: | So if you have create table permission you can create, alter as well as drop table of your own schema
|
Even if you don't have the privilege.
Regards
Michel
|
Sorry , Michel if I do any wrong.I responded to this one which seemed to me not correct.
|
|
|
|
| Re: ROLES & PRIVILEGES [message #268973 is a reply to message #268963] |
Thu, 20 September 2007 05:05  |
 |
Michel Cadot
Messages: 54213 Registered: March 2007 Location: Nanterre, France, http://...
|
Senior Member Account Moderator |
|
|
My answer was for the last part of your sentence: "you can ... alter as well as drop table of your own schema" which is related to the original question.
Regards
Michel
|
|
|
|