加锁: alter user 用户名 account lock
解锁: alter user 用户名 account unlock 举个例子: 比如一不小心,把系统SYSTEM用户给锁定了,请按如下操作方式解锁. SQL> conn sys/as sysdba;
请输入口令: ******
已连接。
SQL> select username,account_status from dba_users where username='SYSTE USERNAME ACCOUNT_STATUS
------------------------------ --------------------------------
SYSTEM LOCKED SQL>
SQL> alter user "SYSTEM" ACCOUNT UNLOCK; 用户已更改。 SQL> select username,account_status from dba_users where username='SYST USERNAME ACCOUNT_STATUS
------------------------------ --------------------------------
SYSTEM OPEN SQL> conn system/system;
已连接。
SQL> show user;
USER 为"SYSTEM"
|