Method 1: Using RMAN
Step 1: Start RMAN and connect to the target database. Step 2: Generate a report that shows the names of the datafiles. RMAN> REPORT SCHEMA; RMAN> BACKUP AS COPY DATAFILE '+DG_DEVSYS_mydb1_FLASH_01/mydb1/datafile/data01.290.709985421' FORMAT '+DG_DEVSYS_mydb1_DATA_01'; Step 5: Point the control file to the newly created copy of the datafile Step 6: Recover the renamed datafile Step 7. Bring the datafile online. Step 8. Delete the old datafile |
Reference: http://download.oracle.com/docs/cd/B28359_01/backup.111/b28270/rcmasmmi.htm
Method 2: Using ASMCMD CP ( Copy ) Command
Step 1: Start RMAN and connect to the target database. Step 2: Generate a report that shows the names of the datafiles. RMAN> REPORT SCHEMA; Step 3: Bring the Datafile Offline ASMCMD [+] > cp +DG_DEVSYS_mydb1_FLASH_01/mydb1/datafile/data01.290.709985421 +DG_DEVSYS_mydb1_DATA_01 Step 5: After copied datafile, then rename file in database. With ASM(OMF) this delete old datafile. alter database rename file '+DG_DEVSYS_mydb1_FLASH_01/mydb1/datafile/data01.290.709985421' to '+DG_DEVSYS_mydb1_DATA_01/mydb1/datafile/data01.272.764459767' Step 6: Recover the renamed datafile Step 7. Bring the datafile online. |
Method 3: Using RMAN Copy
Step 1: Restrict the Session ALTER SYSTEM enable restricted session; Step 2: Bring the Datafile Offline alter database datafile '+DG_DEVSYS_mydb1_FLASH_01/mydb1/datafile/data01.290.709985421' offline Step 3: Start RMAN and connect to the target database. Step 4: RMAN Copy datafile Step 5: After copied datafile, then rename file in database. With ASM(OMF) this delete old datafile. alter database rename file '+DG_DEVSYS_mydb1_FLASH_01/mydb1/datafile/data01.290.709985421' to '+DG_DEVSYS_mydb1_DATA_01/mydb1/datafile/data01.272.764459767' Step 6: Recover the renamed datafile Step 7. Bring the datafile online. Step 8: Verify the file name ALTER SYSTEM disable restricted session; |
No comments:
Post a Comment