create user mr identified by mrsoft
default tablespace users
temporary tablespace temp;
create user east identified by mrsoft
default tablespace users
temporary tablespace temp
quota 10m on tbsp_1;
create user df identified by mrsoft
default tablespace tbsp_1
temporary tablespace temp
quota unlimited on tbsp_1;
connect system/1qaz2wsx;
grant connect,resource to east;
connect east/123456;
--创建用户dongfang
create user dongfang identified by mrsoft
default tablespace users
quota 10m on users;
--创建用户xifang
create user xifang identified by mrsoft
default tablespace users
quota 10m on users;
--授权
grant create session,create table to dongfang with admin option;
connect dongfang/mrsoft;
grant create session,create table to xifang;
--连接到xifang
connect xifang/mrsoft;
create table tb_xifang
( id number,
name varchar2(20)
);
connect system/1qaz2wsx;
revoke resource from east;
grant select,insert,delete,update on scott.emp to xifang;
connect system/1qaz2wsx;
revoke delete,update on scott.emp from xifang;
connect system/1qaz2wsx;
create role designer identified by 123456;
create profile lock_account limit
failed_login_attempts 5
password_lock_time 7; alter user dongfang profile lock_account;
create profile password_lift_time limit
password_life_time 30
password_grace_time 3;
alter user dongfang profile password_lift_time;
show parameter resource_limit;
alter system set resource_limit=true;
alter profile password_lift_time limit
cpu_per_session 20000
sessions_per_user 10
cpu_per_call 500
password_life_time 180
failed_login_attempts 10;
--创建用户
create user hello identified by mrsoft
default tablespace users
temporary tablespace temp;
--授权
grant connect,create table to hello;
--创建角色
create role mr identified by 123456; --授权
grant connect,create table to mr;

吴裕雄--天生自然ORACLE数据库学习笔记:用户管理与权限分配的更多相关文章

  1. 吴裕雄--天生自然ORACLE数据库学习笔记:管理表空间和数据文件

    col tablespace_name for a10 col file_name for a50 col bytes ,, select tablespace_name,file_name,byte ...

  2. 吴裕雄--天生自然ORACLE数据库学习笔记:Oracle数据备份与恢复

    run{ allocate channel ch_1 device type disk format = 'd:\oraclebf\%u_%c.bak'; backup tablespace syst ...

  3. 吴裕雄--天生自然ORACLE数据库学习笔记:过程、函数、触发器和包

    create procedure pro_insertDept is begin ,'市场拓展部','JILIN'); --插入数据记录 commit; --提交数据 dbms_output.put_ ...

  4. 吴裕雄--天生自然ORACLE数据库学习笔记:PL/SQL编程

    set serveroutput on declare a ; b ; c number; begin c:=(a+b)/(a-b); dbms_output.put_line(c); excepti ...

  5. 吴裕雄--天生自然ORACLE数据库学习笔记:Oracle 11g的闪回技术

    alter system set db_recovery_file_dest_size=4g scope=both; connect system/1qaz2wsx as sysdba; archiv ...

  6. 吴裕雄--天生自然ORACLE数据库学习笔记:数据导出与导入

    create directory dump_dir as 'd:\dump'; grant read,write on directory dump_dir to scott; --在cmd下 exp ...

  7. 吴裕雄--天生自然ORACLE数据库学习笔记:优化SQL语句

    create or replace procedure trun_table(table_deleted in varchar2) as --创建一个存储过程,传入一个表示表名称的参数,实现清空指定的 ...

  8. 吴裕雄--天生自然ORACLE数据库学习笔记:Oracle系统调优

    --修改 alter system set large_pool_size=64m; --显示 show parameter large_pool_size; select sum(getmisses ...

  9. 吴裕雄--天生自然ORACLE数据库学习笔记:表分区与索引分区

    create table ware_retail_part --创建一个描述商品零售的数据表 ( id integer primary key,--销售编号 retail_date date,--销售 ...

随机推荐

  1. Unity 鼠标旋转物体360展示

    PC端 using UnityEngine; using System.Collections; public class DragRound : MonoBehaviour { public Tra ...

  2. 在Linux系统下安装nginx教程

    最近学习了nginx,就打算nginx安装在Linux系统下,于是我就把安装步骤记录下来了,分享给大家,希望能对大家有帮助! 我的博客地址:https://www.cnblogs.com/themys ...

  3. 流式计算(三)-Flink Stream 篇一

    原创文章,谢绝任何形式转载,否则追究法律责任! ​流的世界,有点乱,群雄逐鹿,流实在太多,看完这个马上又冒出一个,也不知哪个才是真正的牛,据说Flink是位重量级选手,能流计算,还能批处理, 和其他伙 ...

  4. mybatis - mapper.java 的创建

    一. Mapper.java 创建过程 在前面注册 bean 的时候, 对beanClass 进行了替换, 为 MapperFactoryBean. 那么创建实例的时候, 会调用 MapperFact ...

  5. C#串口通信:MSComm控件使用详解

    目  次MSComm控件两种处理通讯的方式CommPort属性RThreshold 属性CTSHolding 属性SThreshold 属性CDHolding 属性DSRHolding 属性Setti ...

  6. 微软停止支持Windows 7 数百万台电脑将面临病毒等风险

    导读 微软给出的公告称,从2020年开始停止支持Windows 7操作系统,这意味着该公司不会再向数百万台电脑发布任何软件更新,包括可以防止网络攻击的软件补丁. 微软给出的公告称,从2020年开始停止 ...

  7. POJ - 1845 Sumdiv(分治)

    题意:求$A^{B}$的所有约数之和$mod\ 9901$ 思路:由结论有,一个数$n$进行质因数分解得到$n={p_{1}}^{c_{1}} * {p_{2}}^{c_{2}} *...* {p_{ ...

  8. python manage.py shell

    启动python有两种方式:python manage.py shell和python. 这两个命令 都会启动交互解释器,但是manage.py shell命令有一个重要的不同: 在启动解释器之前,它 ...

  9. linux contab

    定义格式: * * * * * commandm(0-59), h(0-23) d(1-31) M(1-12) W(0-7)周W用1-6表示分别对应:每周一….五,六,周日在国外老外周日相当于第一个工 ...

  10. Linux - 查看所有服务状态

    ubuntu: service --status-all 例如可查看ssh, apache2等服务是否开启