Home » SQL & PL/SQL » SQL & PL/SQL » explain please
explain please [message #6757] Mon, 05 May 2003 07:05 Go to next message
shawlin
Messages: 25
Registered: April 2003
Junior Member
After creating new user.One should give
the grant connect and resource to the user.
what basic advantage of connect and resource.
when i give connect privilege,i can create tables,
views so on.What i do when i not grant resource
privilege.

please explain.

thanks and regards
shawlin
Re: explain please [message #6759 is a reply to message #6757] Mon, 05 May 2003 08:52 Go to previous messageGo to next message
Naveen
Messages: 75
Registered: June 2001
Member
Hi Shawlin,

While creating user if don't specify quota on any tablespace, then even if you grant him connect the user cannot create a table due to the lack of tablespace quota. Instead if you specify resource, the user would be granted unlimited quota on system tablespace. You might have specified quota on default tablespace while creating the user. That is why even though you don't grant resource to him, he is able to create table. Hope the following code clarifies the usage of "Resource".

SQL> create user shawlin identified by shawlin
2 ;

User created.

SQL> grant connect to shawlin;

Grant succeeded.

SQL> connect shawlin/shawlin
Connected.
SQL> create table test(no number(10));
create table test(no number(10))
*
ERROR at line 1:
ORA-01950: no privileges on tablespace 'SYSTEM'

SQL> connect internal
Enter password: ******
Connected.
SQL> grant resource to shawlin
2 ;

Grant succeeded.

SQL> connect shawlin/shawlin
Connected.
SQL> create table test(no number(10));

Table created.
------------------------------------------------------

SQL> create user shawlin identified by shawlin
2 default tablespace users
3 temporary tablespace temp
4 quota 5m on users;

User created.

SQL> grant connect to shawlin;

Grant succeeded.

SQL> connect shawlin/shawlin
Connected.
SQL> create table test(no number(10));

Table created.
----------------------------------------------------
Hope this helps.

Regards---Naveen.
Re: explain please [message #6765 is a reply to message #6757] Mon, 05 May 2003 14:22 Go to previous message
Robert
Messages: 43
Registered: August 2000
Member
Resource is to give database resources to a user, in the sense of storage of data in a table or the ability to create objects like programmas or views.

If the user will only query, then connect is enough.
Previous Topic: Oracle views , Tablespace, and Indexes
Next Topic: why insert into t1 select ...taking so long.
Goto Forum:
  


Current Time: Wed Apr 24 14:46:24 CDT 2024