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: move a datafile from a filesystem to another

RE: move a datafile from a filesystem to another

From: Darrell Landrum <DLANDRUM_at_zalecorp.com>
Date: Wed, 21 May 2003 15:06:40 -0800
Message-ID: <F001.0059F435.20030521150640@fatcity.com>


During a period when no users will be trying to access the tablespace, I normally will use the following...
Assume a tablespace name of WORK_DATA.

Assume 2 files in WORK_DATA:
/u01/oradata/WORK/work_data01.dbf
/u01/oradata/WORK/work_data02.dbf

Now, we want to move work_data02.dbf to /u02.

  1. In sqlplus "alter tablespace WORK_DATA offline normal;"
  2. mv /u01/oradata/WORK/work_data02.dbf /u02/oradata/WORK/
  3. In sqlplus "alter database rename datafile '/u01/oradata/WORK/work_data02.dbf' to '/u02/oradata/WORK/work_data02.dbf';"
  4. In sqlplus "alter tablespace WORK_DATA online;"

Please, please use with caution, big potential for data loss here if any typos, errors, etc.. Some might recommend copying the file rather than moving it so if any problems you still have the original (I can't argue with this).

>>> LeydenJ_at_MTA.NET 05/21/03 05:16PM >>>
which command do I use to move an oracle datafile from one filesystem to another filesystem? I understand the db is to be up in restrict mode.

TIA

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net 
-- 
Author: Leyden, Joseph
  INET: LeydenJ_at_MTA.NET 

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com 
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Darrell Landrum
  INET: DLANDRUM_at_zalecorp.com

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Wed May 21 2003 - 18:06:40 CDT

Original text of this message

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