Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Moving datafile
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.
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