Lab Class 3
Lab Class 3
• Syntax
ALTER USER user_name IDENTIFIED BY new_password;
Change a user's password
• Example
Example 2
Example 2
For example:
Example:
• Once you have granted privileges, you may need to revoke some or all
of these privileges. To do this, you can run a revoke command.
• You can revoke any combination of SELECT, INSERT, UPDATE,
DELETE, REFERENCES, ALTER, INDEX, or ALL.
Syntax
REVOKE privileges ON object FROM user;
Cont’d
• For example, if you wanted to revoke DELETE privileges on a table
called department from a user named dawit, you would run the
following REVOKE statement:
Example 2:
• Once you have created the role in Oracle, your next step is to grant
privileges to that role.
• Just as you granted privileges to users, you can grant privileges to a
role.
Syntax
The syntax for granting table privileges to a role in Oracle is:
For example:
GRANT all ON suppliers TO test_role;
Revoke Table Privileges from Role
• Once you have granted table privileges to a role, you may need to
revoke some or all of these privileges.
• To do this, you can execute a revoke command.
• You can revoke any combination of SELECT, INSERT, UPDATE,
DELETE, REFERENCES, ALTER, INDEX, or ALL
Syntax
• If you wanted to revoke ALL privileges on the table called suppliers from a role
named test_role, you could use the ALL keyword.
For example:
• Now, that you've created the role and assigned the privileges to the
role, you'll need to grant the role to specific users.
Syntax
The syntax to grant a role to a user in Oracle is:
• This example would grant the role called test_role to the user
named dawit.
Thank You!