Databases Reference
In-Depth Information
When you perform a full data file backup (as against an incremental data file backup), RMAN reads every block
that has ever been used in a data file into the input buffer and eventually backs it up to the specified device. RMAN
skips all data blocks in a data file that have never been used. That saves space and is unlike an image file backup,
which makes a byte-per-byte copy of the source file.
Only never-used data blocks are skipped to save on space. Even if a previously used data block is currently empty
because the data was deleted at some point, RMAN still backs up the data block. The reason for this seemingly odd behavior
is that RMAN was designed to back up data even when the database isn't open when you can't access the data dictionary to
check whether a specific data block is on the free list (blocks get on the free list once all data has been deleted from them).
If you haven't configured a format for the location and name of the backup pieces, RMAN will write files to the fast
recovery area. If the fast recovery area is not configured, then it is operating system dependent on where the backup
pieces are written.
If you're using the backup as copy command and don't specify a destination for the image copies, RMAN
chooses the storage locations according to the following criteria:
If the output channel has a default
configure...format setting, that setting will be the basis for
the output file names.
If you configure a fast recovery area, the backups will be sent there.
If you haven't configured a fast recovery area, an operating system-specific default format
is used (that is, the format parameter, which includes a %U for the generation of unique
filenames, is used).
You can view data file numbers and data file names in the V$DATAFILE, V$DATAFILE_COPY, or
V$DATAFILE_HEADER view. For example, to view data file numbers and data file names in your database, issue this
SQL command:
RMAN> select file#, name from v$datafile;
You can also issue the RMAN report schema command to display data file names and numbers. Once you know
the name or number for each file you want to back up, you can use the backup datafile command to perform the
actual backup operation.
Backing Up Tablespaces
Problem
You want to back up one or more tablespaces, either as a part of a regular backup schedule or for some special purpose.
Solution
Use the backup tablespace command to back up one or more tablespaces. The following example shows how to back
up two tablespaces, users and tools:
RMAN> backup tablespace users,example;
Since we didn't specify an image copy, RMAN will create a backup set containing the two specified tablespaces.
The following example shows how to specify the format parameter in a backup tablespace command:
RMAN> backup tablespace system format '/u01/app/oracle/backup/%d_%U.bus';
 
Search WWH ::




Custom Search