zoukankan      html  css  js  c++  java
  • oracle之路(一)user管理;

    1 oracle用户

    Oracle安装会自动的生成sys用户和system用户:

    (1)  sys用户是超级用户,具有最高权限,具有sysdba角色,有createdatabase的权限,该用户默认的密码是change_on_install

    (2)  system用户是管理操作员,权限也很大。具有sysoper角色,没有create database的权限,默认的密码是manager

    (3)  一般讲,对数据库维护,使用system用户登录就可以拉

    也就是说sys和system这两个用户最大的区别是在于有没有create database的权限。

    2 创建用户

    	create user emp
    	identified by a123456;
    当然你可以指定的默认的表空间和临时表空间

    	create uses emp
    	identified by a123456
    	default tablespace users
    	temporary tablespace temp;
    (似乎给定了User表空间 空间中新建有用户就有了DBA的权限。至少在我的本机了是这样的。)

    如果没有去指定表空间,那么如要去链接数据库就要去授权。

    	grant connect to emp;
    	grant create table to emp;//创建表权限
    	grant select on student to emp;//查询表权限
    	grant update on student to emp;//更新表权限
    	grant all on emp to emp;//授权编辑/删除/查询的权限
    


    收回权限:

    	revoke select on student from emp;
    
    如果希望用户能够将权限下放:

    如果是对象权限:

    	grant select on student to emp with grant option
    如果是系统权限:

    	grant select on student to emp with admin option






  • 相关阅读:
    网站结构之扁平结构与树形结构的区分
    如何提高网站的访问速度
    CSS透明度大汇总
    Microsoft.AlphaImageLoader滤镜讲解
    浏览器的渲染原理简介
    ACM思维题训练 Section A
    CF--思维练习--CodeForces
    CF--思维练习--CodeForces
    CF--思维练习--CodeForces
    CF思维联系--CodeForces
  • 原文地址:https://www.cnblogs.com/yangzhi/p/3576548.html
Copyright © 2011-2022 走看看