以下内容均为个人理解(可能有不正确的地方):
1.用户:Oracle数据库系统有很多不同的用户,就好像你电脑开机的时候也会让你选用户再输密码,显然他们的权限会不一样。sys是特权用户,只能加sysdba,或sysoper ,sysdba是最高的角色,拥有所有的权限,相对与sysoper他有建立数据库的权限,还可以执行不完全恢复。在连接数据库时,sys用户必须选定角色,而system用户就算拥有sysdba,或其他角色,但可以选择不加。
查看有哪些用户:select username,default_tablespace from dba_users;
删除一个用户和他相关的一切:drop user test1 cascade;
创建一个用户:
create user test1 identified by 123456
default tablespace users
temporary tablespace temp
quota unlimited on users;/quota 10m on users;
给用户上锁:alter user test1 account lock;
给用户解锁:alter user test1 account unlock;
让用户连接数据库,授予create session /connect 的权限/角色:grant create session to test1;(此时不加user)
撤销权限:revoke create session from test1;
改用户密码:alter user test1 identified by 123456;
with admin option的使用:grant create session to test1 with admin option;
查看角色:select * from dba_roles;
创建角色:create role designer identified by 123456;