This topic describes how to handle ERROR 3118, where a user is locked in the Oracle mode of OceanBase Database.
Symptom
If you enter an incorrect password multiple times when you log in to the Oracle tenant as the ny user, the system reports an error indicating that the user is locked.
[admin@k08j13249.eu95sqa /home/admin]
$obclient -hxx.xx.xx.xx -P2881 -uny@Oracle -p -A
Enter password:
ERROR 3118 (HY000): User locked
Possible causes
OceanBase Database provides a mechanism to handle login failures. If a user fails to log in to OceanBase Database multiple times, OceanBase Database locks the user to prevent malicious password attacks. This improves the security of OceanBase Database. For more information about how to handle login failures, see Handle login failures.
Troubleshooting procedure
Take the following steps to unlock the user and log in again.
Log in to the tenant as the administrator. The default administrator user of an Oracle tenant is
SYS.Note
If you log in as the administrator, you can directly unlock users. If you log in as a regular user, you must have the global
ALTER USERprivilege to unlock users.[admin@k08j13249.eu95sqa /home/admin] $obclient -hxx.xx.xx.1 -P2881 -usys@Oracle -p -A Enter password: Welcome to the OceanBase. Commands end with ; or \g. Your OceanBase connection id is 3221584177 Server version: OceanBase 4.0.0.0 (r100000172022101218-6ab80a3950710941946c004d805fcfded7a4aa2c) (Built Oct 12 2022 18:43:39) Copyright (c) 2000, 2018, OceanBase Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.Unlock the
nyuser.obclient [SYS]> ALTER USER ny ACCOUNT UNLOCK ; Query OK, 0 rows affectedLog in to the
Oracletenant as thenyuser again.[admin@k08j13249.eu95sqa /home/admin] $obclient -hxx.xx.xx.1 -P2881 -uny@Oracle -p -A Enter password: Welcome to the OceanBase. Commands end with ; or \g. Your OceanBase connection id is 3221584177 Server version: OceanBase 4.0.0.0 (r100000172022101218-6ab80a3950710941946c004d805fcfded7a4aa2c) (Built Oct 12 2022 18:43:39) Copyright (c) 2000, 2018, OceanBase Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.