oracle 学习笔记

修改密码口令:passw
文件操作命令:start d:\aa.sql;edit d:\aa.sql;
截取屏幕的东西:spool d:\aa.sql ;+ spool off;

bonus dept emp salgrade

创建用户: create user xiaoming identified by lingsui;

grant connect to lingsui;
grant resource to lingsui;
conn scott/lingsui
授权给用户lingsui查询
grant select on emp to lingsui;
conn lingsui/lingsui;
select * from scott.emp;
把emp这张表所有的权限赋给lingsui
grant all on emp to lingsui;

收回权限
scott希望收回lingsui对emp表的查询权限
revoke select on emp from lingsui
//对权限的维护
希望lingsui用户可以去查询scott的emp表/同时希望lingsui可以吧这权限

给别人(xiaohong)
--如果是对象权限,就加入with grant option
grant select on emp to lingsui with grant option;

conn lingsui/lingsui;
grant select on scott.emp to xiaohong;
--如果是系统权限
system给lingsui权限时;
grant connect to lingsui with admin option;
?如果scott把lingsui对emp表的查询权限回收了,那么xiaohong会怎么样
株连了 xiaohong的权限也回收了


oracle 用户管理
指定scott这个用户最多只能尝试3次登陆,锁定时间为2天,让我么看看怎

么实现。
create profile lock_account limit failed_login_attempts 3

password_lock_time 2;
--指定用户
alter user scott profile lock_account;
给账户(用户)解锁
alert user scott account unlock

给用户scott创建一个profile文件,要求该用户每隔10天要修改自家的登陆

密码,宽限期为2天,看看怎么做
create profile myprofile limit password_life_time 10

password_grace_time2
指定用户
alter user lingsui profile myprofile


口令历史
概述:不能修改成以前密码
create profile password_history limit password_life_time 10

password_grace_time 2 password_reuse_time 10
password_reuse_time //指定口令可重用时间即10天后就可以重用

删除profile
drop profile password_history [cascade];
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值