How to restore the ORACLE database after reinstalling the system

Source: Internet
Author: User

We often use the ORACLE database restoration method. The following describes how to restore the ORACLE database after the system is reinstalled. We hope this will help you learn about ORACLE Database restoration.

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.

First:
First, back up the data file in the database (X: \ oracle \ oradata) and rename it (otherwise, the sid will be prompted when the database is installed ). Reinstall the database. Of course, the database name is the name you want to restore. After the installation is complete, open the control panel and stop oracle services. Rename the new file (X: \ oracle \ oradata) and restore the file name in the original directory. Restart the oracle service and listener. Using sys/as dba to log on to the database may prompt that the permission is not ora-01031 enough) Modify sqlnet under the X: \ oracle \ ora92 \ network \ admin) folder. add SQLNET. AUTHENTICATION_SERVICES = (ETS) to add permissions. After logging in, the system prompts that the table cannot be opened. Open the common page and execute the command alert database open; then refresh the table and find that the original table can be opened. Recovery successful. Use the common users of the original database. Everything is normal. So far, the success is achieved.

Second:

1. First, rename the original ORACLE folder. The original path is D:/oracle. I am changing it to D:/oracle_old. I used the ORACLE 9I installation CD to find ORACLE and install it 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 a delete command in the dos environment: oradim-delete-sid mm. mm is the instance created during oracle creation. We recommend that you execute this command and restart the machine, after the instance is restarted, you can 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.

Note: The following file a and initialization parameter file INIT must be available for recovery. ORA B. All data files. dbf c, online logs of all redo log files, archived logs) redo d, crtl e, and internal password files
 

Three methods for querying duplicate records in Oracle

Lock oracle records when querying records

Learn about Oracle recovery Structure

Introduction to Oracle Process Structure

The section of the Oracle database

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.