Source DiskGroup - +ASM
Target Diskgroup - +DGFAIL
SYS@DEEPDB>ALTER DATABASE DATAFILE '+ASM/deepdb/datafile/users.259.631107019' OFFLINE;
Database altered.
SYS@DEEPDB>
========================================================================
C:\>rman target /
Recovery Manager: Release 10.2.0.1.0 - Production on Mon Sep 3 12:06:03 2007
Copyright (c) 1982, 2005, Oracle. All rights reserved.
connected to target database: DEEPDB (DBID=3027735554)
======================================
RMAN> COPY DATAFILE '+ASM/deepdb/datafile/users.259.631107019' TO '+DGFAIL';
Starting backup at 03-SEP-07
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=131 devtype=DISK
channel ORA_DISK_1: starting datafile copy
input datafile fno=00004 name=+ASM/deepdb/datafile/users.259.631107019
output filename=+DGFAIL/deepdb/datafile/users.260.632318885 tag=TAG20070903T120801 recid=2 stamp=632318886
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:08
Finished backup at 03-SEP-07
RMAN>
====================================================
SYS@DEEPDB>ALTER DATABASE RENAME FILE '+ASM/deepdb/datafile/users.259.631107019' TO '+DGFAIL/deepdb/datafile/users.260.632318885';
Database altered.
SYS@DEEPDB>
=================================================
RMAN> SWITCH DATAFILE '+DGFAIL/deepdb/datafile/users.260.632318885' TO COPY;
datafile 4 switched to datafile copy "+DGFAIL/deepdb/datafile/users.260.632318885"
RMAN>
=================================================
RMAN> recover datafile '+DGFAIL/deepdb/datafile/users.260.632318885';
Starting recover at 03-SEP-07
using channel ORA_DISK_1
starting media recovery
media recovery complete, elapsed time: 00:00:06
Finished recover at 03-SEP-07
RMAN>
====================================================
SYS@DEEPDB>ALTER DATABASE DATAFILE '+DGFAIL/deepdb/datafile/users.260.632318885' ONLINE;
Database altered.
SYS@DEEPDB>select name from v$datafile;
NAME
---------------------------------------------------------------------------------------------
+ASM/deepdb/datafile/system.256.631107019
+ASM/deepdb/datafile/undotbs1.258.631107019
+ASM/deepdb/datafile/sysaux.257.631107019
+DGFAIL/deepdb/datafile/users.260.632318885
SYS@DEEPDB>
=====================================================
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment