Each username must have a password and is associated with one
and only one schema in the database; some accounts may have no objects in the schema, but
instead would have the privileges granted to that account to access objects in other schemas.
In this section, we??™ll explain the syntax and give examples for creating, altering, and dropping
users. In addition, we??™ll show you how to become another user without explicitly knowing the
password for the user.
Creating Users
The create user command is fairly straightforward. It has a number of parameters, which are listed
in Table 9-2 along with a brief description of each one.
In the following example, we are creating a user (SKING) to correspond with the user Steven
King, employee number 100 in the HR.EMPLOYEES table from the sample schemas installed with
the database:
SQL> create user sking identified by sking901
2 account unlock
3 default tablespace users
4 temporary tablespace temp;
User created.
Parameter Usage
username The name of the schema, and therefore the user, to
be created. The username can be up to 30 characters
long and cannot be a reserved word unless it is quoted
(which is not recommended).
IDENTIFIED { BY password |
EXTERNALLY | GLOBALLY AS
???extname??™ }
Specifies how the user will be authenticated: by the
database with a password, by the operating system
(local or remote), or by a service (such as Oracle
Internet Directory).
DEFAULT TABLESPACE tablespace The tablespace where permanent objects are created,
unless a tablespace is explicitly specified during creation.
Pages:
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487