• oracle创建用户赋予权限,删除权限


    --删除用户及及用户下的所有数据
    drop user xxx   cascade;
    
    --创建用户赋予密码
    create user xxx   identified by 1234;
    
    --赋予权限
    grant  dba to  xxx;
    
    --删除权限
    revoke dba from xxx;
    
    --赋予用户登录数据库的权限
    grant create session to xxx;
    
    --授予用户操作表的权限
    grant unlimited tablespace to xxx;
    grant create tablespace to xxx;
    grant alter tablespace to xxx;
    grant drop tablespace to xxx;
    grant manage tablespace to xxx;
    
    --撤销用户操作表空间的权限
    revoke unlimited tablespace from xxx;
    revoke create tablespace from xxx;
    revoke alter tablespace from xxx;
    revoke drop tablespace from xxx;
    revoke manage tablespace from xxx;
    
    grant create session to zhangsan;--授予zhangsan用户创建session的权限,即登陆权限
    grant unlimited session to zhangsan;--授予zhangsan用户使用表空间的权限
    grant create table to zhangsan;--授予创建表的权限
    grant drop table to   zhangsan;--授予删除表的权限
    grant insert table to zhangsan;--插入表的权限
    grant update table to zhangsan;--修改表的权限
    
    grant select on tablename to zhangsan;--授予zhangsan用户查看指定表的权限
    grant drop on tablename to zhangsan--授予删除表的权限
    grant insert on tablename to zhangsan;--授予插入的权限
    grant update on tablename to zhangsan;--授予修改表的权限
    select * from user_sys_privs;--查看当前用户所有权限
    select * from user_tab_privs;--查看所用用户对表的权限
    select * from user_sys_privs;--查看当前用户所有权限
    select * from user_tab_privs;--查看所用用户对表的权限
  • 相关阅读:
    python Elementtree 生成带缩进格式的xml文件
    Tacotron2论文阅读笔记
    opencv3 7.3 重映射 仿射变换
    numpy.ndarray类型方法
    ubuntu安装百度输入法
    gitlab--cicd实践pytest和flask接口化
    django搭建完毕运行显示hello django
    django搭建
    服务器内存
    python安装第三方库aiohtpp,sanio失败,pip install multidict 失败问题
  • 原文地址:https://www.cnblogs.com/xh_Blog/p/10028610.html
Copyright © 2020-2023  润新知