How to restore the Oracle database after the system is reinstalled

Source: Internet
Author: User

[Guide] Any software may be re-installed intentionally or unintentionally. How can I restore the database after oracle is reinstalled? This happens when you have no intention! 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.
Any software may be re-installed intentionally or unintentionally. For example, how can I restore the database after oracle is reinstalled? This happens when you have no intention! 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. Logging into the database with sys/As DBA may prompt that the sqlnet under the (X: \ oracle \ ora92 \ Network \ ADMIN) folder is modified with insufficient permissions (ora-01031. 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. 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 now use D:/oracle. Change D:/oracle_new. Then change D:/oracle_old to D:/oracle. In theory, Oracle is restored physically. However, we found that Oracle listeners cannot be started yet.ProgramAnd service programs. 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 listening program uses the computer name to identify the address, 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, all redo log files (online logs, archived logs) Redo D, all control files crtl E, and internal password files

By the Web, http://soft.chinabyte.com/database/382/12103382.shtml

 

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.