Oracle recovery after system reinstallation

Source: Internet
Author: User

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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.