RMAN Switch command script to rename the datafile

advertisements

_____________________________________________________________________________________________________________________

The Eucharistic Miracles of the World
Overview: RMAN switch command is equivalent to the alter database rename file. By default the RMAN will restore the file to the original location of the file and it will overwrite the file already present in the original location. If you wanted to restore a datafile to different location you need to run “set rename” command.
rman target /
RMAN > run {
copy datafile '/data/oracle/oradata/proddb9/test.dbf' TO '/data/oracle/oradata/backup/test.dbf';
set newname for datafile '/data/oracle/oradata/proddb9/test.dbf' to '/data/oracle/oradata/backup/test.dbf’;
switch datafile all;
host 'rm /data/oracle/oradata/proddb9/test.dbf ';
}

_____________________________________________________________________________________________________________________

A visitor from Navi mumbai viewed 'ORA-00059: maximum number of DB_FILES exceeded - F' 27 mins ago
A visitor from Olathe viewed 'Will IGNORE=Y Option Work with Data Pump IMPDP' 1 hr 48 mins ago
A visitor from Irvine viewed '5 Different Methods to Partition a non partitioned' 3 hrs 23 mins ago
A visitor from St petersburg viewed 'How to Increase, Decrease or Resize FRA(Flash Reco' 4 hrs 11 mins ago
A visitor from Recife viewed 'Create PFILE SPFILE from memory 11g New Feature' 5 hrs 57 mins ago

0 comments:

Post a Comment

Labels

Oracle (629) Script (86) General (77) Unix (47) Blog (23) Technology (19) gadget (6) games (6) Business (3) OCI (3) SQL* Loader (3) Datapump (2)
 

acehints.com Copyright 2011-25 All Rights Reserved | Site Map | Contact | Disclaimer