Oracle DB's - Windows

When Amanda is licensed and configured for Windows Oracle backup, Amanda uses the Oracle VSS writer to take the back up of Oracle data files, control files, and archive logs.

Requirements for Windows Oracle Backup and Restore

These instructions assume you have already installed and licensed the Amanda server, and the Windows client that hosts the Oracle server being backed up. There are a number of additional requirements:
  • The ZMC supports backup of Windows Oracle 12c, 18c and 19c.
  • Window servers must be upgraded to Service Pack 1 (SP1) or newer.
  • The Volume Shadow Copy Service must be enabled. Although the Volume Shadow Service is enabled by default, it may have been turned off after Windows installation. To ensure that it is running:
1. Right-click the My Computer icon and choose Manage from the popup menu.
2. Expand the Services and Applications tree and locate the Volume Shadow Copy Service.
3. If it is not started, do so.
4. If necessary, change the General Properties to make the Start-up. Select Automatic rather than Manual.
  • The Zmanda Windows Client must be installed on the Oracle server as described here.
  • For backup in NOARCHIVELOGMODE, databases must be Mounted and in read-only state. The database cannot be opened in NOARCHIVELOG mode, or the backup will fail. For backup in ARCHIVELOG mode, the database may be open and mounted. To determine the state of the database being backed up, enter ARCHIVE LOG LIST at the SQL Prompt, and look for the following output line:
Database log mode No Archive mode
Database log mode Archive mode

Log Mode Check:

  • Before initiating backups, determine the log mode of your Oracle database.
  • There are two modes: ARCHIVELOG and NOARCHIVELOG.
  • Backups work with open, mounted databases in READ-WRITE mode.
  • Backups work with closed, mounted databases in READ-only mode.
Checking Log Mode:
Execute the following SQL query in the SQL prompt:
Changing Database State:
Execute the following SQL query in the SQL prompt:
SQL> shutdown immediate;
SQL> startup mount;
Note: Use SQL> startup mount; to open the database. If you want the database to be closed but mounted, execute SQL> startup;.

Configuring Oracle Backups from the ZMC Backup What Page

Managing Oracle database backup and recovery requires an experienced Oracle administrator. Before you begin configuring Oracle backups, you may want to review the following links from Oracle regarding DB administration, backup and recovery concepts, and procedures:
Oracle database control files are backed up by Volume Shadow Copy Service snapshots. The backed-up files are referred to as Snapshot Control files. For example, a control file by the name of 'CONTROL01.CTL' is backed up under the name SNCFSID_NAME.ORA (SNCFDATA.ORA, if the database SID name is DATA). This snapshot control file is restored on the Oracle machine during restore, and is used for manual recovery.
Once you have ensured that the databases are in the proper state for the type of backup you are creating (i.e., ARCHIVELOGMODE or NOARCHIVELOGMODE, component-based or volume-based, etc.), create a dedicated backup set for each Windows Oracle server you intend to back up. On the Sources page, click on ADD SOURCE you are prompted to select what type of object you want to back up. Choose database and select the Oracle Windows from the source type. The following options are displayed:
Host Name
The name of the machine running the Oracle database server you intend to back up.
The name of the BackupSet for which you want to bound the Oracle Windows Source
Select any of the encryption type from Encryption Strategy dropdown to encrypt the backup image before transfer to the Amanda backup server
Select any of the compression type from Compression Strategy dropdown to compress backup images before transfer to the Amanda backup server.
Select dedup option to eliminating redundant data in a data. In the process of deduplication, extra copies of the same data are deleted, leaving only one copy to be stored
After you have set the options, click SAVE to add the Windows Oracle object to the backup set. You can then configure the backup set just as you would any other by setting the options on Backup Where, Backup How, and Backup When, etc.
Note that the Zmanda Agent for Windows Oracle backup process only the databases, logs, and control files. If you wish to protect other Oracle-related files (such as the installation directory), create a standard backup template on the Zmanda Windows Client to include these files.

Recovering Windows Oracle Databases using the ZMC and Oracle sqlplus

Recovering an Oracle database is a two-part process:
  1. 1.
    Use the ZMC to restore the backup to a temporary directory you create for this purpose.
  2. 2.
    Use Oracle's SQL Plus program to recover the database from the restored backup files.
Before starting the restore process, make sure that the Oracle server being restored is installed in the same location as the original backup source. Oracle databases, archive log, and control file locations should also match those on the original server.

Restoring the Backup Using the Zmanda Management Console

To restore a Windows Oracle database, follow these steps:
  1. 1.
    If necessary, install the Zmanda Windows Client software on the restore client (i.e. the Windows Oracle server being restored) as described here
  2. 2.
    Access the server with SQL Plus (you will need the connect string). Ensure that the database is in shutdown state. From the SQL> prompt, enter the following: SQL>shutdown immediate;
  3. 3.
    Access the ZMC console and open the Restore What page. Select all the host databases and log files for restore. Complete the restore pages as usual.

Manually Completing the Recovery

After the Oracle databases, control files, server parameter file and archive log files are restored to the Oracle server, there are a number of manual steps you must follow to complete the database recovery. The exact steps you follow will depend on what type of backup you are recovering from, and what the recovery goals are. If you are unfamiliar with Oracle backup/recovery concepts and procedures, please review this documentation from Oracle before proceeding.
The following examples are provided to show you what the steps would be for two typical scenarios:

Example for NOARCHIVELOGMODE Recovery

  1. 1.
    For recovery of a NOARCHIVELOGMODE backup, make two copies of the CONTROL01.CTL file: CONTROL02.CTLand CONTROL03.CTL. CONTROL01.CTL is located in the ORAHOME\ORADATA\DATABASE_SID directory. These backup control files will be used for the recovery.
  2. 2.
    Connect to Oracle through sqlplus (you will need the connect string). The SQLPrompt is displayed.
  3. 3.
    Shutdown the database using this command: SQL>shutdown immediate; \
  4. 4.
    Mount the database: SQL> startup mount;
  5. 5.
    Clear the redo logs: SQL> alter database clear unarchived logfile "full_path_to_redo_log"; Repeat this command for all the redo log files. \
  6. 6.
    To finish, enter the following SQL command string: SQL>alter database open; \
The Oracle database is now recovered. To verify that the database is in the open state (read/write mode), use the following command:
SQL> select name, open_mode from v$database;


  1. 1.
    a. Copy the original control file found in your Oracle base directory (ORAHOME\product\db\database\) to a safe temporary location. This is a precaution in case anything goes wrong during the recovery process.
    b. Make three copies of the file SNCFDATABASE_SID in the restore directory. Call them CONTROL01.CTL, CONTROL02.CTL, and CONTROL03.CTL
    c. Replace the original control files in your Oracle base directory with the CONTROL01.CTL, CONTROL02.CTL, and CONTROL03.CTL files you just created using SNCFDATABASE_SID.
NOTE: CONTROL01.CTL is generally present in ORAHOME/oradata and CONTROL02.CTL is generally present in the recovery area)
d. Copy the .dbf files received from the restore files received from Zmanda Management Console (ZMC) to your Oracle base directory, replacing the corresponding existing files.
  1. 2.
    Connect to Oracle through sqlplus (you will need the connect string).
  2. 3.
    Shutdown the database by entering the following at the SQL prompt: SQL>shutdown immediate; \
  3. 4.
    Mount the database: SQL>startup mount \
  4. 5.
    Begin recovery of the control files with this SQL command string:  SQL>recover database using backup controlfile until cancel; You are prompted for the appropriate logs (which are defined in the backup control file(s) you created in step 1) Press Enter to respond to these prompts until the command prompt is displayed (or it errors out because it could not find a log). You may need to invoke the recover command multiple times to apply all the necessary logs. Enter Cancel when you are done to exit recovery mode and return to the SQL Prompt.\
  5. 6.
    To finish, enter the following SQL command string: SQL>alter database open resetlogs;
The Oracle database is now recovered. To verify that the database is in the open state (read/write mode), use the following command:
SQL> select name, open_mode from v$database;


If a Windows Oracle backup fails (or you are unable to verify the client through the ZMC), follow these troubleshooting steps:
  1. 1.
    Examine the Windows Event Viewer for any VSS or Oracle Writer errors. Run the command vssadmin list writers at the Windows command prompt, and check that the state of the Oracle Writer is stable. If not (or if there are any VSS errors, restart the Oracle Writer and Volume Shadow Copy Service).
  2. 2.
    Make sure that the Oracle Databases are in Mounted state.