ORA-25153暫存資料表空間為空白

來源:互聯網
上載者:User

上午老總過來說暫存資料表空間為空白,讓我過去看看。我一看報ORA-25153,這一定是暫存資料表空間邏輯名還在,但是找不到臨時檔案的原因。

解決方案:

1、查詢暫存資料表空間狀態狀態

select tablespace_name,status from dba_tablespaces;

TABLESPACE_NAME                STATUS

 ------------------------------ ---------

 SYSTEM                        ONLINE

 UNDOTBS1                      ONLINE

 SYSAUX                        ONLINE

 TEMP                          ONLINE

 USERS                          ONLINE

 TEST_TBS                      ONLINE

 TEST_TBS_TEMP                  ONLINE

說明資料表空間是線上的

2、查詢暫存資料表空間檔案

select tablespace_name,file_name from dba_temp_files;

未選定行

說明已經找不到物理檔案了

3、alter database  default temporary tablespace temp;

執行此命令後會報ORA-12907: 資料表空間 TEMP 已經是預設的暫存資料表空間

這就說明暫存資料表空間丟失了資料檔案

4、我們添加一個臨時檔案給它

alter tablespace temp add tempfile '/opt/Oracle/oradata/temp02.dbf' size  512m autoextend on;

5、我們查看一下檔案是否建立成功

select tablespace_name,file_name from dba_temp_files;

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.