oracle 锁用户和解锁。

1 批量锁用户--数据库迁移后不允许在连接了

SELECT 'alter user '||username||' account lock;' from dba_users WHERE username NOT IN ('SYS','UUFS_2020')
AND account_status='OPEN';

 

alter user wjxyxg account lock;

2   解锁

alter user scott account unlock;

 

posted @ 2022-04-11 10:22  老街巷口熟睡的猫  阅读(72)  评论(0编辑  收藏  举报