Oracle Learning Notes-user Management
1: create a user
Create user username identified by password
Note: the password begins with a letter.
2: change the password
Myself: password
Others: password username (only the system administrator can change others)
3: delete the user
Drop user username [cascade]
DBA permission to delete
Note: if the user you want to delete has already created a table, delete it with a parameter cascade; (delete his table, too).
4: Grant permissions
Grant connect (one role) to username
Grant select (all) on table to username grants table permissions
Revoke the authority:
Revoke select (all) on test from username
Maintenance permissions:
If you want to give permission to a user, the user can give it to others.
Eage:
-- join with grant option if it is an object permission
Grant select on tablename to username with grant option
-- if it is a system permission
Grant connect (system permissions) to username with admin option
? If sys reclaims caozq permissions, will the following users authorized by caozq still have permissions?
Nine clans are connected!
5: permissions
System permissions: user's permissions on the database
Creste session permission (only with this permission can you log in to the database)
Object permissions: the user's rights to manipulate data objects for other users
6: role
Predefined roles (included with the system):
Custom roles (set by the user):
Connect: general role
Dba role: the role with the highest permissions
Resource: you can create tables in any tablespace
Data objects: tables, views, functions, stored procedures.
The newly created user does not have any permissions (nor does he have the right to log in to oracle)
7: user password Management (profile)
(1): account locked
Specify the maximum number of times a user enters a password\ lockout time
Create a profile file
Create profile lock-account (profile name) limit failed_login_attempts 3 (three attempts) password_lock_time 2 (locked for two days)
Grant profile files to users
Alter user username profile lock_account
(2) unlock
Alter user username account unlock
(3) termination password (how long does the user not change the password, the password is invalid)
Create profile profile_name limit password_life_time 10 (due in 10 days) password_grace_time 2 (two days grace)
Grant profile files to users
Alter user username profile lock_account
(4) password history (users cannot use old passwords when changing passwords)
Create profile password_history limit password_life_time 10 password_grace_time 2 password_reuse_time 10 (old password is not allowed for ten days)
(5) Delete profile:
Delete all related drop profile password_history (name) [cascade]