Database Reference
In-Depth Information
exeRCiSe 14.1 (continued)
6. Switch to a container PDB and attempt to create a common user. This will fail.
SQL> ALTER SESSION SET CONTAINER=lne6;
Session altered.
SQL>
SQL> CREATE USER c##another_user
2 IDENTIFIED BY cgyoomm
3 DEFAULT TABLESPACE user_data
4 QUOTA 1G ON example
5 TEMPORARY TABLESPACE temp
6 CONTAINER = CURRENT;
CREATE USER c##another_user
*
ERROR at line 1:
ORA-65094: invalid local user or role name
SQL>
7. Now attempt to create a local user. This will succeed.
SQL> CREATE USER local_user
2 IDENTIFIED BY cgyoomm
3 DEFAULT TABLESPACE user_data
4 QUOTA 1G ON example
5 TEMPORARY TABLESPACE temp
6 CONTAINER = CURRENT;
User created.
SQL>
Managing Common and Local Privileges
A user privilege is the authority or right to run a PL/SQL package, a particular type of
SQL statement, or access an object that belongs to another user. Privileges can be granted
to common or local users.
Grant privileges to users so that they can accomplish specific tasks within the database.
Grant privileges only to users who require the specific privileges necessary to accomplish
their tasks. Granting too many privileges can create security issues. Never grant SYSDBA or
SYSOPER privilege to users who are not administrators. You should grant privileges to roles
and not to specific users since roles allow for an easier and better way to manage privileges.
Search WWH ::




Custom Search