日期:2014-05-16  浏览次数:20435 次

Profile管理用户口令及解锁user

使用profile管理用户口令

账户锁定

1)上锁

Sql> create  profile    lock_account  limitfailed_login_attempts   3   password_lock_time  1;

----创建一个profile文件名为lock_account ,3次登录失败,用户被锁定,锁定时间是1天

Sql> alter   user  xiaoming  profile  lock_account;

----profile文件给予某个用户

2)解锁

Sql>alter   user  xiaoming   account  unlock;

3)终止口令

删除profile

Sql> drop profile password_history cascade;

注意:profile 的功能主要作用是,控制用户资源以及密码,对系统安全很重要。

 

解锁、杀掉锁表进程 

1、查看锁

select t2.username,t2.sid,t2.serial#,t2.logon_time

from v$locked_object t1,v$session t2

where t1.session_id=t2.sid ;

 

2、Kill
--alter system kill session 'sid,serial#';
alter system kill session '151,14678';