First, the user
1. Create user
Create user u password for AA.
sql> create user u identified by AA;
2. Give permissions to users
The user is not yet able to connect to the database and must be given some permissions.
Sql> Grant create session to U;
Authorization is successful.
Sql> Conn U/aa;
is connected.
Sql> Show User
USER is "U"
3. Change your password
sql> alter user u password expire;
The user has changed.
Sql> Conn U/aa;
ERROR:
ora-28001:the Password has expired
Change the password for u
New Password:
4. Lock user Account
sql> alter user U account lock;
Sql> Conn U/bb;
ERROR:
Ora-28000:the account is locked
5, the user unlocks
sql> alter user u account unlock;
Second, the Authority
The system permissions for a database are large, because having system permissions means that you can manipulate all the objects of the database system. The object permission means that only one particular object can be manipulated.
System permissions are not specific to a particular table, view database object, and so on. It is only for operations, can you create, delete, view, and so on. The object permission is only for a database object, it determines what a user can do about an object. such as whether you can view, delete, update and so on.
Third, the role
1. Create a role
sql> Create role role_u1;
The role has been created.
2. Assigning permissions to Roles
sql> grant drop any table to ROLE_U1;
Authorization is successful.
Sql> Grant role_u1 to song;
Authorization is successful.
Oracle's users, permissions, and Roles