Post on 25-Oct-2015
description
transcript
BEWS 11.0 Oracle RMAN Agent
Sunil Shah, Kirk FreiheitEliyas, Milin, Sujatha, Priyesh
2Symantec Confidential
Agenda
Introduction to RMAN
VXBSA Architecture
Oracle RMAN Agent Architecture
RBI Sets and Restore View
Oracle RAC
Agent Configuration
Agent Features
Q&A
3Symantec Confidential
Example DatabaseConsider following database for this presentation.
ORCL
TableSpace1
• DataFile11
• DataFile12
TableSpace2
• DataFile21
• DataFile22
4Symantec Confidential
RMAN
RMAN implies Oracle’s 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.)
5Symantec 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
6Symantec Confidential
RMAN …
RMAN creates names of these files.
RMAN will also add following entries in ORCL’s 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 RMAN’s catalog and RMAN uses backup history to decide which on disk files to read during restore.
7Symantec Confidential
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.
8Symantec 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 OpenGroup’s XBSA( X/Open Backup Service APIs.)
9Symantec Confidential
VXBSA
SBT
VxBSA Interface
Oracle Backup Process
makes SBT calls
SBT makes VxBSA calls
VxBSA Agent communicates with BEWS
SQLUV
DB2 Backup Process
makes SQLUV calls
SQLUV makes VxBSA calls
10Symantec 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.
11Symantec Confidential
RMAN DBA Initiated Operation …
12Symantec Confidential
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.
13Symantec Confidential
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.
14Symantec Confidential
(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 ?
15Symantec Confidential
(Media) Server Initiated Operations …
Application ServerBackup ServerBEWS
RAWSBeserver
NDMP control
LoadsVxBSA.DLL
StoreJob
StreamCollator
NDMPEngine
Register
Bengine
DBSB
DB application
Env (Jobcookie)
Env (JobCookie)
FS_DoCommand
16Symantec Confidential
(Media) Server Initiated Backup Operation.
17Symantec Confidential
Server Initiated Operation.
18Symantec Confidential
RMAN Catalog.
RMAN tags the data it saves with “piece identifiers” (example, aaabbb1_1 etc. we discussed earlier )
That’s all it gives you – it’s 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.
19Symantec Confidential
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 )
20Symantec Confidential
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.
21Symantec Confidential
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.
22Symantec Confidential
New Restore Browse View…
We need to allow users to: View their data, so they can see what’s been backed up
Make selections in an RMAN-compatible way
• Online view for data within the online instance’s 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
23Symantec Confidential
New Restore Browse View …
24Symantec Confidential
New Restore Browse View
25Symantec Confidential
New Restore Browse View
26Symantec Confidential
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.
27Symantec Confidential
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.
28Symantec Confidential
Oracle Real Application Clusters (RAC)
29Symantec Confidential
Agent Configuration (Windows)
Running VxMON (Windows) or AgentConfig (Linux) is a must before using the agent.
30Symantec Confidential
Agent Configuration (Windows)
31Symantec Confidential
Agent Configuration (Linux)
32Symantec Confidential
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).
33Symantec Confidential
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.
34Symantec Confidential
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.
35Symantec Confidential
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.
Q&A