Database Reference
In-Depth Information
Specifying a Username for a Local User
A local username must be unique within a PDB. A user and a role cannot have the same
name within a PDB. Also, a local username cannot start with c## or C## ; that prefix identi-
fies a common username. And there is a schema associated with each username. As defined
previously, a schema is a collection of objects associated with a username. Within a user's
schema, each object must have a unique name.
SQL> ALTER SESSION SET CONTAINER=lne6;
SQL> CREATE USER lne_nd
2 IDENTIFIED BY cgyoomm
3 DEFAULT TABLESPACE user_data
4 QUOTA 1G ON example
5 TEMPORARY TABLESPACE temp
6 CONTAINER = CURRENT;
User created.
SQL>
The new username is stored in the database in uppercase letters, unless you enclose the
username in double quotes; then it will be stored in case-sensitive text, as shown in this query
of the DBA_USERS data dictionary view. Quoted identifiers are accepted by SQL*Plus but may
be invalid with other tools that access database objects.
SQL> CREATE USER "local_sample" IDENTIFIED BY password;
User created.
SQL>
SQL> SELECT USERNAME FROM DBA_USERS WHERE COMMON='NO';
USERNAME
------------------------------------------------------
LNE_ND
HR
local_sample
LNE6_ADMIN
SQL>
Search WWH ::




Custom Search