My computer suddenly crashes and I have to reinstall the system. However, my oracle is installed on the d drive, and all the files are still there. I believe it will be restored until the work is completed, I started to complete my database. It took me two days to finally recover and celebrate it. At the same time, I also summarized that I hope my friends who have encountered the same problem can solve this problem quickly.
1. First, rename the original Oracle folder. The original path is D:/oracle. I am changing it to D:/oracle_old. Find the Oracle installation CD (I used Oracle 9i) and install oracle in the original directory. This makes it easier to restore it, mainly because the Registry content does not need to be modified.
2. After the installation is complete, there is another oracle available in the system. At this time, we need to recover the original files and data. Step 1: First close all Oracle projects that have been started and close them one by one in the "service. Then, rename the installation directory. I am using D:/oracle. Change to D:/oracle_new. Change D:/oracle_old to D:/oracle.
In theory, Oracle is restored physically. However, we found that Oracle listeners and service programs cannot be started yet. We also need to solve it logically.
3. Execute the DELETE command in the DOS environment: oradim-delete-Sid mm, where mm is the instance created when oracle is created
We recommend that you execute this command and restart the machine to create an instance with the same name as the original Instance. Of course, you can do it without restarting, but your instance name cannot be the same as the original one.
4. Execute the oradim-New-Sid mm-startmode A-pfile "D: \ oracle \ admin \ mm \ pfile \ initmm in the DOS environment. ora "creates a new instance, where" mm "is the name of the new database.
5. Start the service, open the database, and then log in with the previous user name and password.
Generally, the Oracle database listeners use computer names to identify addresses, rather than 127.0.0.1 or localhost. Therefore, if we use different computer names when installing the system (for example, I used wm_mm. After re-installation, we use wenming_mm). Then we have to modify the file listener. ora. You can change the related items in it.
You need to be patient and careful. There may be a small difference in one step that will lead to some strange error prompts. Sometimes you need to adopt strategies based on the error prompts. In short, the principle is, first, install an identical Oracle with the same installation directory and database name. This ensures that the registry does not need to be changed. Then, overwrite the physical file and re-instantiate the database. Then, open the database and go in.