Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: Can Missing Tempfiles be Simply ADDED back after eXtract of FULL Database Backup ?
Hi Greg, Folks
What did you mean by the word "sparse" in your statement "when the file isn't already present, in order to prevent it from being created sparse under *nix"
What are the advantages of NOT having a sparse tempfile?
Thanks indeed
From: oracle-l-bounce_at_freelists.org
[mailto:oracle-l-bounce_at_freelists.org] On Behalf Of Greg Norris
Sent: Wednesday, October 25, 2006 6:06 PM
To: oracle-l_at_freelists.org
Subject: Re: Can Missing Tempfiles be Simply ADDED back after eXtract of
FULL Database Backup ?
On 10/25/06, VIVEK_SHARMA <VIVEK_SHARMA_at_infosys.com> wrote:
Can Missing Tempfiles be Simply ADDED with the SAME NAME after eXtract of FULL Database Cold Backup?
...
SQL> ALTER TABLESPACE <Temp Tblspc> ADD TEMPFILE '<Temp File Name>' REUSE;
Yes, this works just fine (last verified under 9iR2). You only need to specify REUSE, of course, if the file already exists.
I tend to use the following song-and-dance when the file isn't already present, in order to prevent it from being created sparse under *nix. Not strictly required, by any means, but it makes space management (at the filesystem level) somewhat simpler.
create tablespace temp2
datafile '/blah/blah/mytempfile.dbf' size ???m
extent management local uniform size ??m;
drop tablespace temp2;
alter tablespace temp
add tempfile '/blah/blah/mytempfile.dbf' size ???m reuse;
--
"I'm too sexy for my code." - Awk Sed Fred.