You are on page 1of 36

BEWS 11.

0 Oracle RMAN Agent


Sunil Shah, Kirk Freiheit Eliyas, Milin, Sujatha, Priyesh

Agenda
Introduction to RMAN VXBSA Architecture Oracle RMAN Agent Architecture RBI Sets and Restore View

Oracle RAC
Agent Configuration Agent Features Q&A

Symantec Confidential

Example Database
Consider following database for this presentation. ORCL TableSpace1

DataFile11 DataFile12
TableSpace2

DataFile21 DataFile22

Symantec Confidential

RMAN
RMAN implies Oracles Recovery MANager. Introduced in Oracle 8i. Ships with Oracle. Prior to that the only way to backup database was either shutdown and copy files or put Table Spaces in the backup mode and backup files (the way its done by 10.0 Oracle Agent.)

Symantec Confidential

RMAN
Out of the box RMAN can backup to disk without involving any backup products. For example, RMAN> backup database; would backup ORCL database to the configured destination lets say c:\rmandisk folder. A few files like following will be created under c:\rmandisk folder.
C:\rmandisk\aaabbb1_1 C:\rmandisk\aaabbb1_2 C:\rmandisk\aaabbb1_3 C:\rmandisk\aaabbb1_4 C:\rmandisk\aaabbb1_5 C:\rmandisk\aaabbb1_6
Symantec Confidential 5

RMAN
RMAN creates names of these files. RMAN will also add following entries in ORCLs ControlFile. aaabbb1_1 DataFile11 TableSpace1.. aaabbb1_2 DataFile11 TableSpace1.. aaabbb1_3 DataFile12 TableSpace1.. aaabbb1_4 DataFile21 TableSpace2.. aaabbb1_5 DataFile22 TableSpace2.. aaabbb1_6 DataFile22 TableSpace2..

So ControlFile stores backup history and mapping between the on disk files and logical objects (datafiles, tablespaces). In other words, ControlFile acts as RMANs catalog and RMAN uses backup history to decide which on disk files to read during restore.
Symantec Confidential 6

RMAN
Since RMAN does not have media (tape) management capabilities, it provides facilities by which 3rd party backup vendor can manage the on disk files (backup data) instead. Backup vendors to create Media Management Library ( example, orasbt.dll on Windows ) as per the proprietary RMAN specifications. In that case, instead of creating the on disk files, RMAN would load MML and send data to it instead. RMAN would still update the ControlFile in the same fashion.

Symantec Confidential

RMAN
RMAN Disk Backup data flow, RMAN c:\rmandisk\ RMAN 3rd Party MML Backup data flow, RMANorasbt.dllMedia Server(BEWS)Tape or B2D

Other database vendors also have proprietary interfaces like orasbt.dll.


For example, DB2 expects backup vendors to implement sqluv.dll as per DB2 specifications. Common functionality is put in VXBSA component. VXBSA is Symantec extension to OpenGroups XBSA( X/Open Backup Service APIs.)

Symantec Confidential

VXBSA

Oracle Backup Process makes SBT calls

DB2 Backup Process makes SQLUV calls

SBT
SBT makes VxBSA calls

SQLUV
SQLUV makes VxBSA calls

VxBSA Interface

VxBSA Agent communicates with BEWS

Symantec Confidential

RMAN DBA Initiated Operations.


The example we used earlier i.e. RMAN> backup database; is run from the RMAN console. Alternatively RMAN can be invoked with RMAN scriptfile as a command line parameter. These are DBA initiated operations. They are typically carried out by the DBAs with Oracle/RMAN experience.

Symantec Confidential

10

RMAN DBA Initiated Operation

Symantec Confidential

11

RMAN Channels & BE Multi Streaming


RMAN supports concurrent multi channel backup, restore and recovery. For example, RMAN> RUN { ALLOCATE CHANNEL c1 DEVICE TYPE sbt; ALLOCATE CHANNEL c2 DEVICE TYPE sbt; BACKUP DATAFILE 5,6; } backs up datafiles 5 & 6 concurrently.

Symantec Confidential

12

RMAN Channels & BE Multi Streaming


If RMAN is configured to use 3 channels, then 3 data streams are created and data is concurrently pumped to all the streams. RMAN creates 3 threads (on Linux 3 processes) and each thread loads orasbt.dll.

Crete BEWS media server has substantial changes to support multi device acquisition, multiple streams, job coalescing, job logging.

Symantec Confidential

13

(Media) Server Initiated Operations.


Using RMAN is a difficult task and needs a lot of Oracle/RMAN expertise. It would be good if the BE backup administrator can submit backup/restore/recover jobs from the BE UI. Problem: How to take job selections & options and invoke RMAN to carry out the desired operation ?

Symantec Confidential

14

(Media) Server Initiated Operations

Backup Server BEWS Beserver

Application Server

RAWS
FS_DoCommand

StreamCollator

NDMP control
Register

DBSB
Env (Jobcookie)

DB application
StoreJob NDMPEngine
Env (JobCookie)

Bengine

Loads VxBSA.DLL

Symantec Confidential

15

(Media) Server Initiated Backup Operation.

Symantec Confidential

16

Server Initiated Operation.

Symantec Confidential

17

RMAN Catalog.
RMAN tags the data it saves with piece identifiers (example, aaabbb1_1 etc. we discussed earlier ) Thats all it gives you its up to the backup vendor to track these piece identifiers, and when a restore occurs, RMAN will request data using only these tags RMAN restore and recovery commands are always based on:
What you want to restore (i.e. whole database, just a tablespace or datafile, etc.)
Which point in time you want it recovered to (can be time or SCN)

RMAN has its own catalogs to map between the logical selection (what you want) and the physical location (piece identifier)

What this means: ANY restore/recovery operation may request data from ANY backup set that Backup Exec has stored. For this reason, the traditional backup set-driven view makes no sense for our users.

Symantec Confidential

18

Restore Browse Information Sets


Solution: Restore Browse Information Sets
In order to build a restore view, we need to collect information from the RMAN catalogs We build Restore Browse Information (RBI) sets for this purpose In total, every backup results in multiple Backup Exec sets Physical data set ( One per stream ) RBI set for physical data ( One per stream ) RBI set for the control file ( Created only if ControlFile is
backed up, one per backup )

Symantec Confidential

19

New Restore Browse View


ControlFile does not keep backup history forever. It purges old records based on the user defined configuration. RMAN can only restore from those backups which are part of the ControlFile backup history. So if ControlFile has only last 10 days of backup history and BE catalog has last 3 months of backups, user can restore from only last 10 days of backups (Well there is a workaround, will discuss soon). Hence no point showing last 3 months of backups as restore job could fail.

Symantec Confidential

20

New Restore Browse View


While creating the restore browse window, we need to get the current backup history range from the ControlFile. BE Catalog queries RMAN Agent to retrieve this range and hence in this case, UI would display only last 10 days of backups. Thus new restore browse view is created by combining live information from the database and BE catalog. In order to restore/recover to a point in time prior to the current backup history range, user needs to first restore appropriate ControlFile.

Symantec Confidential

21

New Restore Browse View


We need to allow users to:
View their data, so they can see whats been backed up Make selections in an RMAN-compatible way Online view for data within the online instances catalog time
range

Control files view to go further back in time

What we cannot do:


Allow set-based selections (i.e. cannot select from the View by Media pane, which is inherently backup set-based)

Using data from the RBI sets (within the time range), we show the selectable schema
History for datafiles is provided in the preview pane (B2) Archived log files will be shown here as well
Symantec Confidential 22

New Restore Browse View

Symantec Confidential

23

New Restore Browse View

Symantec Confidential

24

New Restore Browse View

Symantec Confidential

25

Oracle Real Application Clusters (RAC)


Oracle RAC is an active-active cluster with shared storage, whereby multiple servers can work in parallel on the same set of data. Since all the participating nodes can access the database, any node can initiate backup/restore/recovery. Without any changes, the same database would appear under multiple nodes in the BE UI. This could create user confusion. In addition, if the designated node is down scheduled backup operation would fail, even when other nodes are available to carry out the operation.

Symantec Confidential

26

Oracle Real Application Clusters (RAC)


In order to overcome these problems, RAC shared database is put under a BE created virtual node. There is no special user configuration required, each participating node advertises the same virtual name, which appear in the BE UI.

Symantec Confidential

27

Oracle Real Application Clusters (RAC)

Symantec Confidential

28

Agent Configuration (Windows)


Running VxMON (Windows) or AgentConfig (Linux) is a must before using the agent.

Symantec Confidential

29

Agent Configuration (Windows)

Symantec Confidential

30

Agent Configuration (Linux)

Symantec Confidential

31

RMAN Agent Features.


Advantages over the legacy Oracle Agent.
RMAN sends only allocated blocks of a file, thus saving significant tape space and improved performance. Much improved performance due to multistreaming. No excessive online redo log activity (which happens during traditional 'backup mode' online Oracle backups). Block level recovery support. DBA-initiated operations supported and hence advanced backup/restore features supported, and that should help us attract additional customers (Oracle DBAs).

Symantec Confidential

32

RMAN Agent Features.


RMAN Agent Supports

Oracle 9i & 10g.


Windows 32/x64 bits and Linux 32/x64 bits.

Windows 2000 Server (32 bit) and Windows 2003


Server & R2 (32 bit and x64).

Linux 32 bit and extended 64bit platforms of Red Hat


4.0/3.0, SuSE 9.0 enterprise/standard. DBA initiated as well as Media Server initiated operations. Cross operations i.e. DBA initiated backup and Server initiated restore and vice versa. Encryption & Compression.
Symantec Confidential 33

RMAN Agent Features


DBA as well as Server initiated operations for Oracle 9i & 10g Real Application Clusters (both Windows & Linux). Supported file systems: GFS (Red Hat), OCFS (Oracle), VCFS (VERITAS), Matrix Server (Polyserve). Single step ControlFile & Database restore. Recovery Catalog. UI Intuitive user interface to simplify backup, restore and recovery operations.

Symantec Confidential

34

RMAN Agent Features


Backward Compatibility Can not restore previous Oracle Agent generated media. However Crete media server will continue supporting legacy agent (restore only). Crete media server to upgrade legacy Oracle Agent jobs. RMAN Agent to detect and use legacy Oracle agent configuration. License Same PID for both Windows & Linux agents. In addition, license for the oracle agent will enable RAWS or RALUS license. Cluster Apart from Oracle RAC, also supports backup/restore via MSCS Virtual Server.
Symantec Confidential 35

Q&A

You might also like