出现情况:
既是某个临时文件在数据库启动时不可用,数据库仍然能够被打开。不过,DBWn进程会在告警日志中写下一条消息。当某个会话请求一些临时空间时,问题才会显现出来。
解决方法:
既然无法备份临时文件,那么怎么样才能还原临时文件呢?答案是虽然无法备份临时文件,但是可以重建临时文件。
方法一(数据文件级别上操作):
1)在受损的临时表空间内添加另一个临时文件。
2)将受损的临时文件脱机。
3)删除受损的临时文件
命令:
ocp10g> alter tablespace temp_ts3 add tempfile 'C:\TEMPFILES\TS3-2.DBF' size 100m;
ocp10g> alter database tempfile 'C:\TEMPFILES\TS3-1.DBF' offline;
ocp10g> alter database tempfile 'C:\TEMPFILES\TS3-1.DBF' drop;
方法二(表空间级别上操作):
1)创建一个新的临时表空间。
2)通过ALTER DATABASE命令将用户切换到这个新的临时表空间。
3)删除受损的临时表空间。
命令:
ocp10g> create temporary tablespace temp_ts4 tempfile 'C:\TEMPFILES\TS4-1.DBF' size 100m;
ocp10g> alter database default temporary tablespace temp_ts4;
ocp10g> drop tablespace temp_ts3 including contents and datafiles;
既是某个临时文件在数据库启动时不可用,数据库仍然能够被打开。不过,DBWn进程会在告警日志中写下一条消息。当某个会话请求一些临时空间时,问题才会显现出来。
解决方法:
既然无法备份临时文件,那么怎么样才能还原临时文件呢?答案是虽然无法备份临时文件,但是可以重建临时文件。
方法一(数据文件级别上操作):
1)在受损的临时表空间内添加另一个临时文件。
2)将受损的临时文件脱机。
3)删除受损的临时文件
命令:
ocp10g> alter tablespace temp_ts3 add tempfile 'C:\TEMPFILES\TS3-2.DBF' size 100m;
ocp10g> alter database tempfile 'C:\TEMPFILES\TS3-1.DBF' offline;
ocp10g> alter database tempfile 'C:\TEMPFILES\TS3-1.DBF' drop;
方法二(表空间级别上操作):
1)创建一个新的临时表空间。
2)通过ALTER DATABASE命令将用户切换到这个新的临时表空间。
3)删除受损的临时表空间。
命令:
ocp10g> create temporary tablespace temp_ts4 tempfile 'C:\TEMPFILES\TS4-1.DBF' size 100m;
ocp10g> alter database default temporary tablespace temp_ts4;
ocp10g> drop tablespace temp_ts3 including contents and datafiles;
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/11411056/viewspace-733731/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/11411056/viewspace-733731/