- Move Tablespace Tempfile
SQL> select file_name, status from dba_temp_files; FILE_NAME STATUS -------------------------------- ------- /u01/oradata/temp01.dbf ONLINE
Offline the tempfile
SQL> alter database tempfile '/u01/oradata/temp01.dbf' offline; Database altered.
Copy the offline tempfile to new location
SQL> !cp -p /u01/oradata/temp01.dbf /u02/oradata/temp01.dbf;
Rename the Tempfile to new location
SQL> alter database rename file '/u01/oradata/temp01.dbf' to '/u02/oradata/temp01.dbf'; SQL> select file_name, status from dba_temp_files; FILE_NAME STATUS ------------------------------- ------- /u02/oradata/temp01.dbf OFFLINE
Online the temp file
SQL> alter database tempfile '/u02/oradata/temp01.dbf' online; Database altered. SQL> select file_name, status from dba_temp_files; FILE_NAME STATUS ------------------------------- ------- /u02/oradata/temp01.dbf ONLINE
Remove the old tempfile
SQL> !rm -f /u01/oradata/temp01.dbf
0 留言