Resolution of a failed connection for oracle users

  • 2020-08-22 22:58:53
  • OfStack

After installing Oracle11g, I want to open the built-in SQL Plus to learn, and then use sys users to connect to the database according to the prompts, but I got an error several times:
error: the account is locked

There are several possible reasons.

1. Tried several times to log in but failed (the password may be incorrect);

2. This user is manually locked by the administrator;

3. User password expires, password is not changed on time, etc.

It seems that the user scott must be unable to log in. Then I tried to log in with the user system. I remember that when Installing Oracle 11g, I was prompted to enter the password. As you can see, system of oracle 11g is not the default password, but is set at the time of installation.

After logging in with system, execute the following command:
SQL > alter user scott account unlock;
The user has changed.

This completes the unlocking operation. Next, you can reset the password for scott.
Change scott's login password:
SQL > alter user scott identified by tiger;
The user has changed.

Now that you're done, login with scott and tiger!
SQL > conn scott/tiger
The connected.

Related articles: