ORACLE TEMP資料表空間大小改小

來源:互聯網
上載者:User

ORACLE TEMP資料表空間大小改小

 

EMP表空間重做方法是(做兩步的動作主要目的是為了相關命名和之前沒有變化),

1)先產生TMP臨時表空間,再刪除TEMP表空間

2)再重新做TEMP表空間,後再刪除TMP表空間

 

---------------------------------------------------------
--kstest 20110802 test ok
--create TMP---------------------------------------------
step 1)
CREATE TEMPORARY TABLESPACE TMP
TEMPFILE
  '/ora/orakstest/kstest/tmp01.dbf' SIZE 1024M
AUTOEXTEND ON NEXT 32M MAXSIZE 5120M;

step 2)
alter database default temporary tablespace TMP;

step 3)
drop tablespace  TEMP  including  contents and datafiles ;

--ReCreate TEMP-----------------------------------------
step 1)
CREATE TEMPORARY TABLESPACE TEMP
TEMPFILE
  '/ora/orakstest/kstest/temp01.dbf' SIZE 1024M
AUTOEXTEND ON NEXT 32M MAXSIZE 5120M;

step 2)
alter database default temporary tablespace TEMP;

step 3)
drop tablespace  TMP  including  contents and datafiles ;
----------------------------------------------------------

--ks2k4 20110803 test ok
----------------------------------------------------------
1) 若先限制用戶login系統,再做kill光進程,這樣比較順利,五分鐘可以完成。

(昨天在測試庫做測試時,沒有做以上動作,今天早上都沒有做完)

2) KS2K4的TEMP表空間采1G(初始大小)至5G(最大)自動增長方式,每次增長32M;

PS: 表空間大小修改小時,Oracle已經正常,Unix可能需要時間才能全部釋放,若重啟資料庫會完全釋放(我剛在測試庫有測試)。

--create TMP---------------------------------------------
step 1)
CREATE TEMPORARY TABLESPACE TMP
TEMPFILE
  '/ora/ardataks/ks2k4/tmp01.dbf' SIZE 1024M
AUTOEXTEND ON NEXT 32M MAXSIZE 5120M;

step 2)
alter database default temporary tablespace TMP;

step 3)
drop tablespace  TEMP  including  contents and datafiles ;

--ReCreate TEMP-----------------------------------------
step 1)
CREATE TEMPORARY TABLESPACE TEMP
TEMPFILE
  '/ora/ardataks/ks2k4/temp01.dbf' SIZE 1024M
AUTOEXTEND ON NEXT 32M MAXSIZE 5120M;

step 2)
alter database default temporary tablespace TEMP;

step 3)
drop tablespace  TMP  including  contents and datafiles ;
----------------------------------------------------------

----------------------------------------------------------
other:
ALTER DATABASE TEMPFILE '/ora/orakstest/kstest/tmp01.dbf' RESIZE 1024M;
ALTER DATABASE TEMPFILE '/ora/orakstest/kstest/tmp01.dbf' AUTOEXTEND ON  NEXT 32M MAXSIZE 5120M;

1)create temporary tablespace temp2  TEMPFILE '/ora/erp/zstest_temp/temp02.dbf' size 1000m AUTOEXTEND off;

2)alter database default temporary tablespace temp2;

3)drop tablespace  temp  including  contents and datafiles ;
----------------------------------------------------------

 

 

                                                                             by 宇宙老人  20110803
                                                                             心有多大,宇宙就有多大。
                                                                            
http://blog.csdn.net/foreveryday007

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.