Databases 5 min read

How to Quickly Recover a Corrupted Oracle 11g Database on Windows

A step‑by‑step guide shows how to reinstall Oracle 11g, adjust environment variables, copy essential files, recreate Oracle services, and verify the database connection to restore a Windows‑based Oracle database that was damaged by antivirus deletions.

ITPUB
ITPUB
ITPUB
How to Quickly Recover a Corrupted Oracle 11g Database on Windows

Background

A client called reporting that their Oracle 11g database on a Windows server was unusable after an antivirus program mistakenly deleted critical Oracle files. The data files appeared intact, but the database would not start. The goal was to restore the database quickly before the holiday break.

Solution Steps

Install the software – The client reinstalled Oracle 11g in a new directory to avoid the corrupted files. Original path: d:\app\erp\product\11.2.0\dbhome_1. New path: d:\app\erp\product\11.2.0\dbhome_2. Installation completed in about ten minutes.

Set environment variables

ORACLE_SID=ora11g

ORACLE_BASE=d:\app\erp\product\

ORACLE_HOME=d:\app\erp\product\11.2.0\dbhome_2

Update the system PATH to replace the old bin directory d:\app\erp\product\11.2.0\dbhome_1\bin with the new one d:\app\erp\product\11.2.0\dbhome_2\bin.

Copy necessary files

cp d:\app\erp\product\11.2.0\dbhome_1\database\*.* d:\app\erp\product\11.2.0\dbhome_2\database\
cp d:\app\erp\product\11.2.0\dbhome_1
etwork\*.* d:\app\erp\product\11.2.0\dbhome_2
etwork\

Log out and log back in – After changing environment variables, the OS user must log out and log back in for the changes to take effect.

Delete the old Oracle service oradim -delete -srvc oracleserviceora11g Create a new Oracle service

oradim -new -srvc oracleserviceora11g -sid ora11g -startmode auto -shutmode immediate -srvcstart demande -spfile

Start the new service

net start oracleserviceora11g
lsnrctl start

Test database login sqlplus test/test@ora11g Successful login confirms the database is operational.

Remove the old Oracle software directory – Delete the original dbhome_1 folder to free up disk space.

The entire recovery process took roughly half an hour, and the client’s database was back online and functional.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

SQLWindowsOracleDatabase RecoveryOracle11g
ITPUB
Written by

ITPUB

Official ITPUB account sharing technical insights, community news, and exciting events.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.