oracle----------用户管理

1.数据库概述:
小型数据库  :foxbase , access
(百人类,千元,安全性要求不高)


中型数据库 :mysql ,sql server  ,informix
(日访问量,5000~15000,成本万元内,商务网站)


大型数据库 :sybase ,oracle ,db2
(海量负载,万级别,安全性很高)


2.虚拟光驱。DAEMON


3.oracle ,
--------------------------------------------------------
设置:set linesize 120;
    set pagesize 10;
创建用户:create user root identified by root;
连接用户:conn root/root;
删除用户:drop user root (cascade);
授权:grant connect to root ;(登录)
   grant resource to root;(建立表)
连接授权:grant connect to root with admin option;    
--------------------------------------------------------
建立表:create table test(userId varchar2(30), userName varchar2(30));
查询表:select * from test;
 select * from scoot.emp;
查询表结构:desc test;
--------------------------------------------------------
对象授权:
grant select on emp to root;(查询)
grant update on emp to root;(修改)
grant all  on emp to root;(所有权限);
grant select on emp to root with grant option;(授权传递)
grant select on scott.emp to test;(非本用户授权)
revoke select on emp from root;(收回权限,查询)
--------------------------------------------------------
权限维护:
      传递权限:


权限:
------->系统权限:用户对数据库的相关权限(create session )
------->对象权限:用户对其他用户的数据对象操作的权限。




------>系统权限
数据库对象:表,触发器,视图,函数,存储过程,包,类型,工作,库,序列,角色,表空间。
权限:系统权限,140多种,对象权限,25个。
角色两种:预定义角色,自定义角色
预定义:connect  7种权限(create session ,...)
  dba  
        resource 允许用户在任何表空间建表


-------->对象权限
grant (insert ,select,update ,delete,all,...)
revoke(insert ,select,update ,delete all.....)
------------------------------------------------------------------
oracle:
(1)账户锁定:
创建profile文件,
      create profile num limit  failed_login_attempts 3 password_lock_time 2;
分配profile文件
alter user test profile num;
解锁:
alter user test account unlock;
删除配置文件:
drop profile num (cascade);
(2)密码有限时间
终止口令;
创建一个profile 文件,要求用户每隔10天修改登录密码,宽限期2天。
创建Profile文件;
create profile activedays limit password_life_time 10 password_grace_time 2;
分配profile文件
alter user test profile activedays;
 















评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值