重新創(chuàng)建一個臨時表空間,把原來的默認(rèn)臨時表空間drop掉(包括里面的臨時數(shù)據(jù)文件)再重新建立

創(chuàng)新互聯(lián)專業(yè)為企業(yè)提供濠江網(wǎng)站建設(shè)、濠江做網(wǎng)站、濠江網(wǎng)站設(shè)計、濠江網(wǎng)站制作等企業(yè)網(wǎng)站建設(shè)、網(wǎng)頁設(shè)計與制作、濠江企業(yè)網(wǎng)站模板建站服務(wù),十余年濠江做網(wǎng)站經(jīng)驗,不只是建網(wǎng)站,更提供有價值的思路和整體網(wǎng)絡(luò)服務(wù)。
SQL create temporary tablespace temp2
2 tempfile '/home/oracle/oracle/product/10.2.0/oradata/hatest/temp02.pdf' size 512M reuse
3 autoextend on next 640k maxsize unlimited;
Tablespace created.
SQL alter database default temporary tablespace temp2;
Database altered.
SQL drop tablespace temp including contents and datafiles;
Tablespace dropped.
(注意:由于臨時表空間的數(shù)據(jù)文件比較大,所以這步可能會花費比較長的時間)
SQL create temporary tablespace temp
2 tempfile '/home/oracle/oracle/product/10.2.0/oradata/hatest/temp01.pdf' size 512M reuse
3 autoextend on next 640K maxsize unlimited;
Tablespace created.
SQL alter database default temporary tablespace temp;
Database altered.
SQL drop tablespace temp2 including contents and datafiles;
Tablespace dropped.
SQL exit
1、刪除用戶和數(shù)據(jù),磁盤空間不會釋放,因為數(shù)據(jù)文件大小已定。
2、解決方法最直接的就是:導(dǎo)出數(shù)據(jù), 重建數(shù)據(jù)文件、表空間, 重新導(dǎo)入數(shù)據(jù)。
使用: truncate table tablename DROP STORAGE;
解釋: 直接刪除表,并且釋放存儲空間。truncate的意思是清空表數(shù)據(jù), “DROP STORAGE”是釋放存儲空間。
法一、重啟庫
庫重啟時,Smon進(jìn)程會完成臨時段釋放,TEMP表空間的清理操作,不過很多的時侯我們的庫是不允許down的,所以這種方法缺少了一點的應(yīng)用機(jī)會,不過這種方法還是很好用的。
法二、Metalink給出的一個方法
修改一下TEMP表空間的storage參數(shù),讓Smon進(jìn)程觀注一下臨時段,從而達(dá)到清理和TEMP表空間的目的。
SQLalter tablespace temp increase 1;
SQLalter tablespace temp increase 0;
文章標(biāo)題:oracle空間怎么釋放 oracle數(shù)據(jù)庫釋放空間
轉(zhuǎn)載注明:http://chinadenli.net/article2/hejhic.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供動態(tài)網(wǎng)站、標(biāo)簽優(yōu)化、網(wǎng)站設(shè)計公司、品牌網(wǎng)站建設(shè)、網(wǎng)站策劃、App設(shè)計
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)