Wednesday, August 29, 2007

Tempfile create, add and drop

(1) Make two files - this way ensures that the actual space is allocated in OS.


mkfile 6G /ora01/oraredo/TESTDB/temp01_02.dbf

mkfile 6G /ora02/oraredo/TESTDB/temp01_03.dbf


(2) Add the files to the temp tablespace temp01


alter tablespace temp01 add tempfile '/ora01/oraredo/TESTDB/temp01_02.dbf' reuse;


alter tablespace temp02 add tempfile '/ora02/oraredo/TESTDB/temp01_03.dbf' reuse;


(3) Drop the tempfile temp01_01.dbf


alter database tempfile '/ora03/oradata/TESTDB/temp01_01.dbf' drop;

No comments: