2. Objectives
After completing this lesson, you should be able to
do the following:
• Create new database users
• Alter and drop existing database users
• Monitor information about existing users
5. Checklist for Creating Users
1. Choose a username and authentication
mechanism.
2. Identify tablespaces in which the user needs to
store objects.
3. Decide on quotas for each tablespace.
4. Assign a default tablespace and temporary
tablespace.
5. Create a user.
6. Grant privileges and roles to the user.
6. Creating a New User:
Database Authentication
Set the initial password:
CREATE USER peter
IDENTIFIED BY my1stson
DEFAULT TABLESPACE data
TEMPORARY TABLESPACE temp
QUOTA 15m ON data
PASSWORD EXPIRE;
7. Remote Login
Possible
Creating a New User:
Operating System Authentication
OS_AUTHENT_
PREFIX
OS_
empty string
“ “
OPS$
(default)
Database
User
OS_USER15
USER15
OPS$USER15
(default)
Use OS_AUTHENT_PREFIX
Example: os User = user15
No
No
Yes
8. Creating a New
User: Guidelines
• Choose a standard password initially;
use os authentication sparingly.
• Use the EXPIRE keyword to force users to reset
their passwords.
• Always assign a temporary tablespace.
• Restrict quotas to few users;
use QUOTA UNLIMITED with caution.
• Educate users:
– To connect
– To change password
12. Summary
In this lesson, you should have learned how to:
• Create users specifying the appropriate password
mechanism
• Control usage of space by users