Oracle Windows

Table of contents
No headers

 Oracle 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 theMy Computericon and chooseManagefrom 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. SelectAutomaticrather thanManual 

  •  The Zmanda Windows Client must be installed on the Oracle server as described here.  
  •  For backup in NOARCHIVELOGMODE, databases must beMountedand 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, enterARCHIVE LOG LISTat theSQLPrompt, and look for the following output line:  

Database log mode No Archive mode  

or  

Database log mode Archive mode  

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 asSnapshot Control files. For example, a control file by the name of 'CONTROL01.CTL' is backed up under the nameSNCFSID_NAME.ORA(SNCFDATA.ORA, if the database SID name isDATA). 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 theSourcespage, 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.  

BackupSet  

The name of the BackupSet for which you want to bound the Oracle Windows Source  

Encryption  

Select any of the encryption type from Encryption Strategy dropdown to encrypt the backup image before transfer to the Amanda backup server   

Compression  

Select any of the compression type from Compression Strategy dropdown to compress backup images before transfer to the Amanda backup server 

Deduplication  

Select dedup option to eliminating redundantdatain adata. In the process ofdeduplication, extra copies of the samedataare deleted, leaving only one copy to be stored  

After you have set the options, clickSAVEto 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 onBackup Where,Backup How, andBackup 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. Use the ZMC to restore the backup to a temporary directory you create for this purpose.  
  2. Use Oracle'sSQL Plusprogram 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. If necessary, install the Zmanda Windows Client software on the restore client (i.e. the Windows Oracle server being restored) as describedhere 
  2. Access the server withSQL Plus(you will need the connect string). Ensure that the database is inshutdown state. From theSQL>prompt, enter the following: 
    SQL>shutdown immediate;   
  3. Access the ZMC console and open theRestore Whatpage. 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. For recovery of a NOARCHIVELOGMODE backup, make two copies of theCONTROL01.CTLfile:CONTROL02.CTLandCONTROL03.CTL.CONTROL01.CTLis located in theORAHOME\ORADATA\DATABASE_SIDdirectory. These backup control files will be used for the recovery.  
  2. Connect to Oracle throughsqlplus(you will need the connect string). TheSQLPromptis displayed.  
  3. Shutdown the database using this command: 
    SQL>shutdown immediate; 
  4.  Mount the database: 
    SQL>startup mount;   
  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.  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 theopenstate (read/write mode), use the following command:  

SQL> select name, open_mode from v$database;  

 

Example ARCHIVELOGMODE Recovery  

  1. For recovery of ARCHIVELOGMODE backups, make three copies of theSNCFDATABASE_SID.ORAfile calledCONTROL01.CTLand CONTROL02.CTL and CONTROL03.CTL. TheSNCFDATABASE_SID.ORAfile is located in theORAHOME\product\db\database\directory.  
  2. Connect to Oracle throughsqlplus(you will need the connect string).  
  3. Shutdown the database by entering the following at theSQLprompt: 
    SQL>shutdown immediate; 
  4.  Mount the database: 
    SQL>startup mount 
  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 therecovercommand multiple times to apply all the necessary logs. EnterCancelwhen you are done to exit recovery mode and return to the SQL Prompt. 
      
  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 theopenstate (read/write mode), use the following command:  

SQL> select name, open_mode from v$database;  

 

Troubleshooting  

If a Windows Oracle backup fails (or you are unable to verify the client through the ZMC), follow these troubleshooting steps:  

  1. Examine the Windows Event Viewer for any VSS or Oracle Writer errors. Run the commandvssadmin list writers at the Windows command prompt, and check that the state of the Oracle Writer isstable. If not (or if there are any VSS errors, restart the Oracle Writer and Volume Shadow Copy Service).  
  2. Make sure that the Oracle Databases are inMountedstate.