Protect and recover Oracle databases in a Windows environment
Stay organized with collections
Save and categorize content based on your preferences.
Before you begin
Before you can discover, protect, and mount Oracle databases in a Windows
environment, be sure to check the following:
Check the following settings on the database server:
The Oracle database and the Oracle Listener
are up and running (check Windows services).
Confirm that there is a tns entry with the name SID.
The file tnsnames.ora is under
%ORACLE_HOME%\network\admin
Verify tns entry is valid by running:
%ORACLE_HOME%\bin\tnsping <SID>
Check if the log mode is set to Archive Log mode:
sql> archive log list
If the database is in no-archive log mode, then return it to archive log mode:
sql> shutdown immediate;
sql> startup mount;
sql> alter database archivelog;
sql> alter database open;
Enable database change block tracking. With database BCT off,
incremental backup time is impacted. Change block tracking feature
is available in Oracle Enterprise Edition. Run a SQL query to
check that change block tracking is enabled. Run the query:
sqlplus / as sysdba
sql> select * from v$block_change_tracking;
To enable change block tracking:
sql> alter database enable block change tracking
using file '<Oracle home directory>\orcl.bct';
Back up an Oracle database in a Windows environment
To back up an Oracle database in a Windows environment, follow these steps:
Oracle 19c SQLPlus (sqlplus.exe) occasionally hangs on Windows when executing exit command (Doc ID 2820655.1).
This bug is specific to Windows. Oracle has confirmed that this issue occurs in SQLPlus versions 19.10, 19.11 and 19.12. Oracle provided these solutions:
Use SQL*Plus 21.1 or later (or)
Apply patch:31466370. This patch is available for 19.11 and 19.13.
Recover Oracle databases in a Windows environment manually using RMAN to a scheduled backup point if the archivelog is not protected through Backup and DR
To recover an entire Oracle database in a Windows environment:
Set the database environment and start the database in no-mount state
using the parameter file from the Backup and DR mounted volume
(for example for a mounted database volume to E:):
Catalog the datafile and the archive file folder
from the Backup and DR mounted volume to RMAN:
rman>run{catalogstartwith'E:\datafile' noprompt;catalog start with 'E:\archivelog'noprompt;}
Restore and recover the database:
rman> run
{
restore database;
recover database;
}
Open the database with reset log option:
rman> alter database open resetlogs;
Recover Oracle databases in a Windows environment manually using RMAN to a scheduled backup point with roll-forward of Backup and DR-protected archivelog
Mount the image from the source database server
to recover. Mount the backup snapshot from Backup and DR back to the Oracle
server as detailed in Mount an Oracle database as a standard mount.
Set the database environment and start the database
in no-mount state using the parameter file from the Backup and DR mounted volume.
In this example, the database backup image is mounted at: E:\ and
the protected archive log is mounted at: Z:.
Catalog the datafile and archivelog folder from Backup and DR mounted
database image and archive log image to RMAN:
```rmanrman>run{catalogstartwith'E:\datafile' noprompt;catalog start with 'E:\archivelog' noprompt;catalog start with 'Z:\archivelog'noprompt;}```
Restore and recover the database:
```rman
rman> run
{
restore database;
recover database;
}
```
For a specific point in time recovery run the recover command as follows:
```rman
rman> run
{
restore database;
recover database until time "to_date('<time stamp>','yyyymmddhh24mi')";
}
```
Open the database with reset log option:
```rman
rman> alter database open resetlogs;
```
The database is available for read and write.
Watch script to watch for database volumes being mounted
If you create an application-aware mount, then you can use a watch script to
show the volumes being mounted from Backup and DR, and the Oracle
processes running. Application-aware mounts are described in
Mounting an Oracle Database as a Virtual Application.
When performing an application-aware mount, you can use this watch script.
The script location must be: C:\Program Files\Backup and DR\scripts.
Scripts run on Windows hosts must be .bat or .vbs files.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[[["\u003cp\u003eBefore backing up Oracle databases in Windows, ensure the database and listener are running, a valid tns entry exists, and the database is in archive log mode.\u003c/p\u003e\n"],["\u003cp\u003eEnabling database change block tracking is recommended for Oracle Enterprise Edition to reduce incremental backup times.\u003c/p\u003e\n"],["\u003cp\u003eBackups on the windows environment rely on OS authentication and do not support database authentication.\u003c/p\u003e\n"],["\u003cp\u003eRecovering an Oracle database involves mounting a backup snapshot, setting the database environment, restoring the control file using RMAN, and then restoring and recovering the database.\u003c/p\u003e\n"],["\u003cp\u003eA watch script can monitor mounted volumes from Backup and DR and identify running Oracle processes during an application-aware mount.\u003c/p\u003e\n"]]],[],null,["# Protect and recover Oracle databases in a Windows environment\n\nBefore you begin\n----------------\n\nBefore you can discover, protect, and mount Oracle databases in a Windows\nenvironment, be sure to check the following:\n\n1. Check the following settings on the database server:\n\n 1. The Oracle database and the Oracle Listener\n are up and running (check Windows services).\n\n 2. Confirm that there is a tns entry with the name SID.\n The file tnsnames.ora is under\n\n %ORACLE_HOME%\\network\\admin\n\n 3. Verify tns entry is valid by running:\n\n %ORACLE_HOME%\\bin\\tnsping \u003cSID\u003e\n\n2. Check if the log mode is set to Archive Log mode:\n\n sql\u003e archive log list\n\n If the database is in no-archive log mode, then return it to archive log mode:\n **Note:** This will take down the database. \n\n sql\u003e shutdown immediate;\n sql\u003e startup mount;\n sql\u003e alter database archivelog;\n sql\u003e alter database open;\n\n3. Enable database change block tracking. With database BCT off,\n incremental backup time is impacted. Change block tracking feature\n is available in Oracle Enterprise Edition. Run a SQL query to\n check that change block tracking is enabled. Run the query:\n\n sqlplus / as sysdba\n sql\u003e select * from v$block_change_tracking;\n\nTo enable change block tracking: \n\n sql\u003e alter database enable block change tracking\n using file '\u003cOracle home directory\u003e\\orcl.bct';\n\nBack up an Oracle database in a Windows environment\n---------------------------------------------------\n\n| **Note:** Database authentication is not supported for Oracle in a Windows environment. OS authentication is fully supported.\n\nTo back up an Oracle database in a Windows environment, follow these steps:\n\n1. Set the [Application Details \\& Settings for Oracle Databases](/backup-disaster-recovery/docs/backup/app-details-settings-oracle).\n\n2. Apply a backup plan to protect the database.\n\n**Known issue**\n\nOracle 19c SQL*Plus (sqlplus.exe) occasionally hangs on Windows when executing exit command (Doc ID 2820655.1).\nThis bug is specific to Windows. Oracle has confirmed that this issue occurs in SQL*Plus versions 19.10, 19.11 and 19.12. Oracle provided these solutions:\n\n- Use SQL\\*Plus 21.1 or later (or)\n- Apply patch:31466370. This patch is available for 19.11 and 19.13.\n\nRecover Oracle databases in a Windows environment manually using RMAN to a scheduled backup point if the archivelog is not protected through Backup and DR\n----------------------------------------------------------------------------------------------------------------------------------------------------------\n\nTo recover an entire Oracle database in a Windows environment:\n\n1. Mount the database backup snapshot from Backup and DR\n back to the Oracle server as detailed in [Mount an Oracle database as a standard mount](/backup-disaster-recovery/docs/access-data/mount-oracle).\n\n2. Set the database environment and start the database in no-mount state\n using the parameter file from the Backup and DR mounted volume\n (for example for a mounted database volume to E:):\n\n sqlplus / as sysdba\n sql\u003e startup nomount pfile='E:\\\u003csid\u003e___backup.ora';\n\n3. Create spfile from pfile:\n\n sql\u003e create spfile='%ORACLE_HOME%\\database\\spfile\u003csid\u003e.ora'\n from pfile='E:\\\u003csid\u003e___backup.ora';\n\n4. Start the database with spfile in the `nomount` state:\n\n sql\u003e shutdown immediate;\n sql\u003e startup nomount;\n\n5. Restore the control file using RMAN from the Backup and DR mounted volume:\n\n rman target /\n rman\u003e restore controlfile from 'E:\\cf-D_\u003csid\u003e-id_\u003cid\u003e.ctl';\n\n6. Mount the database:\n\n rman\u003e alter database mount;\n\n7. Catalog the datafile and the archive file folder\n from the Backup and DR mounted volume to RMAN:\n\n rman\u003e run\n {\n catalog start with 'E:\\datafile' noprompt;\n catalog start with 'E:\\archivelog' noprompt;\n }\n\n8. Restore and recover the database:\n\n rman\u003e run\n {\n restore database;\n recover database;\n }\n\n9. Open the database with reset log option:\n\n rman\u003e alter database open resetlogs;\n\nRecover Oracle databases in a Windows environment manually using RMAN to a scheduled backup point with roll-forward of Backup and DR-protected archivelog\n---------------------------------------------------------------------------------------------------------------------------------------------------------\n\n1. Mount the image from the source database server\n to recover. Mount the backup snapshot from Backup and DR back to the Oracle\n server as detailed in [Mount an Oracle database as a standard mount](/backup-disaster-recovery/docs/access-data/mount-oracle).\n\n2. Set the database environment and start the database\n in no-mount state using the parameter file from the Backup and DR mounted volume.\n In this example, the database backup image is mounted at: E:\\\\ and\n the protected archive log is mounted at: Z:.\n\n sqlplus / as sysdba\n\n startup nomount pfile='E:\\\u003csid\u003e___backup.ora';\n\n3. Create spfile from pfile:\n\n sql\u003e create spfile='%ORACLE_HOME%\\database\\spfile\u003csid\u003e.ora' from\n pfile='E:\\\u003csid\u003e___backup.ora';\n\n4. Start the database with spfile in the nomount state:\n\n ```sql\n shutdown immediate;\n startup nomount;\n ```\n\n5. Restore the control file using RMAN from the Backup and DR mounted\n archive log image:\n\n ```rman\n rman target /\n rman\u003e restore controlfile from 'Z:\\cf-D_\u003csid\u003e-id_\u003cid\u003e.ctl';\n ```\n\n6. Mount the database:\n\n ```rman\n rman\u003e alter database mount;\n ```\n\n7. Catalog the datafile and archivelog folder from Backup and DR mounted\n database image and archive log image to RMAN:\n\n ```rman\n rman\u003e run\n {\n catalog start with 'E:\\datafile' noprompt;\n catalog start with 'E:\\archivelog' noprompt;\n catalog start with 'Z:\\archivelog' noprompt;\n }\n ```\n\n8. Restore and recover the database:\n\n ```rman\n rman\u003e run\n {\n restore database;\n recover database;\n }\n ```\n\n For a specific point in time recovery run the recover command as follows: \n\n ```rman\n rman\u003e run\n {\n restore database;\n recover database until time \"to_date('\u003ctime stamp\u003e','yyyymmddhh24mi')\";\n }\n ```\n\n9. Open the database with reset log option:\n\n ```rman\n rman\u003e alter database open resetlogs;\n ```\n\n The database is available for read and write.\n\n### Watch script to watch for database volumes being mounted\n\nIf you create an application-aware mount, then you can use a watch script to\nshow the volumes being mounted from Backup and DR, and the Oracle\nprocesses running. Application-aware mounts are described in\n[Mounting an Oracle Database as a Virtual Application](/backup-disaster-recovery/docs/access-data/mount-oracle-virtualdb).\n\nWhen performing an application-aware mount, you can use this watch script.\nThe script location must be: C:\\\\Program Files\\\\Backup and DR\\\\scripts.\nScripts run on Windows hosts must be .bat or .vbs files. \n\n ```Windows\n @echo off\n :loop\n echo. \u003e watchtemp\n echo ------------------ \u003e\u003e watchtemp\n echo Oracle Processes \u003e\u003e watchtemp\n echo ------------------ \u003e\u003e watchtemp\n tasklist /svc | findstr oracle \u003e\u003e watchtemp\n echo. \u003e\u003e watchtemp\n echo ------------------ \u003e\u003e watchtemp\n echo Backup and DR Mounts \u003e\u003e watchtemp\n echo ------------------ \u003e\u003e watchtemp\n wmic volume get label, name | findstr Backup and DR \u003e\u003e watchtemp\n echo. \u003e\u003e watchtemp\n cls\n type watchtemp\n timeout 2 \u003e null\n goto loop\n ```\n\nWhich produces output like this: \n\n Oracle Processes\n ------------------\n oracle.exe 1492 OracleServiceORCL\n oracle.exe 3768 OracleServiceTestDB\n oracle.exe 872 OracleServiceTestDB2\n ------------------\n Backup and DR Mounts\n ------------------\n Backup and DR-Backup-ORCL D:\\mount_1"]]