Depuis la version 11g, RMAN peut différencier les sauvegardes d’une même base de données dans des configurations Data Guard avec des standbys physiques. Pour cela, RMAN introduit un nouveau mot clé DB_UNIQUE_NAME
. Ce changement permet de gérer proprement le cas, finalement le plus répandu, pour lequel les sauvegardes des environnements primaires et standby ne sont pas partagés. Bien sur, vous me direz que les bibliothèques de sauvegardes virtuelles (VTL) offrent désormais des solutions de réplications, parfois incrémentales et avec des algorithmes de déduplication, qui permettent de synchroniser les sauvegardes sur plusieurs sites, mais c’est une autre histoire…
Note:
Pour cette fonctionnalité, RMAN s’appuie sur un changement dans la configuration des standbys qui est décrit dans la section Enhancement aroundDB_UNIQUE_NAME
. A partir d’Oracle 11g, chacune des bases de données standby d’une configuration Data Guard doit avoir des valeurs différentes pour ce paramètre sinon la configuration ne fonctionnera pas. Grace à cette nouvelle contrainte, il est donc possible d’identifier à coup sur les copies de bases de données à partir du coupeDBID
,DB_UNIQUE_NAME
.
Dans cet article vous trouverez quelques illustrations de l’utilisation de cette nouvelle syntaxe.
Enregistrement des bases de données
L’enregistrement des bases de données standbys est réalisé automatiquement dans le catalogue RMAN lorsque vous avez enregistré la base de données primaire et que vous vous connectez au catalogue; toutefois, pour faciliter l’accès à vos bases de données d’un coté comme de l’autre, vous pouvez ajouter un identifiant (Alias TNS) pour vous connecter aux différentes cibles et ainsi modifier les paramètres d’une des bases de données, même si vous êtes connecté à une autre :
RMAN> LIST DB_UNIQUE_NAME OF DATABASE;
List of Databases
DB Key DB Name DB ID Database Role Db_unique_name
------- ------- ----------------- --------------- ------------------
1 BLACK 417517776 PRIMARY WHITE
1 BLACK 417517776 STANDBY BLACK
CONFIGURE DB_UNIQUE_NAME BLACK CONNECT IDENTIFIER 'black';
CONFIGURE DB_UNIQUE_NAME WHITE CONNECT IDENTIFIER 'white';
Modification des paramètres
Ainsi, sous réserve que les Alias TNS existent ainsi que les répertoires correspondant sur les bon serveurs, vous pouvez changer le paramatrage du catalogue RMAN de manière différenciée à l’aide de la clause for db_unique_name
comme ci-dessous :
RMAN> configure channel
device type disk
format '/u01/app/oracle/backup/BLACK/%U'
for db_unique_name black;
new RMAN configuration parameters:
CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '/u01/app/oracle/backup/BLACK/%U';
new RMAN configuration parameters are successfully stored
RMAN> configure channel
device type disk
format '/u01/app/oracle/backup/WHITE/%U'
for db_unique_name white;
new RMAN configuration parameters:
CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '/u01/app/oracle/backup/WHITE/%U';
new RMAN configuration parameters are successfully stored
starting full resync of recovery catalog
full resync complete
Evidemment, si vous lancez la commande show all
comme ci-dessous, vous ne verrez que la configuration locale; notez que les alias TNS sont enregistrés de la même manière pour toutes les bases de données :
RMAN> show all;
RMAN configuration parameters for database with db_unique_name WHITE are:
CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default
CONFIGURE BACKUP OPTIMIZATION OFF; # default
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
CONFIGURE CONTROLFILE AUTOBACKUP OFF; # default
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO COMPRESSED BACKUPSET;
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '/u01/app/oracle/backup/WHITE/%U';
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
CONFIGURE COMPRESSION ALGORITHM 'BASIC' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE ; # default
CONFIGURE DB_UNIQUE_NAME 'BLACK' CONNECT IDENTIFIER 'black';
CONFIGURE DB_UNIQUE_NAME 'WHITE' CONNECT IDENTIFIER 'white';
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/app/oracle/product/11.2.0/db_1/dbs/snapcf_WHITE.f'; # default
Pour afficher une configuration précise, utilisez encore le mot clé for db_unique_name
comme ci-dessous :
RMAN> show all for db_unique_name BLACK;
RMAN configuration parameters for database with db_unique_name BLACK are:
CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default
CONFIGURE BACKUP OPTIMIZATION OFF; # default
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
CONFIGURE CONTROLFILE AUTOBACKUP OFF; # default
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default
RMAN configuration has no stored or default parameters
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '/u01/app/oracle/backup/BLACK/%U';
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
CONFIGURE COMPRESSION ALGORITHM 'BASIC' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE ; # default
CONFIGURE DB_UNIQUE_NAME 'BLACK' CONNECT IDENTIFIER 'black';
CONFIGURE DB_UNIQUE_NAME 'WHITE' CONNECT IDENTIFIER 'white';
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/app/oracle/product/11.2.0/db_1/dbs/snapcf_WHITE.f'; # default
Notez enfin que si vous changez un paramètre sans utiliser la clause for db_unique_name
seule la configuration de la base de données locale est modifiée comme vous vous en rendrez compte ci-dessous :
RMAN> configure controlfile autobackup on;
new RMAN configuration parameters:
CONFIGURE CONTROLFILE AUTOBACKUP ON;
new RMAN configuration parameters are successfully stored
starting full resync of recovery catalog
full resync complete
RMAN> show all for db_unique_name black;
RMAN configuration parameters for database with db_unique_name BLACK are:
CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default
CONFIGURE BACKUP OPTIMIZATION OFF; # default
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
CONFIGURE CONTROLFILE AUTOBACKUP OFF; # default
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/u01/app/oracle/backup/BLACK/%F';
RMAN configuration has no stored or default parameters
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '/u01/app/oracle/backup/BLACK/%U';
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
CONFIGURE COMPRESSION ALGORITHM 'BASIC' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE ; # default
CONFIGU RE DB_UNIQUE_NAME 'BLACK' CONNECT IDENTIFIER 'black';
CONFIGURE DB_UNIQUE_NAME 'WHITE' CONNECT IDENTIFIER 'white';
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/app/oracle/product/11.2.0/db_1/dbs/snapcf_WHITE.f'; # default
RMAN> configure controlfile autobackup on
for db_unique_name black;
Sauvegardes
Contrairement aux commandes LIST
, SHOW
ou CONFIGURE
, la commande BACKUP
ne s’applique qu’à la base de données locale:
RMAN> backup database plus archivelog delete all input;
RMAN> list backup of database for db_unique_name black;
specification does not match any backup in the repository
RMAN> list backup of database for db_unique_name white;
List of Backup Set for database with db_unique_name WHITE
===================
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
185 Full 280.34M DISK 00:01:17 29-OCT-10
BP Key: 204 Status: AVAILABLE Compressed: YES Tag: TAG20101029T220045
Piece Name: /u01/app/oracle/backup/WHITE/05lrmpge_1_1
List of Datafiles in backup set 185
File LV Type Ckp SCN Ckp Time Name
---- -- ---- ---------- --------- ----
1 Full 1026946 29-OCT-10 /u01/app/oracle/oradata/WHITE/datafile/o1_mf_system_6dbrxhcy_.dbf
2 Full 1026946 29-OCT-10 /u01/app/oracle/oradata/WHITE/datafile/o1_mf_sysaux_6dbrxhfx_.dbf
3 Full 1026946 29-OCT-10 /u01/app/oracle/oradata/WHITE/datafile/o1_mf_undotbs1_6dbrxhkt_.dbf
4 Full 1026946 29-OCT-10 /u01/app/oracle/oradata/WHITE/datafile/o1_mf_users_6dbrxhmw_.dbf
5 Full 1026946 29-OCT-10 /u01/app/oracle/oradata/WHITE/datafile/o1_mf_example_6dbrzqon_.dbf
Une fois connecté à l’autre base de données, vous pouvez lancer une sauvegarde :
RMAN> backup database
plus archivelog delete all input;
Starting backup at 29-OCT-10
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=19 device type=DISK
channel ORA_DISK_1: starting archived log backup set
channel ORA_DISK_1: specifying archived log(s) in backup set
input archived log thread=1 sequence=9 RECID=1 STAMP=733488580
input archived log thread=1 sequence=10 RECID=2 STAMP=733488857
input archived log thread=1 sequence=11 RECID=3 STAMP=733489027
input archived log thread=1 sequence=12 RECID=4 STAMP=733489027
input archived log thread=1 sequence=13 RECID=8 STAMP=733489099
input archived log thread=1 sequence=14 RECID=11 STAMP=733489104
input archived log thread=1 sequence=15 RECID=13 STAMP=733489129
input archived log thread=1 sequence=16 RECID=14 STAMP=733489130
input archived log thread=1 sequence=17 RECID=16 STAMP=733489152
input archived log thread=1 sequence=18 RECID=17 STAMP=733489152
input archived log thread=1 sequence=19 RECID=18 STAMP=733489153
input archived log thread=1 sequence=20 RECID=19 STAMP=733489172
input archived log thread=1 sequence=21 RECID=21 STAMP=733489808
channel ORA_DISK_1: starting piece 1 at 29-OCT-10
channel ORA_DISK_1: finished piece 1 at 29-OCT-10
piece handle=/u01/app/oracle/backup/BLACK/07lrmpqj_1_1 tag=TAG20101029T220610 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
channel ORA_DISK_1: deleting archived log(s)
archived log file name=/u01/app/oracle/oradata/BLACK/1_9_733323794.dbf RECID=1 STAMP=733488580
archived log file name=/u01/app/oracle/oradata/BLACK/1_10_733323794.dbf RECID=2 STAMP=733488857
archived log file name=/u01/app/oracle/oradata/BLACK/1_11_733323794.dbf RECID=3 STAMP=733489027
archived log file name=/u01/app/oracle/oradata/BLACK/1_12_733323794.dbf RECID=4 STAMP=733489027
archived log file name=/u01/app/oracle/oradata/BLACK/1_13_733323794.dbf RECID=8 STAMP=733489099
archived log file name=/u01/app/oracle/oradata/BLACK/1_14_733323794.dbf RECID=11 STAMP=733489104
archived log file name=/u01/app/oracle/oradata/BLACK/1_15_733323794.dbf RECID=13 STAMP=733489129
archived log file name=/u01/app/oracle/oradata/BLACK/1_16_733323794.dbf RECID=14 STAMP=733489130
archived log file name=/u01/app/oracle/oradata/BLACK/1_17_733323794.dbf RECID=16 STAMP=733489152
archived log file name=/u01/app/oracle/oradata/BLACK/1_18_733323794.dbf RECID=17 STAMP=733489152
archived log file name=/u01/app/oracle/oradata/BLACK/1_19_733323794.dbf RECID=18 STAMP=733489153
archived log file name=/u01/app/oracle/oradata/BLACK/1_20_733323794.dbf RECID=19 STAMP=733489172
archived log file name=/u01/app/oracle/oradata/BLACK/1_21_733323794.dbf RECID=21 STAMP=733489808
channel ORA_DISK_1: starting archived log backup set
channel ORA_DISK_1: specifying archived log(s) in backup set
input archived log thread=1 sequence=1 RECID=20 STAMP=733489774
input archived log thread=1 sequence=2 RECID=22 STAMP=733489874
input archived log thread=1 sequence=3 RECID=23 STAMP=733489910
input archived log thread=1 sequence=4 RECID=29 STAMP=733489916
input archived log thread=1 sequence=5 RECID=31 STAMP=733489921
input archived log thread=1 sequence=6 RECID=33 STAMP=733489954
input archived log thread=1 sequence=7 RECID=34 STAMP=733489955
input archived log thread=1 sequence=8 RECID=37 STAMP=733489971
input archived log thread=1 sequence=9 RECID=36 STAMP=733489971
input archived log thread=1 sequence=10 RECID=38 STAMP=733489972
input archived log thread=1 sequence=11 RECID=39 STAMP=733489978
input archived log thread=1 sequence=12 RECID=40 STAMP=733489993
input archived log thread=1 sequence=13 RECID=41 STAMP=733502834
input archived log thread=1 sequence=14 RECID=43 STAMP=733700695
input archived log thread=1 sequence=15 RECID=42 STAMP=733700694
input archived log thread=1 sequence=16 RECID=44 STAMP=733700699
input archived log thread=1 sequence=17 RECID=45 STAMP=733700700
input archived log thread=1 sequence=18 RECID=46 STAMP=733701635
input archived log thread=1 sequence=19 RECID=47 STAMP=733701731
channel ORA_DISK_1: starting piece 1 at 29-OCT-10
channel ORA_DISK_1: finished piece 1 at 29-OCT-10
piece handle=/u01/app/oracle/backup/BLACK/08lrmpqk_1_1 tag=TAG20101029T220610 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:07
channel ORA_DISK_1: deleting archived log(s)
archived log file name=/u01/app/oracle/oradata/BLACK/1_1_733489773.dbf RECID=20 STAMP=733489774
archived log file name=/u01/app/oracle/oradata/BLACK/1_2_733489773.dbf RECID=22 STAMP=733489874
archived log file name=/u01/app/oracle/oradata/BLACK/1_3_733489773.dbf RECID=23 STAMP=733489910
archived log file name=/u01/app/oracle/oradata/BLACK/1_4_733489773.dbf RECID=29 STAMP=733489916
archived log file name=/u01/app/oracle/oradata/BLACK/1_5_733489773.dbf RECID=31 STAMP=733489921
archived log file name=/u01/app/oracle/oradata/BLACK/1_6_733489773.dbf RECID=33 STAMP=733489954
archived log file name=/u01/app/oracle/oradata/BLACK/1_7_733489773.dbf RECID=34 STAMP=733489955
archived log file name=/u01/app/oracle/oradata/BLACK/1_8_733489773.dbf RECID=37 STAMP=733489971
archived log file name=/u01/app/oracle/oradata/BLACK/1_9_733489773.dbf RECID=36 STAMP=733489971
archived log file name=/u01/app/oracle/oradata/BLACK/1_10_733489773.dbf RECID=38 STAMP=733489972
archived log file name=/u01/app/oracle/oradata/BLACK/1_11_733489773.dbf RECID=39 STAMP=733489978
archived log file name=/u01/app/oracle/oradata/BLACK/1_12_733489773.dbf RECID=40 STAMP=733489993
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/u01/app/oracle/oradata/BLACK/1_13_733489773.dbf thread=1 sequence=13
RMAN-08137: WARNING: archived log not del eted, needed for standby or upstream capture process
archived log file name=/u01/app/oracle/oradata/BLACK/1_14_733489773.dbf thread=1 sequence=14
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/u01/app/oracle/oradata/BLACK/1_15_733489773.dbf thread=1 sequence=15
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/u01/app/oracle/oradata/BLACK/1_16_733489773.dbf thread=1 sequence=16
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/u01/app/oracle/oradata/BLACK/1_17_733489773.dbf thread=1 sequence=17
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/u01/app/oracle/oradata/BLACK/1_18_733489773.dbf thread=1 sequence=18
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/u01/app/oracle/oradata/BLACK/1_19_733489773.dbf thread=1 sequence=19
Finished backup at 29-OCT-10
Starting backup at 29-OCT-10
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00001 name=/u01/app/oracle/oradata/BLACK/datafile/o1_mf_system_6dbrxhcy_.dbf
input datafile file number=00002 name=/u01/app/oracle/oradata/BLACK/datafile/o1_mf_sysaux_6dbrxhfx_.dbf
input datafile file number=00005 name=/u01/app/oracle/oradata/BLACK/datafile/o1_mf_example_6dbrzqon_.dbf
input datafile file number=00003 name=/u01/app/oracle/oradata/BLACK/datafile/o1_mf_undotbs1_6dbrxhkt_.dbf
input datafile file number=00004 name=/u01/app/oracle/oradata/BLACK/datafile/o1_mf_users_6dbrxhmw_.dbf
channel ORA_DISK_1: starting piece 1 at 29-OCT-10
Requêtes
Une fois les sauvegardes effectuées, vous pouvez vérifier le contenu des sauvegardes de toutes les bases de données à l’aide de la commande list... for db_unique_name...
:
RMAN> list backup for db_unique_name black;
List of Backup Set for database with db_unique_name BLACK
===================
BS Key Size Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
323 79.53M DISK 00:00:03 29-OCT-10
BP Key: 325 Status: AVAILABLE Compressed: NO Tag: TAG20101029T220610
Piece Name: /u01/app/oracle/backup/BLACK/08lrmpqk_1_1
List of Archived Logs in backup set 323
Thrd Seq Low SCN Low Time Next SCN Next Time
---- ------- ---------- --------- ---------- ---------
1 1 946468 27-OCT-10 946471 27-OCT-10
1 2 946471 27-OCT-10 946819 27-OCT-10
1 3 946819 27-OCT-10 946862 27-OCT-10
1 4 946862 27-OCT-10 946871 27-OCT-10
1 5 946871 27-OCT-10 946878 27-OCT-10
1 6 946878 27-OCT-10 946923 27-OCT-10
1 7 946923 27-OCT-10 966929 27-OCT-10
1 8 966929 27-OCT-10 966932 27-OCT-10
1 9 966932 27-OCT-10 967059 27-OCT-10
1 10 967059 27-OCT-10 967211 27-OCT-10
1 11 967211 27-OCT-10 967232 27-OCT-10
1 12 967232 27-OCT-10 967251 27-OCT-10
1 13 967251 27-OCT-10 984773 27-OCT-10
1 14 984773 27-OCT-10 1019702 27-OCT-10
1 15 1019702 27-OCT-10 1019725 29-OCT-10
1 16 1019725 29-OCT-10 1024658 29-OCT-10
1 17 1024658 29-OCT-10 1024664 29-OCT-10
1 18 1024664 29-OCT-10 1026677 29-OCT-10
1 19 1026677 29-OCT-10 1027033 29-OCT-10
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
363 Full 1.05G DISK 00:01:09 29-OCT-10
BP Key: 383 Status: AVAILABLE Compressed: NO Tag: TAG20101029T220619
Piece Name: /u01/app/oracle/backup/BLACK/09lrmpqs_1_1
List of Datafiles in backup set 363
File LV Type Ckp SCN Ckp Time Name
---- -- ---- ---------- --------- ----
1 Full 967251 27-OCT-10 /u01/app/oracle/oradata/BLACK/datafile/o1_mf_system_6dbrxhcy_.dbf
2 Full 967251 27-OCT-10 /u01/app/oracle/oradata/BLACK/datafile/o1_mf_sysaux_6dbrxhfx_.dbf
3 Full 967251 27-OCT-10 /u01/app/oracle/oradata/BLACK/datafile/o1_mf_undotbs1_6dbrxhkt_.dbf
4 Full 967251 27-OCT-10 /u01/app/oracle/oradata/BLACK/datafile/o1_mf_users_6dbrxhmw_.dbf
5 Full 967251 27-OCT-10 /u01/app/oracle/oradata/BLACK/datafile/o1_mf_example_6dbrzqon_.dbf
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
395 Full 9.64M DISK 00:00:01 29-OCT-10
BP Key: 401 Status: AVAILABLE Compressed: NO Tag: TAG20101029T220737
Piece Name: /u01/app/oracle/backup/BLACK/c-417517776-20101029-00
SPFILE Included: Modification time: 29-OCT-10
SPFILE db_unique_name: BLACK
Standby Control File Included: Ckp SCN: 967251 Ckp time: 27-OCT-10
RMAN> list backup for db_unique_name WHITE;
List of Backup Set for database with db_unique_name WHITE
===================
BS Key Size Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
142 22.46M DISK 00:00:04 29-OCT-10
BP Key: 144 Status: AVAILABLE Compressed: YES Tag: TAG20101029T220036
Piece Name: /u01/app/oracle/backup/WHITE/04lrmpg6_1_1
List of Archived Logs in backup set 142
Thrd Seq Low SCN Low Time Next SCN Next Time
---- ------- ---------- --------- ---------- ---------
1 1 946468 27-OCT-10 946471 27-OCT-10
1 2 946471 27-OCT-10 946819 27-OCT-10
1 3 946819 27-OCT-10 946862 27-OCT-10
1 4 946862 27-OCT-10 946871 27-OCT-10
1 5 946871 27-OCT-10 946878 27-OCT-10
1 6 946878 27-OCT-10 946923 27-OCT-10
1 7 946923 27-OCT-10 966929 27-OCT-10
1 8 966929 27-OCT-10 966932 27-OCT-10
1 9 966932 27-OCT-10 967059 27-OCT-10
1 10 967059 27-OCT-10 967211 27-OCT-10
1 11 967211 27-OCT-10 967232 27-OCT-10
1 12 967232 27-OCT-10 967251 27-OCT-10
1 13 967251 27-OCT-10 984773 27-OCT-10
1 14 984773 27-OCT-10 1019702 27-OCT-10
1 15 1019702 27-OCT-10 1019725 29-OCT-10
1 16 1019725 29-OCT-10 1024658 29-OCT-10
1 17 1024658 29-OCT-10 1024664 29-OCT-10
1 18 1024664 29-OCT-10 1026677 29-OCT-10
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
185 Full 280.34M DISK 00:01:17 29-OCT-10
BP Key: 204 Status: AVAILABLE Compressed: YES Tag: TAG20101029T220045
Piece Name: /u01/app/oracle/backup/WHITE/05lrmpge_1_1
List of Datafiles in backup set 185
File LV Type Ckp SCN Ckp Time Name
---- -- ---- ---------- --------- ----
1 Full 1026946 29-OCT-10 /u01/app/oracle/oradata/BLACK/datafile/o1_mf_system_6dbrxhcy_.dbf
2 Full 1026946 29-OCT-10 /u01/app/oracle/oradata/BLACK/datafile/o1_mf_sysaux_6dbrxhfx_.dbf
3 Full 1026946 29-OCT-10 /u01/app/oracle/oradata/BLACK/datafile/o1_mf_undotbs1_6dbrxhkt_.dbf
4 Full 1026946 29-OCT-10 /u01/app/oracle/oradata/BLACK/datafile/o1_mf_u sers_6dbrxhmw_.dbf
5 Full 1026946 29-OCT-10 /u01/app/oracle/oradata/BLACK/datafile/o1_mf_example_6dbrzqon_.dbf
BS Key Size Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
227 436.00K DISK 00:00:00 29-OCT-10
BP Key: 233 Status: AVAILABLE Compressed: YES Tag: TAG20101029T220213
Piece Name: /u01/app/oracle/backup/WHITE/06lrmpj6_1_1
List of Archived Logs in backup set 227
Thrd Seq Low SCN Low Time Next SCN Next Time
---- ------- ---------- --------- ---------- ---------
1 19 1026677 29-OCT-10 1027033 29-OCT-10
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
244 Full 9.64M DISK 00:00:00 29-OCT-10
BP Key: 246 Status: AVAILABLE Compressed: NO Tag: TAG20101029T220216
Piece Name: /u01/app/oracle/backup/WHITE/c-417517776-20101029-00
SPFILE Included: Modification time: 29-OCT-10
SPFILE db_unique_name: WHITE
Control File Included: Ckp SCN: 1027229 Ckp time: 29-OCT-10
RMAN> list backup of database for db_unique_name all;
List of Backup Set for database with db_unique_name WHITE
===================
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
185 Full 280.34M DISK 00:01:17 29-OCT-10
BP Key: 204 Status: AVAILABLE Compressed: YES Tag: TAG20101029T220045
Piece Name: /u01/app/oracle/backup/WHITE/05lrmpge_1_1
List of Datafiles in backup set 185
File LV Type Ckp SCN Ckp Time Name
---- -- ---- ---------- --------- ----
1 Full 1026946 29-OCT-10 /u01/app/oracle/oradata/BLACK/datafile/o1_mf_system_6dbrxhcy_.dbf
2 Full 1026946 29-OCT-10 /u01/app/oracle/oradata/BLACK/datafile/o1_mf_sysaux_6dbrxhfx_.dbf
3 Full 1026946 29-OCT-10 /u01/app/oracle/oradata/BLACK/datafile/o1_mf_undotbs1_6dbrxhkt_.dbf
4 Full 1026946 29-OCT-10 /u01/app/oracle/oradata/BLACK/datafile/o1_mf_users_6dbrxhmw_.dbf
5 Full 1026946 29-OCT-10 /u01/app/oracle/oradata/BLACK/datafile/o1_mf_example_6dbrzqon_.dbf
List of Backup Set for database with db_unique_name BLACK
===================
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
363 Full 1.05G DISK 00:01:09 29-OCT-10
BP Key: 383 Status: AVAILABLE Compressed: NO Tag: TAG20101029T220619
Piece Name: /u01/app/oracle/backup/BLACK/09lrmpqs_1_1
List of Datafiles in backup set 363
File LV Type Ckp SCN Ckp Time Name
---- -- ---- ---------- --------- ----
1 Full 967251 27-OCT-10 /u01/app/oracle/oradata/BLACK/datafile/o1_mf_system_6dbrxhcy_.dbf
2 Full 967251 27-OCT-10 /u01/app/oracle/oradata/BLACK/datafile/o1_mf_sysaux_6dbrxhfx_.dbf
3 Full 967251 27-OCT-10 /u01/app/oracle/oradata/BLACK/datafile/o1_mf_undotbs1_6dbrxhkt_.dbf
4 Full 967251 27-OCT-10 /u01/app/oracle/oradata/BLACK/datafile/o1_mf_users_6dbrxhmw_.dbf
5 Full 967251 27-OCT-10 /u01/app/oracle/oradata/BLACK/datafile/o1_mf_example_6dbrzqon_.dbf
Evidemment, cela ne fonctionne que si vous êtes connecté au catalogue RMAN; sinon le message que vous obtiendrez correspond à celui-ci :
RMAN> list backup of database for db_unique_name all;
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of list command at 10/29/2010 22:10:01
RMAN-05037: FOR DB_UNIQUE_NAME option cannot be used in nocatalog mode
Restaurations croisées (Cross Restore)
Pour restaurer une sauvegarde sur un autre serveur, il vous suffit de changer la disponibilité des sauvegardes à l’aide de la commande CHANGE
comme décrite dans la documentation associées; par exemple, supposons que vous mettiez à disposition les sauvegardes de la base BLACK
sur le serveur WHITE
, vous lancerez une commande du type :
change db_unique_name
from black to white;
Vous voilà prêt à restaurer les sauvegardes de l’autre site sur le site local !
1 réflexion sur “Data Guard, RMAN 11g et son catalogue”
Superbe démo, comme d’hab. 😉
AlexB.
Les commentaires sont fermés.