The permission system of Oracle is divided into system permission and object permission. Databasesystemprivilege allows users to execute specific command sets. For example, createta
The permission system of Oracle is divided into system permission and object permission. Database system privilege allows users to execute specific command sets. For example, create ta
The permission system of Oracle is divided into system permission and object permission. Database system privilege allows users to execute specific command sets. For example, the create table permission allows users to create tables, and the grant any privilege permission allows users to grant any system permissions. Database object privilege allows you to perform certain operations on each object. For example, the delete permission allows you to delete rows in a table or view. The select permission allows you to query information from a table, view, sequence, or snapshot through the select permission.
Each oracle user has a name and password, and has tables, views, and Other Resources created by it. An oracle role is a set of permissions (privilege) (or the access type required by each user based on their status and conditions ). You can grant or assign the specified permissions to the role and then assign the role to the corresponding user. One user can also directly authorize other users.
1. Create a user
Oracle has two users: system and sys. Users can directly log on to the system user to create other users, because the system has the permission to create other users. When installing oracle, the user or system administrator can first create a user for himself. For example:
SQL code
Create user user01 identified by u01;
This command can also be used to set other permissions. For more information, see self-learning materials. To change a password, run the alter user command:
Alter user user01 identified by usr01;
Now the user01 password has been changed from "u01" to "usr01 ".
In addition to the alter user command, you can also use the password command. If you use the password command, the new password is not displayed on the screen. Users with the dba privilege can use the password command to change the passwords of any other users. Other users can only change their own passwords.
When you enter the password command, the system prompts you to enter the old and new passwords, as shown below:
Password
Changing password for user01
Old password:
New password:
Retype new password:
When the password is successfully modified, the user will receive the following feedback:
Password changed
Ii. delete a user
To delete a user, run the drop user command as follows:
Drop user user01;
If you have an object, you cannot delete it directly. Otherwise, an error value is returned. Specify the keyword cascade to delete all objects of a user and then delete the user. The following example deletes a user and an object:
Drop user user01 cascade;