May 19, 2008

TEMP tablspace and tempfile

When backup,restore,revocer database , tempfile can be excluded .
TEMP tablespace alway in no-logging mode and no checkpoints.

When move a database from one A machine to B machine with difference disk label and file directory, tempfile can be bypass to copy from A machine to B machine.

The solution is to drop the tempfile and recreate it, while keeping the TEMP tablespace:

SQL> alter database tempfile 'D:\oracle\oradata\Amar\temp01.dbf' drop including datafiles;

Database altered.

Physically delete that file from the path.

SQL> alter tablespace temp add tempfile 'D:\oracle\oradata\Amar\temp01.dbf' size 100 m;

0 意見: