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

Home -> Community -> Usenet -> c.d.o.server -> Re: How can I change the path to a datafile

Re: How can I change the path to a datafile

From: Daniel Morgan <damorgan_at_x.washington.edu>
Date: Tue, 27 Jan 2004 08:42:10 -0800
Message-ID: <1075221667.640814@yasure>


Karl Hahn wrote:
> Hi,
>
> I have inserted a datafile using
>
> alter TABLESPACE XXXX add datafile
> '/path/to/oracle/oradata/mydb/x_blob5.dbf'
> SIZE 1000M REUSE AUTOEXTEND ON NEXT 200M MAXSIZE 8000M
>
> How can I change the path to this file in Oracle
> (e.g., file has moved to /new/path/oradata/mydb/x_blob5.dbf)?
> Where in the system tables is this information stored (Ora 8.1.7)?
>
> Bye and thank you in advance,
> Charlie

ALTER TABLESPACE <tablespace_name> OFFLINE;

ALTER TABLESPACE <tablespace_name> RENAME <original_datafile_path_and_name> TO <new_datafile_path_and_name>;

use the operating system to copy the datafile to its new location

ALTER TABLESPACE <tablespace_name> ONLINE;

Do not delete the original copy of the datafile until you are sure of success. Just leave it alone.

-- 
Daniel Morgan
http://www.outreach.washington.edu/ext/certificates/oad/oad_crs.asp
http://www.outreach.washington.edu/ext/certificates/aoa/aoa_crs.asp
damorgan_at_x.washington.edu
(replace 'x' with a 'u' to reply)
Received on Tue Jan 27 2004 - 10:42:10 CST

Original text of this message

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