General Database Discussions
switch database to copy
HelloAfter I restore the database with “switch database to copy;” I realised that below rman statement is still taking level 1 backup.Since I performed switch, i was expecting next rman statement to take level 0 backup (full image backup of datafiles again)Why this is not happening ? run {recover copy of database until time 'sysdate-5';backup incremental level 1 cumulative for recover of copy database;delete noprompt obsolete device type disk;backup archivelog until time 'sysdate -1' delete input;}
The RECOVER COPY... line will not do anything until the script has been running for more than 5 days. The BACKUP INCREMENTAL line will perform image copy backups the first day it is run (and for any new datafiles), with all subsequent backups being level 1 incremental backups. After 5 days, the RECOVER COPY... line will start to take effect, merging all incremental backups older than 5 days into the level 0 backup, effectively moving the level 0 backup forward. The effect of this is that you will permanently have a 5 day recovery window with a 5 day old level 0 backup and 4 level 1 incremental backups. Notice that the tag must be used to identify which incremental backups apply to which image copies. You may refer the link as well:https://oracle-base.com/articles/misc/incrementally-updated-image-copy-backups
After I restore the database with “switch database to copy;” I realised that below rman statement is still taking level 1 backup.Since I performed switch, i was expecting next rman statement to take level 0 backup (full image backup of datafiles again)Why this is not happening ? run {recover copy of database until time 'sysdate-5';backup incremental level 1 cumulative for recover of copy database;delete noprompt obsolete device type disk;backup archivelog until time 'sysdate -1' delete input;}
Since I performed switch, i was expecting next rman statement to take level 0 backup (full image backup of datafiles again)How does oracle know of taking LEVEL 0 backup when the rman command you instructed oracle to do says LEVEL 1, please read post and the link provided as well.
Ora_83 wrote: HelloAfter I restore the database with “switch database to copy;” I realised that below rman statement is still taking level 1 backup.Since I performed switch, i was expecting next rman statement to take level 0 backup (full image backup of datafiles again)Why this is not happening ? run {recover copy of database until time 'sysdate-5';backup incremental level 1 cumulative for recover of copy database;delete noprompt obsolete device type disk;backup archivelog until time 'sysdate -1' delete input;} >backup incremental level 1 It only does what you tell it to do.It can't read your mind to know what you expect it to do.
Mudasir Hakak wrote: Since I performed switch, i was expecting next rman statement to take level 0 backup (full image backup of datafiles again)How does oracle know of taking LEVEL 0 backup when the rman command you instructed oracle to do says LEVEL 1, please read post and the link provided as well.No. If no suitable level 0 exists, then requesting level 1 will result in a level 0 being made.
The reason will be that RMAN considers the previous copy of the database (that you have switched out of) to be a valid level 0 backup. If you run LIST COPY OF DATABASE you should see this.
Which version of oracle it is ?I would need to check to get some idea on this. I understand that level 0 backup was used for database (using switch database to copy), which means level 0 copy was consumed, now there should not be level 0 backup with mentioned tag, but your script takes level 1 ? why. need to check , can you mention your oracle version and OS ?
Related Links
free space calculation analysis
Query Execution
How DEGREE of index set to "DEFAULT"!
Hi, I'm trying to connect a Visual C
How to execute a remote package in the remote DB
12c Multithreading password required to login as sysdba. How can I recover if the password is forgoten/lost?
11g, hash partitions and hints
what should be focused while reading the AWR report
When will 12.1.0.3 be released ?
ORA-02019 - need another set of eyes
Multiple tables to collect Data in single query
oracle 9i
Oracle 12c Standard Edition 12.1.0.1.0 on Windows 2008 R2 64 bit
Need a generic answer for a multiple database setup in a linux box
cpu wait into trace files?
performance: multiple schemas vs single schema