Oracle server operating system down, database recovery

Source: Internet
Author: User

The operating system where the database is located has crashed and the database system has been restored.

1) ensure that all files (installation files, data files, and log files) in the database are in one partition, and all logs and files related to Oracle are not damaged. The system partition does not contain any database files.
2) When the operating system crashes, restore the database as follows:

1) based on Windows
The database runs on the d disk, and the operating system is installed on the C disk. The E disk has enough space to move or reinstall oracle.
1) directly install the operating system to drive C
2) Rename the original oracle installation folder,
For example, change D: \ ORACLE to D: \ ORACLE_OLD.
3) reinstall oracle on disk D. The path and installation method are the same as those of the original installation. Ensure that oracle can be started properly (instance, listener)
Disable all oracle services and listening, and restart the system.
4) Rename the oracle folder you just installed and the original folder.
Change D: \ ORACLE to D: \ ORACLE_NEW
Change D: \ ORACLE_OLD to D: \ ORACLE
5) Run oradim in cmd to delete the original Instance configuration and restart the system:
Oradim-delete-sid orcl
6) create a new instance in cmd and start the database with the original parameter file
Oradim-new-sid orcl-startmode a-pfile 'd: \ oracle \ admin \ mm \ pfile \ initorcl. ora'

2) Based on linux
All files in the database are in the/u01 partition, and the operating system is in another partition.
1) install the operating system. During partitioning, select the partition except/u01 for formatting and installation.
2) After the operating system is installed, mount the \ u01 Partition
Mkdir/u01
Mount-t ext3/dev/sda2/u01 (check whether the device name of/u01 is/dev/sda2, fdisk-l)
Vim/etc/fstab
# Add the following content to the end of the file
/Dev/sda2/u01 ext3 defaults 1 2
3) install the oracle software according to the original installation method. Note that the installation path cannot be the same as the original one (You may only need to create Oracle-related system users and environment variables without installing the software)
4) use the original pfile to start the database startup pfile = '/u01/app/oracle/product/11.2.0/db_1/dbs/initorcl. ora ';
5) Delete the newly created oracle Installation Software and change the oracle environment parameter to the original parameter (this step is not required if you do not need to install the database software)

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.