Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: [Q] how to online drop tempfile???
Howard J. Rogers wrote:
> Mark Bole wrote:
>
>
>>Howard J. Rogers wrote: >> >> >>>aaa wrote: >>> >>> >>> >>> >>>>If I use same command when database open. It will >>>>hang in there for ever. >>>> >>>>Can anyone tell me how to drop tempfile when database >>>>open? >>>> >>>>Thanks. >>> >>> >>>You only can't drop it because it is the default temporary tablespace for >>>the database. Not unnaturally, you can't get rid of something which is >>>the fall-back default. >>> >>>Therefore the answer is simple: create a new temporary tablespace, make >>>that the default, and then you can drop the original. Something like: >>> >>>create temporary tablespace temp2 tempfile....; >>>alter database default temporary tablespace temp2; >>>drop tablespace temp1; >>> >>>Regards >>>HJR >> >>Simpler than that... no need to alter default or drop/recreate tablespace. >> >>Just add a new tempfile to the existing temp tablespace, then drop the >>old tempfile. >> >>--Mark Bole
Sorry for the delay. vacation-induced. I'll try not to make that mistake again! ;-)
alter database tempfile '/u01/oradata/xxx/temp03.dbf' drop; alter tablespace temp add tempfile '/u01/oradata/zzz/temp08.dbf';
No accounting for syntax consistency .... "drop this_thing", "this_thing drop", "add this_thing" (at least, no "this_thing add")
--Mark Bole Received on Sun Sep 12 2004 - 21:43:36 CDT