Tuesday, October 21, 2008

rman plugged tablespaces not backupped

Dame, heren
Met onderstaand statement krijg je de tablespaces die niet door Rman worden meegenomen.
select distinct t.name from v$datafile vd
, sys.ts$ t
where vd.file# in (
select file# from v$datafile
minus
select distinct file# from v$backup_datafile )
and vd.plugged_in = 1
and t.ts#=vd.ts#
NB historie is wel afhankelijk van de database parameter control_file_record_keep_time.
Indien je een tablespace inplugged dan krijgt die in dba_tablespaces de status PLUGGED_IN=YES
Tevens krijg je de status PLUGGED_IN in v$datafile.
Zolang de tablespace niet een keer READ/WRITE zijn gezet worden ze niet gebackupped. Zet de tablespace read/write indien je geen andere backup van de betrokken datafiles hebt.
Skip_read_only vlag in rman heeft geen invloed.
Indien je met transportable tablespaces aan de slag moet moet je hier wel om denken!!!
Je kunt dit verifieren door met rman als volgt de betrokken backup van de tablespace op te vragen:
rman> connect target /
rman> list backup of tablespace ts1 ;


Het is allemaal gedocumenteerd:


Onderstaande extractie is uit de documentatie van 9,10 en 11.:

Oracle9i Recovery Manager ReferenceRelease 2 (9.2)Part Number A96565-0
When using the RMAN BACKUP command, you cannot perform any of the following actions:
Make a backup (either normal or incremental) in NOARCHIVELOG mode when the database is open or is closed after an instance failure or SHUTDOWN ABORT. You can only make a NOARCHIVELOG backup when the database after a consistent shutdown.
Stripe a single backup set across multiple channels.
Stripe a single input file across multiple backup sets.
Combine archived redo log files and datafiles into a single backup.
Back up files with different block sizes into the same backup set. RMAN can back up tablespaces with different block sizes, but puts each differently sized datafile into its own backup set.
Back up locally-managed temporary tablespaces (although you can back up dictionary-managed tablespaces)
Back up transportable tablespaces that were not made read/write after being transported.

Dit is in 10G ook het geval :
Oracle® Database Backup and Recovery Reference10g Release 2 (10.2)Part Number B14194-03
You cannot back up transportable tablespaces that were not made read-write after being transported.

Oracle® Database Backup and Recovery Reference11g Release 1 (11.1)Part Number B28273-03
f the following conditions are met, then RMAN can back up transportable tablespaces that have not been made read/write after being transported:
The COMPATIBLE initialization parameter is set to 11.0.0 or higher.
You are using an Oracle Database 11g RMAN client.
If any of the preceding conditions is not met, then RMAN automatically skips transportable tablespaces that have not yet been made read/write. Note that if you specify a transportable tablespace explicitly when any of the conditions is not met, then RMAN issues an error saying that the tablespace does not exist.

No comments: