Could anyone tell me if tempfile could be renamed.
I am confused because sts and otn says they could be renamed while ILT says - You cannot rename a tempfile(p235)
Thanks
Printable View
Could anyone tell me if tempfile could be renamed.
I am confused because sts and otn says they could be renamed while ILT says - You cannot rename a tempfile(p235)
Thanks
how about try it yourself instead of read what book says
I have done that several times like this:
Assume that in 9i your default temporary tablespace is called TEMP and the tempfile is called '/u03/oradata1/temp01.dbf' so that TEMP is the default temporary tablespace for the database.
1. CREATE TEMPORARY TABLESPACE temp2
TEMPFILE '/u03/oradata1/temp02.dbf' size 5M
EXTENT MANAGEMENT LOCAL UNIFORM SIZE 1M;
2. ALTER DATABASE DEFAULT TEMPORARY TABLESPACE temp2;
3. DROP TABLESPACE temp;
4. CREATE TEMPORARY TABLESPACE temp
TEMPFILE '/u03/oradata1/new_name.dbf' size 1024M
AUTOEXTEND ON NEXT 256M MAXSIZE 4096M
EXTENT MANAGEMENT LOCAL UNIFORM SIZE 1M;
5. ALTER DATABASE DEFAULT TEMPORARY TABLESPACE temp;
6. DROP TABLESPACE temp2;
Remove '/u03/oradata1/temp01.dbf' and '/u03/oradata1/temp02.dbf'
from disk.