This is a sophomore writing in the QQ space in an article, I remember that the problem took me the whole day to fix it, so experienced quite deep, so at that time deliberately recorded the process of the settlement, and today suddenly have the interest to find out a few college writing in the spaces in the article and share with you, In case something like that happened to me, it would take a lot of time, and the following is the full contents of the record:
Today login with the user Scott landed Oracle, edit the table, found no corresponding permissions, so want to log in to SYS, the DBA role as a DBA to grant Scott, but the password can not remember, Oracle database security is very high, I think it can't be found back, Then after a few hours, and finally rediscover, the method is as follows:
Close all service items related to the Oracle database.
Open cmd, enter orapwd file= file name password= user password entried=entries.
The file name contains the full path name, and if not specified, ORACLE places it under $oracle_home/dbs (under Unix) or $oracle_home/database (NT).
User password finally begins with the English letter, do not take Chinese characters
Ntries represents the maximum number of super users allowed. This is an optional one. The first two must be specified. It is generally set to be larger than the actual need to avoid enough.
After success, restart Oracle, login sys and password, remember the password must be followed by as SYSDBA, I am open PL/SQL command window with conn sys/password as SYSDBA login!
I then successfully logged in and delegated the DBA's maximum authority to the Scott user so that I could have edit permissions on that table (you can actually grant Scott the appropriate permissions for the table operation, which is too large for the DBA and generally unsafe).
Recover DBA account password for Oracle database