| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> Re: best way to move datafile?
I'd agree that either work.
However, as listed, neither of these procedures is correct. The problem is the timing of the OS copy. The tablespace should be offline when the copy is done.
Here is the correct sequences
shutdown the database & startup mount but not open
do an OS copy of the datafile to new location
alter database rename file "oldname' 'newname'
alter database open
backup the controlfile
OS delete the original file
alter tablespace "name" offline
OS copy the file to new location
alter tablespace rename datafile 'oldname' 'newname'
alter tablespace 'name' online
backup the controlfile
OS delete the original file
"Glen A. Sromquist" wrote:
> A datafile can be moved by either of the following procedures correct?
>
> do an OS copy of the datafile to new location
> shutdown the database & startup mount but not open
> alter database rename file "oldname' 'newname'
> alter database open
> backup the controlfile
> OS delete the original file
>
> OS copy the file to new location
> alter tablespace "name" offline
> alter tablespace rename datafile 'oldname' 'newname'
> alter tablespace 'name' online
> backup the controlfile
> OS delete the original file
>
> (of course a full backup was done beforehand...)
>
> both proc's achieve the same result - which is preferable? With the alter
> tablespace proc the process happens without an outage.
>
> Like to hear some opinions on this....
Received on Tue Feb 27 2001 - 16:55:39 CST
![]() |
![]() |