How to recover or change Oracle sysdba password [closed]

♀尐吖头ヾ 提交于 2019-12-20 12:27:06

问题


We are working with an oracle database in which the person that set it up is "long gone" and thus do not know the sysdba password, but need it. We have root access to the box (its on linux). Is there any way to recover or change the sys passwords?


回答1:


Have you tried logging into Linux as your installed Oracle user then

sqlplus "/ as sysdba"

When you log in you'll be able to change your password.

alter user sys identified by <new password>;

Good luck :)




回答2:


You can connect to the database locally using the combination of environment variables:

  • ORACLE_HOME
  • ORACLE_SID .

Depending on your OS:

Unix/Linux:

export ORACLE_HOME=<oracle_home_directory_till_db_home>
export PATH=$PATH:$ORACLE_HOME/bin
export ORACLE_SID=<your_oracle_sid>
SQLPLUS / AS SYSDBA

Windows

set ORACLE_HOME=<oracle_home_path_till_db_home>
set PATH=%PATH%||%ORACLE_HOME%\bin
set ORACLE_SID=<your_oracle_sid>
SQLPLUS / AS SYSDBA

Once connected, you could then alter the user to modify the password:

ALTER USER username IDENTIFIED BY password;


来源:https://stackoverflow.com/questions/52239/how-to-recover-or-change-oracle-sysdba-password

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!