First, the system's default user
1 sys user is superuser, has the highest privilege, has the SYSDBA role, has the permission to create database, the user's default password is sys.
Login Statement:sql> Conn Sys/sys as SYSDBA;
2 The system user is the management operator, the permissions are also very large. Has the sysoper role, does not have the CREATE DATABASE permission, the default password is the manager.
Login Statement:sql> Conn System/manager;
3 The biggest difference between SYS and system two users is the right to create database.
4 Scott User is a normal user, the password defaults to Tiger, the default unlocked
Unlock statement: Sql>alter user Scott account unlock; Login Statement:sql> Conn Scott/tiger;
Second, the management of users
1 Create user Wanghao identified by wh516 under the Administrator account (SYS or system);
2 Modify user password:sql> alter user Wanghao identified by WHIGW;
III. Granting of authority
1 The default normal user Scott is unlocked by default, and the new user does not have any permissions and must be granted permissions through the administrator.
Copy Code code as follows:
Sql> Grant Create session to Wanghao grant Wanghao user the right to create a session, that is, login permissions.
sql> ALTER user Wanghao quota Unlimited on users, granting Wanghao users permission to use Tablespace.
Sql> grant CREATE TABLE to Wanghao, granting permission to create a table.
sql> grant drop any table to Wanghao; grant permission to delete any tables
Sql> Grant insert any table to Wanghao; grant permission to insert rows into any table
Sql> Grant Update any table to Wanghao;
2) Oralce Authority management more rigorous, ordinary users are also the default can not access each other, need to authorize each other.
Copy Code code as follows:
Sql> Grant SELECT on tablename (EMP) to Wanghao; Grant Wanghao user permission to view the specified table
Sql> Conn WANGHAO/WHIGW;
Sql> select * from Scott.emp; User Wanghao can view the table emp in user Scott;