oracle清理資料庫的臨時表空間

2021-09-01 02:01:49 字數 790 閱讀 5689

1.startup --啟動資料庫

2.create temporary tablespace temp2 tempfile '/home2/oracle/oradata/sysmon/temp02.dbf ' size 512m reuse autoextend on next 640k maxsize unlimited; --建立中轉臨時表空間

3.alter database default temporary tablespace temp2;--改變預設臨時表空間 為剛剛建立的新臨時表空間temp2

4.drop tablespace temp including contents and datafiles;--刪除原來臨時表空間

5.create temporary tablespace temp tempfile '/home2/oracle/oradata/sysmon/temp01.dbf ' size 512m reuse autoextend on next 640k maxsize unlimited; --重新建立臨時表空間

6.alter database default temporary tablespace temp;--重置預設臨時表空間為新建的temp表空間

7.drop tablespace temp2 including contents and datafiles;--刪除中轉用臨時表空間

8.alter user roll temporary tablespace temp; --重新指定使用者表空間為重建的臨時表空間

但解決辦法的根本還是優化你的sql.或者加記憶體.

oracle清理資料庫的臨時表空間

1.startup 啟動資料庫 2.create temporary tablespace temp2 tempfile home2 oracle oradata sysmon temp02.dbf size 512m reuse autoextend on next 640k maxsize un...

oracle資料庫清理

使用truncate 清理並 空間,mysql,sqlserver等有自增序列的資料庫將序列歸零 無法恢復,不能回滾 使用drop 刪除表,但不 空間,可以恢復,不能回滾 使用delete 刪除記錄,不 空間,可恢復,可回滾 1.使用drop和delete之後如何恢復?使用flashback語句 f...

資料庫臨時表

建立方法 方法一 createtable temptablename 或select 欄位1,欄位2,into temptablename from table 方法二 createtable tempdb mytemptable tidint 說明 1 臨時表其實是放在資料庫tempdb裡的乙個使...