1, Oracle users add
Copy Code code as follows:
Create user Lisi identified by Lisi;
Note: Create user is creating database users, followed by user name, identified by is set user password
2, the "connection" database permissions to grant new users Lisi
Copy Code code as follows:
Note: Keywords for grant:oracle database authorization
Connect:oracle a default role for a database, only the permissions on the database on which it is connected
3, the Scott User's table authorized to Lisi users
Copy Code code as follows:
Grant SELECT on EMP to Lisi;
Problem in Pl/sql: The dynamic execution table is inaccessible, and automatic statistics for this reply are prohibited. In the Executive menu you can disable statistics, or get a choice in V$session,v$sesstat and V$statname.
Solution:
Copy Code code as follows:
Grant SELECT on v_$session to user name;
Grant SELECT on V_$sesstat to user name;
Grant SELECT on V_$statname to user name;
4. Reclaim User Rights
Copy Code code as follows:
Revoke select on EMP from Lisi;
5, User Password modification
Login with Lisi account
Copy Code code as follows:
Alter user Lisi identified by password;
6, the user deletes
Drop user user name;
or Drop user username cascade (This will delete the table associated with the user)
7, the database permissions and Roles
① to see what permissions the database user has
Copy Code code as follows:
SELECT * from Session_privs;
Note: Session_privs is a dictionary of Oracle databases, and the dictionary table is actually Oracle's internal table (already exists without creation). This table can see many permissions, such as creating tables.
② View the roles owned by the database user itself
Copy Code code as follows:
SELECT * from User_role_privs;
③ to see what permissions the Connect role (DBA can perform)
Copy Code code as follows:
SELECT * from Dba_sys_privs where grantee= ' CONNECT ';
Note: The database has a lot of permissions and roles, because of the limited effort, just remember 3 characters, that is, connect, RESOURCE, DBA role
When creating a database for a developer, you should authorize connect, resource two roles for him.