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
     
     
     
  • 相关阅读:
    IntelliJ IDEA AndroidStudio SVN无法使用
    三极管封装
    STC等单片机一开机就停电模式烧写程序办法
    CC2541设置中断输入模式
    C# WinForm 多线程 应用程序退出的方法 结束子线程
    CorelDrawX8安装时提示已安装另一个版本
    Win10下Prolific USB-to-Serial Comm Port驱动提示不能使用
    Keil5创建GPIO
    SQL行列转置
    Excel复制粘贴假死
  • 原文地址:https://www.cnblogs.com/wenjl520/p/1445765.html
Copyright © 2011-2022 走看看