Step 1: Shut down the database.
When the database is shut down, the database system mainly completes three tasks. First, the system will write the content in the redo log cache to the redo log file. Second, write the modified data in the high-speed cache of the database to the data file (data changes are often stored in the high-speed cache first, rather than directly written into the data file ). Third, close all data files and redo log files after the preceding two tasks are completed. At this time, the user has not been able to connect to the database after the three operations are completed.
Step 2: uninstall the database.
Shutting down the database only involves operations on log files and data files, but does not involve control files. When the database is uninstalling the database, the control file will be closed. The routine can be detached only after the database is shut down. Note that the control file plays a vital role in normal database startup. If the control file cannot be properly closed, it will easily cause a control file error, resulting in a database startup exception. Therefore, when shutting down the database, make sure that the control file is properly closed. At the same time, it is best to back up the control file independently for emergency needs.
Step 3: Terminate the routine.
In the termination routine step, all background processes and service processes will be terminated, and the SGA zone allocated to the memory will be recycled. That is to say, after this step is completed, the database system will release the control of memory. Then the database is actually shut down.