Environment:
Oracle database 10.2.0.5Primary rac+asmstandby single Instance+non-asmcatalogos Oracle Linux 6
1. Recently encountered a small problem, on the standby connection controlfile for the full library backup, after the completion of the backup, through the list Bakcup, the query to the data file path is "u01/data/****"
[$ rman target /recovery manager: release 10.2.0.5.0 - production on Mon Sep 5 15:39:55 2016Copyright (c) 1982, 2007, oracle. All rights reserved.connected to target database: ORA10G (dbid= 4146617466, not open) rman> backup database; Starting backup at 05-sep-16using target database control file instead of recovery catalogallocated channel: ora_disk_1channel ora_disk_1: sid= 160 devtype=diskchannel ora_disk_1: starting full datafile backupsetchannel ora_disk_1: specifying datafile (s) in backupsetinput datafile fno=00001 name=/u01/data/datafilesystem.259.827745351input datafile fno=00002 name=/u01/data/ datafileundotbs1.260.827745359input datafile fno=00004 name=/u01/data/datafileundotbs2.263.827745369input datafile fno=00003 name=/u01/data/ datafilesysaux.261.827745363input datafile fno=00005 name=/u01/data/datafileusers.264.827745371 ...... finished backup at 05-sep-16rman> list backup; list of backup sets===================bs key type lv size device Type elapsed time completion time------- ---- -- ---------- ---------- - ------------ ---------------5 full 202.54m disk 00:00:11 05-sep-16bp key: 5 status: available compressed: no tag: tag20160905t152357piece name: /u01/app/database/dbs/06rf26kf_1_1list of datafiles in backup set 5file lv type ckp scn ckp time name---- -- ---- ------ ---- --------- ----1&NBSP;FULL&NBSP;345345&NBSP;05-SEP-16&NBsp;/u01/data/datafilesystem.259.8277453512 full 345345 05-sep-16 /u01/data/ datafileundotbs1.260.8277453593 full 345345 05-sep-16 /u01/data/ datafilesysaux.261.8277453634 full 345345 05-sep-16 /u01/data/ datafileundotbs2.263.8277453695 full 345345 05-sep-16 /u01/data/ Datafileusers.264.827745371 <<<<<<<<<<<<<<<<</u01/data /
2. But after connecting to catalog, and sync, the path to the discovery data file becomes "+data/ora10g/datafile/***", this is the actual path to the primary database.
$ rman target / catalog rman/[email protected]rman> list backup;bs Key Type LV Size Device Type Elapsed Time Completion Time------- ---- -- ---------- ----------- ------------ ---------------157 Full 202.54m disk 00:00:11 05-sep-16bp key: 159 status: available compressed: no tag: tag20160905t152357piece name: /u01/app/database/dbs/ 06rf26kf_1_1list of datafiles in backup set 157file lv type ckp scn ckp time name---- -- ---- ---------- --------- ----1 full 345345 05-sep-16 +data/ora10g/datafile/system.259.8277453512 full 345345 05 -sep-16 +data/ora10g/datafile/undotbs1.260.8277453593 full 345345 05-sep-16 +data/ ora10g/datafile/sysaux.261.8277453634 full 345345 05-sep-16 +data/ora10g/datafile/undotbs2.263.8277453695 full 345345 05-sep-16 +data/ora10g/datafile/users.264.827745371
3. Why is this happening?
This problem is due to the standby database creation process, standby does not make and primary the same ASM storage, and ASM path, but instead uses the file system to store the datafile.
This will involve the Db_file_name_convert and log_file_name_convert two parameters.
In fact, in standby Controlfile, the record name of the data file and the archive log file still exists as "+data/ora10g/datafile/***".
Only the time of each visit, in standby, will be converted by default through the parameters Db_file_name_convert and Log_file_name_convert.
In this way, all we see is "u01/data/****".
4. Back to our question, because the catalog gets all the information in control file, and there is no conversion of db_file_name_convert and Log_file_name_convert, so, in the catalog, the data file that is seen , even if backed up by standby, is still stored with the name "+data/ora10g/datafile/***".
When the catalog is not connected, through the list Bakcup query, you will find that parameters Db_file_name_convert and Log_file_name_convert in which to intervene. The result of the query is "u01/data/****".
Here we can experiment to prove whether it is the output of the results of Db_file_name_convert and Log_file_name_convert effects
5. We cancel the settings of the parameters Db_file_name_convert and Log_file_name_convert, and then, on a local, control file connection to Rman for query, the results are as follows:
$ rman target /rman> list backup;using target database control file instead of recovery cataloglist of backup sets================== =bs key type lv size device type elapsed time completion Time------- ---- -- ---------- ----------- ------------ ---------------8 full 202.54m disk 00:00:06 05-sep-16bp key: 8 status: available Compressed: no tag: tag20160905t154014piece name: /u01/app/database/dbs/09rf27iu_1_ 1list of datafiles in backup set 8file lv type ckp scn Ckp time name---- -- ---- ---------- --------- ----1 full 345345 05-sep-16 +data/ora10g/datafile/system.259.8277453512 full 345345 05-sep-16 + Data/ora10g/datafile/undotbs1.260.8277453593 full 345345 05-sep-16 +data/ora10g/datafile/sysaux.261.8277453634 full 345345 05-sep-16 +data/ora10g/datafile/undotbs2.263.8277453695 full 345345 05-sep-16 +data/ora10g/datafile/users.264.827745371 <<<<<<<<<<<< < without db_file_name_convert intervention, the result is "+data/ora10g/datafile/***" bs key type lv size Device type elapsed time completion time------- ---- -- ---------- ----------- ------------ ---------------9 full 14.64m disk 00:00:01 05-sep-16bp key: 9 status: available compressed: no tag: tag20160905t154014piece name: /u01/app/database/dbs/0arf27j5_1_1standby control file included: ckp scn: 345345 ckp time: 05-sep-16spfile included: Modification time: 05-sep-16
6. The above experiment shows that the backup on standby is identical to the main library. You can also restore directly to the primary database via standby backup. Only when the list backup is displayed, the results are different due to db_file_name_convert intervention.
7. In fact, we can also query V$datafile to see if db_file_name_convert affects the output of the data file name:
In the case of Db_file_name_convert settings, query the standby database
Sql> select name from V$datafile; NAME------------------------------/u01/data/datafilesystem.259.827745351/u01/data/ datafileundotbs1.260.827745359/u01/data/datafilesysaux.261.827745363/u01/data/datafileundotbs2.263.827745369/ u01/data/datafileusers.264.827745371
Querying the standby database without setting the parameter Db_file_name_convert
Sql> select name from V$datafile; NAME--------------------------------+data/ora10g/datafile/system.259.827745351+data/ora10g/datafile/ undotbs1.260.827745359+data/ora10g/datafile/sysaux.261.827745363+data/ora10g/datafile/undotbs2.263.827745369+ data/ora10g/datafile/users.264.827745371
This article is from the "Small Kennel" blog, please make sure to keep this source http://hsbxxl.blog.51cto.com/181620/1846477
List Bakcup different display problems in the catalog