基础"/>
2 OCA基础
privilege:系统权限和对象权限
role: 部分权限的集合,分为预定义角色(dba、connect、resource)和自定义角色/***sys、system拥有dba角色***/
schema(逻辑):数据库对象的集合(默认方案名和用户名相同)
tablespace(逻辑):数据文件(存储数据的物理文件)的集合,一个数据库由多个表空间组成,一个表空间可以包含多个数据文件
profile:概要文件(resource_parameters、password_parameters)
create user lcy identified by root;
grant connect to lcy;
grant resource to lcy;
drop user lcy cascade;/***将lcy的所有数据文件一并删除***/
--scott授权lcy对表emp的操作权限
conn scott/root;
grant all on scott.emp to lcy with grant option;
revoke all on scott.emp from lcy cascade constraints;/***lcy授予其他用户对scott.emp的权限也一并撤销***/
--profile
create profile lcy_profile limit failed_login_attempts 3 password_lock_time 2;
create profile lcy_profile limit password_life_time 10 password_grace_time 2 password_reuse_time 1;
alter user lcy profile lcy_profile;
drop profile lcy_profile cascade;
select * from dba_roles;
select * from dba_role_privs where grantee='SCOTT';
select * from system_privilege_map order by name;
select * from dba_sys_privs where grantee='DBA';
select distinct privilege from dba_tab_privs;
转载于:.html
更多推荐
2 OCA基础
发布评论