How to Copy ASM datafile From Primary Database to Standby Database on ASM
RMAN>copy datafile '+DATA/orcl/datafile/users.278.658933000' to '/tmp/backup_file.dbf'
On Primary database: –
Step 1:- Take a copy of the file to normal file system
RMAN>copy datafile ‘+DATA/orcl/datafile/users.278.658933000’ to ‘/tmp/backup_file.dbf’
On Stanbdy :-
Step 2
SQL> Shutdown immediate;
SQL> startup mount ( Note we are not starting the recovery)
Step 3
This will give you the location of the file.(Note it down)
Step 4:- Catalog datafilecopy on Standby using Rman
Rman > Catalog datafilecopy ‘/tmp/backup_file.dbf’ ;
Step 5
Rman > Connect target
Rman> copy datafile ‘/tmp/backup_file.dbf’ to ‘+DATA’
This will report the new location/name of the original file 15.
Step 6
Go to sqlplus on standby database
SQL> Select name from v$datafile where file#=
We would issue rename command to point to the new location of the file.
However we would need to set standby_file_management=manual temporarily for this operation.
SQL>Alter system set standby_file_management=manual scope=spfile ;
SQL> Alter database rename file ‘
reported in step3 after copy datafile command>’
For example
SQL>
Alter database rename file ‘+DATA/orcl/datafile/users.278.658933000’ to
‘+DATA/orcl/datafile/users.278.658933175’ ;
SQL> Alter system set standby_file_management=auto scope=spfile ;
Responses