oracle用户管理

Oracle权限管理与Profile配置

希望小明用户可以查询emp表的同时,还可以把这种权限继续传给别人;
    >conn scott;
    >grant select on emp to xiaoming with grant option;
    >create user xiaohong identified by 1234;
    >grant create session to xiaohong;
    >conn xiaoming/1234;
    >grant select on scott.emp to xiaohong;
    --如果是系统权限
    system给xiaoming权限时:
    >conn system/Hr123456
    >grant connect to xiaoming with admin option;
    如果scott把xiaoming用户权限收回,那么xiaohong的权限是否也收回??
    >conn scott;
    >revoke select on scott.emp from xiaoming;
    >conn xiaohong/1000;
    >select * from scott.emp;
    答:xiaohong的权限也被收回
    使用profile管理用户口令
        创建profile文件(dba)
        >CREATE PROFILE lock_account LIMIT FAILED_LOGIN_ATTEMPTS 3 PASSWORD_LOCK_TIME 2;
        >alter user xiaoming profile lock_account;
        给用户解锁(dba)
        >alter user xiaoming account unlock;
        终止口令(dba)
        > alter profile lock_account limit password_life_time 10 password_grace_time 2;                --修改profile文件
        >CREATE PROFILE myprofile LIMIT PASSWORD_LIFE_TIME 10 PASSWORD_GRACE_TIME 2;
        >alter user xiaoming profile myprofile;
        删除profile
        >drop profile password_history[cascade]

转载于:https://my.oschina.net/869088067/blog/795587

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值