替換臨時表空間

2022-05-26 17:00:16 字數 844 閱讀 8986

1:檢視舊臨時表空間資訊 

set pagesize 999

set linesize 160

col property_name for a26

col property_value for a18

select property_name, property_value from database_properties where property_name='default_temp_tablespace';

set pagesize 999

set linesize 160

col username for a30

col temporary_tablespace for a18

select username, temporary_tablespace from dba_users;

2:建立中轉的臨時表空間 

create temporary tablespace temp02 tempfile '/data/orcl/temp_01.dbf' size 8g autoextend on maxsize 30g;

3:切換臨時表空間。

alter database default temporary tablespace temp02;

4:重新指定使用者臨時表空間為新建的臨時表空間 

select 'alter user '|| username ||' temporary tablespace temp02 ;' from dba_users;

5:刪除舊的臨時表空間資料檔案 

drop tablespace temp including contents and datafiles;

臨時表空間

臨時表空間 1.什麼是臨時表空間 在oracle資料庫中進行排序 分組彙總 索引等到作時,會產生很多的臨時資料。如有一張員工資訊表,資料庫中是安裝記錄建立的時間來儲存的。如果使用者查詢時,使用order by排序語句指定按員工編號來排序,那麼排序後產生的所有記錄就是臨時資料。對於這些臨時資料,ora...

Oracle臨時表空間

oracle臨時表空間主要是用來做查詢和存放一些快取的資料的,磁碟消耗的乙個主要原因是需要對查詢的結果進行排序,如果沒有猜錯的話,在磁碟空間的 記憶體 的分配上,oracle使用的是貪心演算法,如果上次磁碟空間消耗達到1gb,那麼臨時表空間就是1gb,如果還有增長,那麼依此類推,臨時表空間始終保持在...

informix 臨時表空間

informix臨時表空間 在 informix 資料庫中,我們經常會建立一些臨時表來處理應用中的臨時資訊。系統可以採用如下兩種方式建立臨時表 使用 select into temp 語句隱含地建立臨時表 使用 create temp table 語句顯示地建立臨時表 如果資料庫採用非日誌模式,db...