Forgot Oracle username and password, how to retrieve?

前端 未结 5 1664
暗喜
暗喜 2020-12-28 20:21

I have forgotten my Oracle username and password and hence not able to use it. My Oracle version is 11.2.0.1.0(11g). I consulted Internet. They asked me to execute commands

相关标签:
5条回答
  • 2020-12-28 20:55

    The usernames are shown in the dba_users's username column, there is a script you can run called:

    alter user username identified by password
    

    You can get more information here - https://community.oracle.com/thread/632617?tstart=0

    0 讨论(0)
  • 2020-12-28 21:09
    1. Open your SQL command line and type the following:

      SQL> connect / as sysdba
      
    2. Once connected,you can enter the following query to get details of username and password:

      SQL> select username,password from dba_users;
      
    3. This will list down the usernames,but passwords would not be visible.But you can identify the particular username and then change the password for that user. For changing the password,use the below query:

      SQL> alter user username identified by password;
      
    4. Here username is the name of user whose password you want to change and password is the new password.

    0 讨论(0)
  • 2020-12-28 21:14

    Go to SQL command line:- type:

    sql>connect / as sysdba;
    

    then type:

    sql>desc dba_users;
    

    then type:

    sql>select username,password from dba_users;
    

    If sysdba doesn't work then try connecting with username:scott and password: Tiger

    You will be able to see all users with passwords. Probably you might find your's. Hope this helps

    0 讨论(0)
  • 2020-12-28 21:18
    1. Open Command Prompt/Terminal and type:

      sqlplus / as SYSDBA

    2. SQL prompt will turn up. Now type:

      ALTER USER existing_account_name IDENTIFIED BY new_password ACCOUNT UNLOCK;

    3. Voila! You've unlocked your account.
    0 讨论(0)
  • 2020-12-28 21:20

    if you are on Windows

    1. Start the Oracle service if it is not started (most probably it starts automatically when Windows starts)
    2. Start CMD.exe
    3. in the cmd (black window) type: sqlplus / as sysdba

    Now you are logged with SYS user and you can do anything you want (query DBA_USERS to find out your username, or change any user password). You can not see the old password, you can only change it.

    0 讨论(0)
提交回复
热议问题