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 datafiles

Re: moving datafiles

From: Chuck <chuckh_nospam_at_softhome.net>
Date: 18 Feb 2004 17:14:08 GMT
Message-ID: <Xns94937C7777BA4chuckhsofthomenet@130.133.1.4>


"Howard J. Rogers" <hjr_at_dizwell.com> wrote in news:402d55ab$0$5870$afc38c87_at_news.optusnet.com.au:

> No, they don't actually. The documents say 'you can move a read-only
> tablespace onto a read-only medium' -but that doesn't mean 'you can
> *immediately and without prior action on your part* move a read-only
> tablespace'. There was a mistaken logical leap from the words in the
> documentation to the idea that you didn't have to bother with
> offlining the thing first.

Actually the documentation makes that leap, completely bypassing the step of offlining the tablespace (which is what I was trying to avoid).

From the 8i docs on ALTER TABLESPACE READ ONLY:

"Once a tablespace is read only, you can copy its files to read-only media. You must then rename the datafiles in the control file to point to the new location by using the SQL statement ALTER DATABASE ... RENAME. "

Then if you hit the link to the ALTER DATABASE, there is again no mention needing to offline the tablespace.

"RENAME FILE
Use the RENAME FILE clause to rename datafiles, tempfiles, or redo log file members. This clause renames only files in the control file. It does not actually rename them on your operating system. You must specify each filename using the conventions for filenames on your operating system before specifying this clause. Do not use this clause when the database is mounted. "

> Seconds. He can copy something which is read-only, at any time. He
> only has to issue the 'alter tablespace X offline' and 'alter database
> rename 'x' to 'y'' commands when he's ready. And they will return
> practically instantly.

Maybe even milliseconds, which is much better than the other method.

-- 
Chuck
Remove "_nospam" to reply by email
Received on Wed Feb 18 2004 - 11:14:08 CST

Original text of this message

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