6

We have a development Oracle 12c database and the SYSTEM user account is locked out for one of the SID's (works fine with another SID). When I try to do a conn SID / as sysdba it keeps connecting me to another SID that's idle. So I cannot even get to the SID that has the locked account.

Any ideas on how to connect to the SID that has the locked SYSTEM account so I can unlock and reset the password?

Thanks.

  • Sorry. This is on a Windows system. When I do connect as 'sqlplus / as sysdba' it default logs me into the other instance. I'll look at trying to force the environment to push me to the other instance and see if that works. – Valien Aug 7 '14 at 17:39
  • 1
    Is this a pluggable database ? If not, you just need to set your environment correct. There's no "default" SID, there often is a chaos of environment variables and related stuff, but as stated, in a chaos way. Often the first database installed, but not necessarily. So, question : how do you set your environment ? – tvCa Jan 26 '15 at 13:15
3

Ok, figured it out with the comments from my original question. Steps I used to connect to the correct instance and get the account unlocked and password reset.

  1. Connect to the correct SID/instance off the top. Example:

    c:\sqlplus SYSTEM/<Password>@<service name> --> this can be found in the tnsnames.ora file

  2. I then verified I was in the correct instance:

    SQL>select instance_name, status from v$instance;

  3. From there I was able to unlock the user and reset their password:

    SQL>alter user <USERNAME> account UNLOCK;

    SQL>alter user <USERNAME> identified by <PASSWORD>;

My problem intially was that I was just trying to connect using sqlplus / as sysdba and it wasn't putting me in the correct instance.

Hopefully this will be helpful to other Oracle devs and rookie DBA's (I'm a rookie in this since we have a dev instance for some client work and it rarely gets touched).

  • 2
    set ORACLE_SID=<fancy instance> then sqlplus / as sysdba, would do the job as well – Munchi Aug 11 '14 at 12:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.