zoukankan      html  css  js  c++  java
  • 创建用户和授权

                           
    /*******************************创建用户***********************************/
    create user admin identified by admin 
    default tablespace users
    quota 10m  on users
    quota 10m  on temp
    quota 10m  on indx
    temporary  tablespace  temp
    /*
    create user 用户名 identified by 密码
    default tablespace TS名
    quota 10m  on TS名   //数据表空间配额
    quota 10m  on TS名   //临时表空间配额
    quota 10m  on TS名   //索引表空间配额
    temporary  tablespace  TS名
    profile  配置文件 
    */
    /*********用户授权***********/
    grant/revoke 权限 on 对象 to 用户
    grant connect,resource to admin; 
     
    /*********修改用户************/
    alter user admin identified by aaa;
     
    /********用户锁定**********/
    alter user admin account lock
     
    /*******用户解锁*********/
    alter user admin account onlock
     
    /*********设置密码过期**********/
    alter user 用户 password expire
    alter user admin password expire
     
    /********删除用户************/
    drop user 用户 cascade 
    drop user admin cascade
    注:当前用户在连接时不能删除。
     
    /**********预定义角色***********/
    connect: DML
    resource:DML DDL DCL
    dba:  ALL
     
    /*********创建角色*************/
     
    create  role 名
    create role sa
     
    /**********绑定授权***********/
    grant 角色 TO 用户
    grant sa to admin
     
    /*********为角色设置口令**********/
    create role 名 identified by 密码
    create role accp identified by admin
     
     
     
  • 相关阅读:
    关于返回上一页功能
    Mybatis Update statement Date null
    SQLite reset password
    Bootstrap Validator使用特性,动态(Dynamic)添加的input的验证问题
    Eclipse使用Maven2的一次环境清理记录
    Server Tomcat v7.0 Server at localhost failed to start
    PowerShell一例
    Server Tomcat v7.0 Server at libra failed to start
    商标注册英语
    A glance for agile method
  • 原文地址:https://www.cnblogs.com/wenjl520/p/1445765.html
Copyright © 2011-2022 走看看