zoukankan      html  css  js  c++  java
  • Oracle 用户管理(一)

    1     创建用户
        create user @username identified by @password
        比如:create user aobama identified by future
        创建了一个username为“aobama”的用户,该用户的password是“future”。
        注意:Oracle中创建用户须要管理员(DBA)权限。并且用户的password必须以字母开头。



    2    改动用户password
        a. 改动当前用户的password
           sql> password username
        b. 改动其它用户(非当前用户)的password
           sql> alter user username identified by 新password
           比如:alter user aobama identified by benladeng
           注意:改动非当前用户的password时须要管理员权限

    3    删除用户
        sql> drop user username [cascade]
        注意:当前用户不能删除自己本身。

    假设删除一个已经创建了表的用户,则须要加參数[cascade]

    4    给某个用户赋予登陆数据库的权限
        sql> grant connect to username
        比如: grant connect to aobama

    5    给一个用户赋予resource 权限
        sql> grant resource to username

    6    给某个用户授权,使其可以訪问一张表
        sql> grant select on 表名 to username
        比如:grant select on emp to benladeng
        select * from aobama.emp
        
    7    收回给某个用户赋予的权限
        sql> revoke select on emp from benladeng
        注意:仅仅有赋予权限的人才干收回权限。

    即谁赋予,谁收回.(解铃还须系铃人)
        
    8    给某个用户赋予某个权限,而且使这个用户能够将此权限赋予其它人
        sql> grant select on 表名 to username with grant option
        比如: grant select on emp to aobama with grant option
        此时用户aobama不但有了查询emp表的权限,并且他还具有将这个权限赋予其它人的资格

  • 相关阅读:
    ENVI【遥感图像预处理之图像的几何校正】
    ENVI数据显示操作【Tools菜单操作1】
    ENVI软件操作【数据显示操作——Overlay菜单操作】
    ENVI软件操作之【数据的显示操作】
    ADO.NET操作数据库(一)
    ASP.Net之数据绑定
    动态网页的建立
    VS2010安装异常中断后无法安装的解决方法(安装时发生严重错误)
    linux vi 删除多行的方法
    简单实现异步编程promise模式
  • 原文地址:https://www.cnblogs.com/yjbjingcha/p/6928784.html
Copyright © 2011-2022 走看看