Re: Is it possible to rename/move datafile online - possibly under RMAN?

  • From: "John Darrah" <darrah.john@xxxxxxxxx>
  • To: drp4kri@xxxxxxxxx
  • Date: Thu, 8 Nov 2007 09:17:23 -0700

No way to do this entirely online but you can minimize downtime by
following these steps
1) SQL> alter tablespace <TS name> begin backup;
2) $ cp <old name> <new name>;
2.5) SQL> alter tablespace <TS name> end backup;
3) SQL> alter database datafile <old name> offline;
4) SQL> alter database rename file <old name> to <new name>;
5) SQL> recover datafile <new name>;
6) SQL> alter database datafile <new name> online;

During steps 3 through 5 the datafile is offline but only for the
amount of time it takes to recover the datafile.  I'm sure you could
do the same through RMAN using copy, switch, and recover commands as
well.  Using RMAN would also mean you wouldn't need to  use the begin
backup and end backup commands but you would still need to take the
file offline for the switch and recover operations.

On Nov 7, 2007 2:14 PM, Dhimant Patel <drp4kri@xxxxxxxxx> wrote:
> Hi,
>
> I need to move certain datafiles to another partition which is recently made
> available. I can move/rename files after taking them offline - although I
> would prefer if RMAN can do this while the file is online!
>
> Is there such way of moving files? A quick look at RMAN commands doesn't
> offer any clue.
>
> -Thanks,
> DP.
--
//www.freelists.org/webpage/oracle-l


Other related posts: