When installing Oracle 9i, I forgot the password of the database administrator I just changed, and did not reinstall it. It was too troublesome. After trying for a long time, I finally succeeded in the modification.
1. Run it to the C root directory.
2. Enter: Set oracle_sid = your SID Name.
3. Input: sqlplus/nolog
4. Input: connect/As sysdba
5. Input: Alert user SYS identified by sys
6. Input: Alert user system identified by System
The password is the initial password of the Oracle database. For example:
Log on to the Enterprise Manager for query, analysis, and execution:
Exec sp_password null, 'your new password', 'sa'
If you install SQL Server under NT (including 2000), you can do this:
Directly open the "query analyzer" (note that it is not in the "Enterprise Manager", you can chooseProgramIf no isqlw.exe is found, enter "isqlw.exe" in "run );
Select "Windows Authentication". You do not need to enter the password. As long as you are the system administrator or domain administrator of your local computer, you will be the administrator of SQL Server;
In the query analyzer window, enter the following statement to change the SA password:
Sp_password null, \ 'OK \', \ 'sa \'
After running, the SA password changes to "OK"
The sp_password stored procedure is used to change the logon password of SQL Server;
Syntax format:
Sp_password [[@ old =] \ 'old _ password \ ',]
{[@ New =] \ 'new _ password \'}
[, [@ Loginame =] \ 'login \ ']
Parameter description
[@ Old =] \ 'old _ password \ ': old password;
[@ New =] \ 'new _ password \ ': the new password to be specified
[@ Loginame =] \ 'login \ ': user to be specified
Return Value: 0 (successful) or 1 (failed)
The key principle of the above method is to connect to SQL Server from the "query analyzer" with "Windows Authentication". As long as you are the system administrator or domain administrator of the local machine, it will automatically become the administrator of SQL Server.