Oracle RMAN Generic Backup Installation, Configuration, and Invocation Guide

Oracle RMAN Backup Generic
Installation, Configuration and Invocation Guide
For software version: 4.0.1
THE SPECIFICATIONS AND INFORMATION REGARDING THE PRODUCTS IN THIS MANUAL
ARE SUBJECT TO CHANGE WITHOUT NOTICE. ALL STATEMENTS, INFORMATION, AND
RECOMMENDATIONS IN THIS MANUAL ARE BELIEVED TO BE ACCURATE BUT ARE
PRESENTED WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED. USERS MUST
TAKE FULL RESPONSIBILITY FOR THEIR APPLICATION OF ANY PRODUCTS.
THE SOFTWARE LICENSE AND LIMITED WARRANTY FOR THE ACCOMPANYING PRODUCT ARE
SET FORTH IN THE INFORMATION PACKET THAT SHIPPED WITH THE PRODUCT AND ARE
INCORPORATED HEREIN BY THIS REFERENCE. IF YOU ARE UNABLE TO LOCATE THE
SOFTWARE LICENSE OR LIMITED WARRANTY, CONTACT YOUR CISCO REPRESENTATIVE FOR
A COPY.
The Cisco implementation of TCP header compression is an adaptation of a program developed by the
University of California, Berkeley (UCB) as part of UCB's public domain version of the UNIX operating
system. All rights reserved. Copyright © 1981, Regents of the University of California.
NOTWITHSTANDING ANY OTHER WARRANTY HEREIN, ALL DOCUMENT FILES AND SOFTWARE
OF THESE SUPPLIERS ARE PROVIDED "AS IS" WITH ALL FAULTS. CISCO AND THE ABOVENAMED SUPPLIERS DISCLAIM ALL WARRANTIES, EXPRESSED OR IMPLIED, INCLUDING,
WITHOUT LIMITATION, THOSE OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
AND NONINFRINGEMENT OR ARISING FROM A COURSE OF DEALING, USAGE, OR TRADE
PRACTICE.
IN NO EVENT SHALL CISCO OR ITS SUPPLIERS BE LIABLE FOR ANY INDIRECT, SPECIAL,
CONSEQUENTIAL, OR INCIDENTAL DAMAGES, INCLUDING, WITHOUT LIMITATION, LOST
PROFITS OR LOSS OR DAMAGE TO DATA ARISING OUT OF THE USE OR INABILITY TO USE
THIS MANUAL, EVEN IF CISCO OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY
OF SUCH DAMAGES.
Cisco and the Cisco logo are trademarks or registered trademarks of Cisco and/or its affiliates in the U.S. and
other countries. To view a list of Cisco trademarks, go to this URL: http:// www.cisco.com/go/trademarks.
Third-party trademarks mentioned are the property of their respective owners. The use of the word partner
does not imply a partnership relationship between Cisco and any other company. (1110R)
Any Internet Protocol (IP) addresses used in this document are not intended to be actual addresses. Any
examples, command display output, and figures included in the document are shown for illustrative purposes
only. Any use of actual IP addresses in illustrative content is unintentional and coincidental.
Adobe Systems, Inc.
Adobe LiveCycle Data Services ES2.5, Copyright © 2010, Adobe Systems, Inc. All Rights Reserved
Oracle
Copyright ©2012, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of
their respective owners.
Red Hat and Red Hat Enterprise Linux are trademarks of Red Hat, Inc., registered in the United States and
other countries. Other product names, symbols, and phrases used throughout this document (if any) are
property of their respective owners.
© 2016 Cisco Systems, Inc. All rights reserved.
Contents
Contents
1
2
3
4
5
Preface ................................................................................................................... 4
1.1 Purpose of this Document .................................................................................... 4
1.2 Using this Document ............................................................................................ 4
1.3 Applicability ........................................................................................................... 4
1.4 Terminology ........................................................................................................... 5
Installing Oracle RMAN Backup Generic ..................................................... 6
2.1 Prerequisites ........................................................................................................... 6
2.1.1
Verifying that the Oracle Database Is in Archive Mode ................. 6
2.2 RPM Installation .................................................................................................... 7
2.3 Configuration Files to Run RMAN Generic Backup. ....................................... 8
2.3.1
Directory Tree after RPM Installation ............................................... 8
2.3.2
Configuration File ................................................................................ 8
2.3.3
RMAN Generic Script ........................................................................ 10
2.3.4
Backup Directory Tree after RMAN Generic Scripts Has
Been Run .............................................................................................. 10
Full and Differential Backup .......................................................................... 11
3.1 Creating a Full Backup Job ................................................................................. 11
3.1.1
Full Manual Backup ........................................................................... 11
3.1.2
Creating a Full Backup Job as UNIX User “oracle” ....................... 11
3.1.3
Creating a Full Backup Job as UNIX User “root” .......................... 12
3.2 Creating a Differential Backup Job ................................................................... 12
3.2.1
Manual Differential Backup .............................................................. 12
3.2.2
Creating a Differential Backup Job as UNIX User “oracle” ......... 12
3.2.3
Creating a Differential Backup Job as UNIX User “root” ............. 13
Full Restore ......................................................................................................... 14
4.1 Full Restore Procedure........................................................................................ 14
4.2 Success or Failure of Full Restore ...................................................................... 16
4.2.1
Success .................................................................................................. 16
4.2.2
Failure................................................................................................... 16
Until Time Restore ............................................................................................ 17
5.1 Until Time Restore Procedure ........................................................................... 17
5.2 Success or Failure of until time Restore ........................................................... 20
5.2.1
Success .................................................................................................. 20
5.2.2
Failure................................................................................................... 21
List of Tables
Table 1
Table 2
Terminology ........................................................................................................... 5
Configuration File Parameters......................... Error! Bookmark not defined.
Oracle RMAN Backup Generic: Installation, Configuration and Invocation Guide
Page 3
Preface
1
Preface
IMPORTANT!
This Oracle RMAN Backup Generic Installation, Configuration, and Invocation
Guide is an internal document, and must not be shared with customers.
1.1
Purpose of this Document
This is the Installation, Configuration and Installation guide for Oracle RMAN.
RMAN is the Oracle 11g database backup management package.
This document explains how to install and configure Oracle RMAN Backup
Generic.
1.2
Using this Document
The process for installing Oracle RMAN Backup Generic, including all
prerequisites, is explained in section 2.
Procedures for launching Oracle RMAN are explained in section 3.
1.3
Applicability
This document is intended for NDS engineers and customer support personnel
involved with the installation, configuration, and ongoing engineering support for
Oracle RMAN Backup Generic.
The version of Oracle RMAN discussed in this document is available only for
Oracle 11g installations.
It is expected that the reader has a good understanding of the target Oracle
Database system.
Oracle RMAN Backup Generic: Installation, Configuration and Invocation Guide
Page 4
Preface
1.4
Terminology
Table 1
Terminology
Term
Definition
Oracle Database
An Oracle database system (commonly referred to as Oracle
RDBMS or simply Oracle) is a relational database management
system (RDBMS).
The database is identified by an alphanumeric system
identifier or SID. The Oracle database comprises at least one
instance of the Oracle application, along with data storage.
The Oracle database stores data logically in the form of
tablespaces and physically in the form of data files.
Tablespaces can contain various types of memory segments.
Oracle Instance
A shared memory and group of Oracle server processes that
operate against an Oracle database.
An instance—identified persistently by an instantiation
number (or activation id: SYS.V$DATABASE.ACTIVATION#)—
comprises a set of operating-system processes and memorystructures that interact with the storage.
Typical processes include PMON (the process monitor) and
SMON (the system monitor).
Oracle SID
The Oracle system identifier. The System Identifier
automatically defaults to the database name portion of the
global database name (e.g., sales in the example
sales.us.example.com) until you reach eight characters or
enter a period. You can accept or change the default value."
RHEL 5
Red Hat Enterprise Linux (version) 5
Oracle RMAN Backup Generic: Installation, Configuration and Invocation Guide
Page 5
Installing Oracle RMAN Backup Generic
2
Installing Oracle RMAN Backup Generic
This section describes how to install Oracle RMAN Backup Generic.
2.1
Prerequisites
Before RMAN Generic is installed, the following conditions must be met:
2.1.1
!
Oracle Database 11g must be installed
!
The database must be in Archive mode.
Verifying that the Oracle Database Is in Archive Mode
To Verify that the Oracle Database is in Archive mode:
1.
Log on to the server using UNIX user “oracle”.
2.
Run environment for this Oracle Server
3.
Run sqlplus, and log on to Oracle
4.
Check if Oracle is in Archive mode
Source /opt/oracle/<SID>.env
Sqlplus “/ as sysdba”
Archive log list;
The response should be as follows with Database log mode showing as
Archive Mode.
Database log mode
Automatic archival
Archive destination
Oldest online log sequence
Next log sequence to archive
Archive Mode
Enabled
USE_DB_RECOVERY_FILE_DEST
137
140
If the database is not in Archive mode, the response will be as follows:
Database log mode
Automatic archival
Archive destination
Oldest online log sequence
Current log sequence
No Archive Mode
Disabled
USE_DB_RECOVERY_FILE_DEST
137
140
If Database log mode shows as No Archive Mode, the database is not in Archive
mode.
Oracle RMAN Backup Generic: Installation, Configuration and Invocation Guide
Page 6
Installing Oracle RMAN Backup Generic
2.1.1.1
Changing an Oracle Database to Archive Mode
Use the following procedure if the database is not in Archive mode.
IMPORTANT!
If you are working on a production database, get permission from the company
database administrator (DBA) before running the following procedure.
To change an Oracle database to Archive mode:
1.
Log on to the Server using UNIX user “root”.
2.
Locate Oracle Server Service in the Linux RH5 cluster.
3.
Freeze Oracle Server Service on one any cluster node.
4.
Log on to the Server using UNIX user “oracle”.
5.
Run environment for this Oracle Server.
6.
Run sqlplus, and log on to Oracle.
7.
Stop the Oracle Server.
8.
Start the Oracle server at a Mount point.
9.
Change Database to Archive mode.
clustat
clusvcadm -Z
nds_oracle_<SID>
Source /opt/oracle/<SID>.env
Sqlplus “/ as sysdba”
Shutdown immediate;
Startup mount;
Alter database archivelog;
10. Change configuration of the database point Directory location for all archives.
Alter system set log_archive_dest_1='LOCATION=
/oraback/<SID>/archive/';
Note
This procedure will establish the Archive location. Take into
consideration the amount of space you might need in the future to hold
all Archive logs.
11. Start the Oracle server.
Alter database open;
12. Unfreeze Oracle Server Service on one any cluster node.
clusvcadm -U
2.2
nds_oracle_<SID>
RPM Installation
Use the Red Hat Package Manager (RPM) to install Oracle RMAN Backup Generic
on the Linux platform. The RPM files are located in /opt/nds/rpms.
Rpm –ivh nds_ora_rman-1.0.2-2_el5_11g.x86_64.rpm
Oracle RMAN Backup Generic: Installation, Configuration and Invocation Guide
Page 7
Installing Oracle RMAN Backup Generic
Note
2.3
RMAN Generic files are included on the VGH installation DVDs.
Installation and launch must be manual.
Configuration Files to Run RMAN Generic Backup.
The following sections show how to create a configuration file to run RMAN
Generic backup.
2.3.1
Directory Tree after RPM Installation
Under /opt/nds/, a link to ora_rman will be created.
ora_rman -> /opt/nds/installed/ora_rman-1.0.2-2
The directory structure under the link ora_rman will appear as follows.
|-|-|
|
|-|-|-|
|-`--
bin
docs
`-- sample
`-- CABHE.rman.config
etc
licenses
log
`-- ora_rman -> /var/log/nds/ora_rman
sql
utils
|-- run_diff_backup.sh
|-- run_full_backup.sh
|-- run_full_restore.sh
|-- set_db_to_NO_archive_log_mode.sh
`-- set_db_to_archive_log_mode.sh
The following four files are required for running RMAN Generic backup.
2.3.2
!
sample.rman.config
!
run_diff_backup.sh
!
run_full_backup.sh
!
run_full_restore.sh
Configuration File
Before running RMAN Generic, you must copy, rename, and edit the
CABHE.rman.config configuration file as follows.
2.3.2.1
Copy CABHE.rman.config
Copy CABHE.rman.config to Directory /opt/nds/ora_rman/etc/
Oracle RMAN Backup Generic: Installation, Configuration and Invocation Guide
Page 8
Installing Oracle RMAN Backup Generic
2.3.2.2
Renaming CABHE.rman.config
Rename file CABHE.rman.config
to
<DATABASE>. rman.config.
Note
2.3.2.3
In the configuration file name, DATABASE name should be all
UPPER CASE. For example: UPC.rman.config
Editing the File’s Parameters
Edit the renamed file’s parameters as shown in table Error! Reference source not
found.
Remove < >
Keep double quotes “ “
Table 2
Configuration File Parameters
Parameter
Explanation
Example
SID_NAME
Refers to the Oracle SID Name. Replace
<SID_NAME> with the original Sid name.
SID_NAME=”UPC”
BACKUP_VERSIONS
BACKUP_VERSIONS=”3”
Refers to the number of full backups that
Oracle RMAN will reserve on disk or tape. By
default, Oracle RMAN deletes obsolete backups.
This parameter will reserve any number of full
backups and all differential backups made
between the full backups.
DIRECTORY_LOC_BACKUP
Sets the location of the Backups directory that
all backups will be point to.
DIRECTORY_LOC_BACKUP="
/oraback/<SID>/rman”
Directory path should end with directory name.
Do not add “/” at end of the directory path.
SECOND_DIRECTORY
Setting this parameter to “Y” will cause a
second backup of the database to be
generated. The default setting is “N”—second
backup not created.
SECOND_DIRECTORY="N"
DIRECTORY_LOC_BACKUP2
This parameter sets a second Backups directory DIRECTORY_LOC_BACKUP2="<SECOND
_DIRECTORY_LOCATION>”
location for an additional backup copy of the
database.
DIRECTORY_LOC_LOG
DIRECTORY_LOC_LOG
Sets a location for the backup logs. All logs
made at backup and restore time, will be saved ="/opt/nds/ora_rman/log”
in this directory.
Directory path should end with directory
name. Do not add “/” at end of the directory
path.
Oracle RMAN Backup Generic: Installation, Configuration and Invocation Guide
Page 9
Installing Oracle RMAN Backup Generic
Parameter
Explanation
Example
USE_CATALOg
Determines whether to use Catalog. Catalog is USE_CATALOG="N"
a database where all information regarding
backups is deposited. This database should be
different than the local database. The schema
where Catalog is deposited should be a new
one. Configuration of Catalog Schema should be
prepared by the company DBA.
CATALOG_RMAN_CONT
Sets the connection string to connect to the
Catalog Database.
CATALOG_RMAN_CONT="UPC_USER/UE
R_PASSWORD@RMAN_CATALOG”
Catalog use should be confirmed with the
company DBA.
2.3.3
RMAN Generic Script
!
run_full_backup.sh is a script that produces a full backup.
!
run_diff_backup.sh is a script that produces a differential backup .
!
run_full_restore.sh is a script that produces a full restore of DATABASE.
CAUTION!
Do not run run_full_restore.sh on a production database. Restore should be
performed on a production database only by a company DBA.
2.3.4
Backup Directory Tree after RMAN Generic Scripts Has Been Run
After the run_full_backup.sh has run for the first time, the directory structure,
under DIRECTORY_LOC_BACKUP (backup location parameter in the configuration
file) appears as follows:
|-|-|-`--
archivelog
controlfile
diff_backup
full_backup
Four directories were created:
!
Directory archivelog will hold, all archivelog backups made by full backups
or diff backups.
!
Directory controlfile will hold, Controlfile backup and Spfile backup
made by full backups or diff backups.
!
Directory diff_backup will hold, all differential backups made by diff
backups.
!
Directory full_backup will hold, all full backups made by full backups.
Oracle RMAN Backup Generic: Installation, Configuration and Invocation Guide
Page 10
Full and Differential Backup
3
Full and Differential Backup
This section describes how to create full and differential backup jobs.
3.1
Creating a Full Backup Job
The following sections show how to create a full backup job or run a full manual
backup.
3.1.1
Full Manual Backup
To perform a full manual backup:
3.1.2
1.
Log on to a server using UNIX user “oracle”.
2.
Run environment for this Oracle server.
3.
Run the full backup script.
Source /opt/oracle/<SID>.env
/opt/nds/ora_rman/utils/run_full_backup.sh <DATABASE>
Creating a Full Backup Job as UNIX User “oracle”
To create a full backup job as UNIX user “oracle”:
1.
Log on to a server using UNIX user “oracle”.
2.
Run environment for this Oracle server.
3.
Create full backup Job using CRONTAB utility from UNIX.
4.
Edit CRONTAB Add this line.
Source /opt/oracle/<SID>.env
Crontab –e
0 2 * * 0 /opt/nds/ora_rman/utils/run_full_backup.sh <DATABASE>
In this case, a full backup will run every Sunday at 2:00 AM. The number 2
represents the hour of the day to run this job, and the second “0” represents
Sunday. You can change the 0 to 1 for Monday, to 2 for Tuesday and so forth,
where 6 represents Saturday.
Note
The best strategy is to make one full backup and 6 differential backups
each week.
Oracle RMAN Backup Generic: Installation, Configuration and Invocation Guide
Page 11
Full and Differential Backup
3.1.3
Creating a Full Backup Job as UNIX User “root”
1.
Log on to a server using UNIX user “root”.
2.
Create a full backup Job using the Unix CRONTAB utility.
3.
Edit CRONTAB Add the following line:
Crontab –e
0 2 * * 0
su –c ‘/opt/nds/ora_rman/utils/run_full_backup.sh <DATABASE>’ oracle
In this case, a full backup will be run every Sunday at 2:00 AM. The number 2
represents the hour of day to run this job. The second “0” represents Sunday (for
further details, see the procedure in section 3.1.2).
3.2
Creating a Differential Backup Job
The following sections show how to create a differential backup job or run a
differential backup manually.
Differential backup will back up all the blocks that have been changed since the
last full backup. This means that, to restore a database, you will need only one full
backup, the most recent differential backup, the archived redo logs since the
differential backup, and the current online redo logs.
3.2.1
Manual Differential Backup
To run a differential backup manually:
3.2.2
1.
Log on to a server using UNIX user “oracle”.
2.
Run environment for this Oracle server.
3.
Run the differential backup script:
Source /opt/oracle/<SID>.env
/opt/nds/ora_rman/utils/run_diff_backup.sh <DATABASE>
Creating a Differential Backup Job as UNIX User “oracle”
1.
Log on to a Server using UNIX user “oracle”.
2.
Run environment for this Oracle server.
3.
Create differential backup job using the CRONTAB utility from UNIX.
4.
Edit CRONTAB Add the following line.
Source /opt/oracle/<SID>.env
Crontab –e
0 2 * * 1-6 /opt/nds/ora_rman/utils/run_diff_backup.sh <DATABASE>
In this case, a differential backup will run at 2:00 AM each day from Monday
through Saturday. The number 2 represents the hour of the day to run this job.
The numbers 1-6 represent from Monday through Saturday.
Oracle RMAN Backup Generic: Installation, Configuration and Invocation Guide
Page 12
Full and Differential Backup
3.2.3
Creating a Differential Backup Job as UNIX User “root”
1.
Log on to a server using UNIX user “root”.
2.
Create a differential backup job using the UNIX CRONTAB utility.
Crontab –e
3.
Edit CRONTAB Add the following line:
0 2 * * 1-6
su –c ‘/opt/nds/ora_rman/utils/run_diff_backup.sh <DATABASE>’ oracle
In this case, a differential backup will run at 2:00 AM each day from Monday
through Saturday. The number 2 represents the hour of the day to run this job.
The numbers 1-6 represent from Monday through Saturday.
Note
As mentioned, the best strategy is to make one full backup and 6
differential backups each week.
Oracle RMAN Backup Generic: Installation, Configuration and Invocation Guide
Page 13
Full Restore
4
Full Restore
This section describes how to perform a complete restoration of a database.
CAUTION!
Note
4.1
Complete restoration of a production database should be performed
only by a company DBA.
Full Restore Procedure
To perform a full restoration of an Oracle database:
1.
Log on to the server using UNIX user “root”.
2.
Locate Oracle Server Service in the Linux RH5 cluster.
3.
Freeze Oracle Server Service on one any cluster node.
4.
Log on to the server using UNIX user “oracle”.
5.
Run environment for this Oracle server.
6.
Run sqlplus, and log on to Oracle.
7.
Stop the Oracle Server.
8.
Run the full restore script.
9.
If you receive the following message, press ENTER to continue.
clustat
clusvcadm -Z
nds_oracle_<SID>
Source /opt/oracle/<SID>.env
Sqlplus “/ as sysdba”
Shutdown immediate;
/opt/nds/ora_rman/utils/run_full_restore.sh <DATABASE>
Oracle RMAN Backup Generic: Installation, Configuration and Invocation Guide
Page 14
Full Restore
===============================================================================
CAUTION: On this server Red Hat Cluster Services are installed.
Before proceeding the Red Hat Cluster Service for
nds_oracle_$DATABASE_NAME
must be frozen:
---------------If the Red Hat Cluster Service for nds_oracle_$DATABASE_NAME
requires freezing, in a different window, logon as the OS user root
and issue the following command:
clusvcadm -Z
nds_oracle_$DATABASE_NAME \(to FREEZE the Red Hat Cluster
Service\)
---------------After the restoration process has completed successfully, in a different
window
as the OS user root issue the following command
clusvcadm –U nds_oracle_$DATABASE_NAME \(to UNFREEZE Cluster Service\)
------------------------------------------------------------------------------Note:
Press Control C to exit
Press ENTER
to continue
===============================================================================
10. If the Red Hat Cluster Service for nds_oracle_$DATABASE_NAME is frozen,
when you press ENTER, you will receive the following message:
===============================================================================
WARNING: Be Careful! This script will override all existing Database files
that may exist.
If the database is an Oracle RAC database, then first verify that all
of its instances on its nodes are DOWN
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Note:
Press Control C to exit
Press ENTER
to continue
===============================================================================
Note
This procedure will overwrite any database on the system with same
name.
11. When you receive the second message, press ENTER again to continue.
Force Database Shut Down.
===============================================================================
Error: The Oracle Instance $SID_NAME is running
Action: Please Stop the Oracle Instance and then rerun this script
===============================================================================
If you receive the foregoing message, your database is still up and running OR
part of Oracle has not stopped running. Stop Oracle completely with the
following procedure.
Oracle RMAN Backup Generic: Installation, Configuration and Invocation Guide
Page 15
Full Restore
To stop Oracle completely:
1.
Run sqlplus, and logon to Oracle
2.
Shutdown Oracle Server.
3.
Rerun full restore script like again.
Sqlplus “/ as sysdba”
Shutdown abort;
/opt/nds/ora_rman/utils/run_full_restore.sh <DATABASE>
4.2
Success or Failure of Full Restore
4.2.1
Success
===============================================================================
The Database Restoration has completed successfully!
""
Important:
---------Run FULL BACKUP before start working with Database.
=====================================================================
For Oracle RAC databases it is now necessary to startup all
additional Instances.
===============================================================================
If you receive the foregoing message, your restore has succeeded. For Oracle RAC
use the following procedure to re-start your database on the other node.
To start the Oracle database:
4.2.2
1.
Run sqlplus, and log on to Oracle
2.
Start the Oracle server.
3.
Unfreeze Oracle Server Service on any cluster node.
Sqlplus “/ as sysdba”
startup;
clusvcadm -U
nds_oracle_<SID>
Failure
===============================================================================
ERROR:
The Database Restoration procedure has FAILED!
Action: Contact your Oracle DBA Oracle
===============================================================================
If you receive the foregoing message, your restore was not successful. You should
contact your DBA.
1.
Contact your company DBA.
Note
Do not unfreeze Oracle Server Service until the Database has been
properly restored.
Oracle RMAN Backup Generic: Installation, Configuration and Invocation Guide
Page 16
Until Time Restore
5
Until Time Restore
This section describes how to perform a until time restoration of a database.
CAUTION!
Note
5.1
Until Time restoration of a production database should be performed
only by a company DBA.
Until Time Restore Procedure
To perform a until time restoration of an Oracle database:
1.
Log on to the server using UNIX user “root”.
2.
Locate Oracle Server Service in the Linux RH5 cluster.
3.
Freeze Oracle Server Service on one any cluster node.
4.
Log on to the server using UNIX user “oracle”.
5.
Run environment for this Oracle server.
6.
Run sqlplus, and log on to Oracle.
7.
Stop the Oracle Server.
8.
Run the full restore script.
9.
If you receive the following message, press ENTER to continue.
clustat
clusvcadm -Z
nds_oracle_<SID>
Source /opt/oracle/<SID>.env
Sqlplus “/ as sysdba”
Shutdown immediate;
/opt/nds/ora_rman/utils/run_full_restore.sh –t <DATABASE>
Oracle RMAN Backup Generic: Installation, Configuration and Invocation Guide
Page 17
Until Time Restore
===============================================================================
CAUTION: On this server Red Hat Cluster Services are installed.
Before proceeding the Red Hat Cluster Service for
nds_oracle_$DATABASE_NAME
must be frozen:
---------------If the Red Hat Cluster Service for nds_oracle_$DATABASE_NAME
requires freezing, in a different window, logon as the OS user root
and issue the following command:
clusvcadm -Z
nds_oracle_$DATABASE_NAME \(to FREEZE the Red Hat Cluster
Service\)
---------------After the restoration process has completed successfully, in a different
window
as the OS user root issue the following command
clusvcadm –U nds_oracle_$DATABASE_NAME \(to UNFREEZE Cluster Service\)
------------------------------------------------------------------------------Note:
Press Control C to exit
Press ENTER
to continue
===============================================================================
10. If the Red Hat Cluster Service for nds_oracle_$DATABASE_NAME is frozen,
when you press ENTER, you will receive the following message:
===============================================================================
WARNING: Be Careful! This script will override all existing Database files
that may exist.
If the database is an Oracle RAC database, then first verify that all
of its instances on its nodes are DOWN
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Note:
Press Control C to exit
Press ENTER
to continue
===============================================================================
Note
This procedure will overwrite any database on the system with same
name.
11. When you receive the second message, press ENTER again to continue.
Force Database Shut Down.
===============================================================================
Error: The Oracle Instance $SID_NAME is running
Action: Please Stop the Oracle Instance and then rerun this script
===============================================================================
If you receive the foregoing message, your database is still up and running OR
part of Oracle has not stopped running. Stop Oracle completely with the
following procedure.
Oracle RMAN Backup Generic: Installation, Configuration and Invocation Guide
Page 18
Until Time Restore
To stop Oracle completely:
1.
Run sqlplus, and logon to Oracle
2.
Shutdown Oracle Server.
3.
Rerun full restore script like again.
Sqlplus “/ as sysdba”
Shutdown abort;
/opt/nds/ora_rman/utils/run_full_restore.sh <DATABASE>
Until time Parameters:
12. For until time restore, you have to specify until what time to restore database.
===============================================================================
Important:
---------When inputting a Date and Time for Database Restoration always specify exactly
4 digits for the year
2 digits for the month
2 digits for the day
2 digits for the hour, based upon a 24 hour clock
2 digits for the minute
2 digits for the second
Use leading zeros as required
===============================================================================
Please enter the year for the restoration (YYYY):
13. Specified until what year to restore (Four digits).
Please enter the month for the restoration (MM):
14. Specified until what month to restore (Two digits).
Please enter the day for the restoration (DD):
15. Specified until what day to restore (Two digits).
Until what hour to restore?
(two digits 24 hour format):
16. Specified until what hour to restore (24 hour format – Two digits).
Until what minute to restore? (two digits):
17. Specified until what minute to restore (Two digits).
Until what second to restore? (two digits):
18. Specified until what second to restore (Two digits).
===============================================================================
Verification:
------------The restoration process will start restoring the database UPC until
20/03/2012 22:10:10
DD/MM/YYYY HH:MI:SS
Oracle RMAN Backup Generic: Installation, Configuration and Invocation Guide
Page 19
Until Time Restore
In order to EXIT from this script, press Control C
In order to continue with the restoration, press ENTER
19. If everything is correct, press ENTER again to continue.
5.2
Success or Failure of until time Restore
5.2.1
Success
===============================================================================
The Database Restoration has completed successfully!
""
Important:
---------Run FULL BACKUP before start working with Database.
=====================================================================
For Oracle RAC databases it is now necessary to startup all
additional Instances.
===============================================================================
If you receive the foregoing message, your restore has succeeded. For Oracle RAC
use the following procedure to re-start your database on the other node.
To start the Oracle database:
1.
Run sqlplus, and log on to Oracle
2.
Start the Oracle server.
3.
Unfreeze Oracle Server Service on one any cluster node.
Sqlplus “/ as sysdba”
startup;
clusvcadm -U
nds_oracle_<SID>
Oracle RMAN Backup Generic: Installation, Configuration and Invocation Guide
Page 20
Until Time Restore
5.2.2
Failure
===============================================================================
ERROR:
The restoration process has failed
CAUSE:
No backup files prior to DD/MM/YYYY HH:MI:SS have been found
ACTION: Specify a date which is covered by the existing backup files or
Place the appropriate backup files in the location specified
by the parameter DIRECTORY_LOC_BACKUP which is found in the
configuration file
$ETC_DIR/$DATABASE_NAME.rman.config
===============================================================================
If you receive the foregoing message, your restore was not successful. There are
no backup files prior to date specified. Please check you backup files and specified
a date covered by an existing backup files.
===============================================================================
ERROR:
The Database Restoration procedure has FAILED!
Action: Contact your Oracle DBA Oracle
===============================================================================
If you receive the foregoing message, your restore was not successful. You should
contact your DBA.
4.
Contact your company DBA.
Note
Do not unfreeze Oracle Server Service until the Database has been
properly restored.
Oracle RMAN Backup Generic: Installation, Configuration and Invocation Guide
Page 21