oracle常用SQL记录

database

select name,lcount from sys.user$

2、查看用户是否被锁

select username,account_status,lock_date from dba_users;

3、查看锁定账户登陆失败次数配置

  select * from dba_profiles  where resource_name  like "FAILED_LOGIN_ATTEMPTS%";

4、修改失败锁定限制次数  

 alter profile default limit FAILED_LOGIN_ATTEMPTS unlimited;

5、解锁用户
alter user test account unlock;

6、查询已连接用户信息    
SELECT
 osuser,
 A .username,
 cpu_time / executions / 1000000 || "s",
 sql_fulltext,
 machine
FROM
 v$session A,
 v$sqlarea b
WHERE
 A .sql_address = b.address
ORDER BY
 cpu_time / executions DESC;

以上是 oracle常用SQL记录 的全部内容, 来源链接: utcz.com/z/532551.html

回到顶部