Oracle RMAN can I configure retention policy per database?

804 views Asked by At

I want to know if I can configure retention policy per database? I have several databases, about 100 and I need a different retention policy for each database. Is that possible?

If possible, How do is see the retention policies per database?

SELECT value from v$rman_configuration WHERE name = 'RETENTION POLICY';

The above sql just returns one single row.

2

There are 2 answers

5
pmdba On

It very much depends on what you mean by "database":

RMAN only works with physical database files for the entire "database", i.e. all users/schemas contained in those files. Your retention policy in RMAN then applies to all data files and all users/schemas within those files. Each physical Oracle database (all tablespaces, archive logs, etc.) can have its own retention policy, which is stored in the database control files or in the RMAN repository. There will only ever be a single retention policy at any given time, which is what your query is showing.

If by "database" you mean individual logical schemas within a physical database, then the answer is "no", you cannot have separate RMAN retention policies at that level.

0
scott yu On

you can add line in you backup script, base on different database you connected. ======================for example=== CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default