`

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];
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics