If you want to modify your mailbox password, do not think too much, change the good, as long as the password to remember to change. But the database password is not the same, the database will inevitably have the corresponding application or other users. If the hasty modification will inevitably cause problems for other people or users.
Therefore, before you fix the password, you must make sure that this modification does not cause unacceptable problems, such as the application cannot connect to the service for a long time, and other people cannot connect to the database using the old password.
Consider the scenario of caching mechanism services, which is the best-looking scenario to minimize the time of a service outage:
1. Modify the configuration file.
Because it is a caching mechanism service, changing the configuration file does not have an impact on the service that is currently running, so choose a time to modify it. However, it is important to note that this app service is a service that is set up for automatic restart.
Determine in advance where the configuration files are located, different deployment profiles are different, the following are the two different locations I encountered:
Java Application Services File: Webapps/.../web-inf/spring.xml
Java Application Services File:webapps/.../web-inf/classes/com/sy/mngsys/common/resources/syconfig.properties
2. Notify other users and suspend the service.
Notifies users of the service and other users of the database to discontinue use. Then stop the service with the following command.
tomcat/bin/shutdown.sh
This step must precede the 3rd step, because once the database password is modified, the original service is still running, it will cause the account in the Oracle database is locked, the connection will be error ORA-28000.
If this behavior occurs, the workaround is unlock
3. Modify the database password.
Access to DBA mode under Oracle User
$ Sqlplus '/as Sysdba '
Alter user mandola identified by "Mandola#good";
If the account is locked in DBA mode execute the following statement to unlock:
Alter user Mandola account unlock
4. Start the service.
After you confirm that the above modifications are complete, and the database connection is normal, you can start the service
tomcat/bin/start.sh
Of course, don't forget to check that the service is working properly at the end.
Oracle Database Change Password ideas