ORACLE表空間擴(kuò)展方法_第1頁(yè)
ORACLE表空間擴(kuò)展方法_第2頁(yè)
ORACLE表空間擴(kuò)展方法_第3頁(yè)
全文預(yù)覽已結(jié)束

下載本文檔

版權(quán)說(shuō)明:本文檔由用戶(hù)提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡(jiǎn)介

1、ORACLE表空間擴(kuò)展方法2011-10-3118:58:59我來(lái)說(shuō)兩句收藏我要投稿字體:小大環(huán)境:linux系統(tǒng)工具:PL/SQLDEVELOPER第一步:查看表空間的名字及文件所在位置:selecttablespace_name,file_id,file_name,round(bytes/(1024*1024),0)total_spacefromdba_data_filesorderbytablespace_name.対SQL窗口-selecttablespacesin巳和md,file_riain巳round(bytes/(1024*10240)total_spacefromdba_da

2、ta.SQL統(tǒng)計(jì)表selecttablespace_name,file_id,file_name,round(bytes/(1024*1024),0)total_spacefromdba_data_filesorderbytablespace_name;g-好至隔ayssMi-TABLESPACENAMEFILEDFILENAMETQTALSPACE1NITATEST-10/home/oraclEbpfVcifdclEfcirchtdfgtiPdCigbnitXEStCiI.citif-102ANITATEST-11/home/ora匚1已掃p時(shí)口日匚1引mcidtdfgtikl0g/anit

3、atest02.dbf-1037040001547551203SYSAUX-3/home/oracle/app/oracle/oradata/gbk10g/sysaux01.dbf-4SYSTEM-1/home/ora匚1已/app/ora匚1已/oradata/gbk10g/system01.dbf-5UNDOTBS1-2/home/ora匚1已/app/ora匚1已/oradata/gbk10g/undotbs01.dbf-6USERS-9/home/ora匚1已/app/oracle/oradata/gbk1Og/usersOB.dbf-二少5:1tablespace-name,varc

4、har2C30optional,NameofthetablespacetowhichthefileOracleTableSpace01.jpg?psid第二步:增大所需表空間大?。篴lterdatabasedatafile表空間位置resize新的尺寸例如:alterdatabasedatafileoracleoradataanita_2008.dbfresize4000m對(duì)于oracleODD的表空間,除了用手動(dòng)增加大小外,還可以增加數(shù)據(jù)文件等方式擴(kuò)展表空間大小。方法一:增加數(shù)據(jù)文件個(gè)數(shù)altertablespace表空間名稱(chēng)adddatafile新的數(shù)據(jù)文件地址size數(shù)據(jù)文件大小例如:a

5、ltertablespaceESPS_2008adddatafileoracleoradataanita_2010.dbfsize1000m方法二:設(shè)置表空間自動(dòng)擴(kuò)展。alterdatabasedatafile數(shù)據(jù)文件位置autoextendonnext自動(dòng)擴(kuò)展大小maxsize最大擴(kuò)展大小例如:alterdatabasedatafileoracleoradataanita_2008.dbfautoextendonnext100mmaxsize10000m方法三:查詢(xún)表空間使用情況:selecta.tablespace_name,a.bytes/1024/1024sumMB,(a.bytes-

6、b.bytes)/1024/1024usedMB,b.bytes/1024/1024freeMB,round(a.bytes-b.bytes)/a.bytes)*100,2)used%from(selecttablespace_name,sum(bytes)bytesfromdba_data_filesgroupbytablespace_name)a,(selecttablespace_name,sum(bytes)bytes,max(bytes)largestfromdba_free_spacegroupbytablespace_name)bwherea.tablespace_name=b.

7、tablespace_nameorderby(a.bytes-b.bytes)/a.bytes)desc;SQL窗口-selecta.tablespace_nameja.bytes/1024/1024sumMB,(a.bytes-b.bytes)/1024/1024usedMBjb.byt.SQL統(tǒng)計(jì)表selecta.tablespace_name,a.bytes/1024/1024sumMB,(a.bytes-b.bytes)/1024/1024usedMB,b.bytes/1024/1024TreeMB,round(a.bytes-b.bytesya.bytesfl00,2)used%fr

8、om(selecttablespace_name,sum(bytes)bytesfromdba_data_filesgroupbytablespace_name)a,(selecttablespace_name,sum(bytes)bytes.max(bytes)largestfromdba_free_spacegroupbytablespace_name)wherea.tablespace_name=b.tablespace_nameorderby(a.bytes-b.bytes)/a.bytes)desc;|TABLESPACENAMEsumMBusedMBfreeMBused%1SYSA

9、UX-370344.687525.312593.162SYSTEM-40002722.6251277.37568.073USERS-140287.937583865.062556422.87559.784UNDOTBS1-15475594.687514880.31253.845ANITATEST-200.2519.751.25SQL窗口-selecta.tablespace_nameja.bytes/1024/1024sumMB,(a.bytes-b.bytes)/1024/1024usedMBjb.byt.SQL窗口-selecta.tablespace_nameja.bytes/1024/1024sumMB,(a.bytes-b.bytes)/1024/1024usedMBjb.byt.=38:430:015行被選擇,耗時(shí)1.015秒SQL窗口-selecta.tablespace_nameja.bytes/1024/1024s

溫馨提示

  • 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶(hù)所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶(hù)上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶(hù)上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶(hù)因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。

最新文檔

評(píng)論

0/150

提交評(píng)論