Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Is it possible to rename/move datafile online - possibly under RMAN?

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

From: John Darrah <darrah.john_at_gmail.com>
Date: Thu, 8 Nov 2007 09:17:23 -0700
Message-ID: <ec40ac060711080817l515ad759p46f648af8d9a4da4@mail.gmail.com>


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_at_gmail.com> 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.

--
http://www.freelists.org/webpage/oracle-l
Received on Thu Nov 08 2007 - 10:17:23 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US