Unless a quota is explicitly
assigned or the user is granted the UNLIMITED TABLESPACE privilege (privileges are discussed
later in this chapter), the user cannot create objects in their own schema. In the following
example, we??™re giving the SKING account a quota of 250MB in the USERS tablespace:
SQL> alter user sking quota 250M on users;
User altered.
Note that we could have granted this quota at the time the account was created, along with
almost every other option in the create user command. A default role, however, can only be
assigned after the account is created. (Role management is discussed later in this chapter.)
Unless we grant some basic privileges to a new account, the account cannot even log in;
therefore, we need to grant at least the CREATE SESSION privilege or the CONNECT role (roles
are discussed in detail later in this chapter). For Oracle Database 10g Release 1 and earlier, the
CONNECT role contains the CREATE SESSION privilege, along with other basic privileges, such
as CREATE TABLE and ALTER SESSION; as of Oracle Database 10g Release 2, the CONNECT role
only has the CREATE SESSION privilege and therefore is deprecated. In the following example,
we grant SKING the CREATE SESSION and CREATE TABLE privileges:
SQL> grant create session, create table to sking;
Grant succeeded.
Now the user SKING has a quota on the USERS tablespace as well as the privileges to create
objects in that tablespace.
Pages:
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489