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: Moving datafile

Re: Moving datafile

From: <alt_at_interchange.co.uk>
Date: Tue, 29 Dec 1998 11:53:20 GMT
Message-ID: <76afrg$ea0$1@nnrp1.dejanews.com>


Doug

To move a tablespace log in as SYSTEM and perform the following steps. You may want to do this after a backup or take a backup before you begin.

  1. Take your tablespace offline:

SQL> alter tablespace tablespace_name offline;

2) Copy the datafile to the new location

3) Tell Oracle the files moved:

SQL> alter tablespace tablespace_name rename datafile 'oldpath/filename.dbf'
to
'newpath/filename.dbf';

4) Bring the tablespace back online:

SQL> alter tablespace tablespace_name online;

5) Check everythings okay:

SQL> select tablespace_name,file_name from dba_data_files;

6) Remove old file from old location.

Regards

Alistair Thomson

In article <3688846C.BA79CF86_at_i84.net>,   Doug Cowles <dcowles_at_i84.net> wrote:
> Another question - can someone outline basic
> steps for moving a datafile without bringing
> the database down? Running out of space on
> filesystem.
>
> - Dc.
>
>

-----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own Received on Tue Dec 29 1998 - 05:53:20 CST

Original text of this message

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