oracle数据库临时表空间损坏,报错ORA-01116,ORA-01110 ,ORA-27041,ORA-06512的解决方式

 

打脚本的时候报错:

ORA-01116:打开数据库文件203时出错

ORA-01110:数据文件203: '/u01/app/oracle/oradata/temp02.dbf'

ORA-27041:无法打开文件Linux-x86_64 Error: 2: No such file or directory Additional information: 3

ORA-06512:在line 9

 

 

       是我们环境的临时表空间损坏了,oracle数据库的临时表空间是用来存放用户的临时数据,临时数据在需要时被覆盖,关闭数据库后自动删除,其中不能存放永久临时性数据。

临时表空间损坏有两种方式解决:

1.通过alter database 命令将用户切换到这个新的临时表空间

2.创建一个新的临时表空间

 

 

方法一:

查看现有临时表空间情况:

select * from dba_temp_files;

 

将临时表空间temp02的表空间文件切换成temp02.dbf,开启表空间自增长:

alter tablespace temp02 add tempfile 'temp02.dbf的绝对路径' size 100m AUTOEXTEND ON;

将原来的temp表空间文件offline:

alter database tempfile '原来的temp表空间文件的绝对路径' offline;

drop原来的temp表空间文件:

alter database tempfile '原来的temp表空间文件的绝对路径' drop;

 

然后重启数据库,报错解决。

 

 

方法二:

创建temp1新的表空间:

create temporary tablespace temp1 tempfile 'temp1.dbf的绝对路径' size 100m AUTOEXTEND ON;

将临时表空间切到temp1:

alter database default temporary tablespace temp1;

将原来的temp表空间文件offline:

alter database tempfile '原来的temp表空间文件的绝对路径' offline;

drop原来的temp表空间文件:

alter database tempfile '原来的temp表空间文件的绝对路径' drop;

 



 

参考网站:http://blog.itpub.net/27575921/viewspace-2120669/

posted @ 2023-07-25 11:12  小胡要加油  阅读(1189)  评论(0编辑  收藏  举报