ORACLE擴充套件資料空間

2021-08-20 09:31:09 字數 1475 閱讀 2927

(1)查詢使用者對應的表空間,我們可以看到針對不同的資料庫使用者oracle

(2)查詢使用者的對應的資料檔案,以及資料檔案大小

(3)根據1.2 使用者對應的表空間,以及表空間的大小,可以在通過下述語句檢視目前使用百分比,如果所用空間不再下述查詢範圍內,則證明此空間已經滿了,沒有剩餘量的空間在下面的sql中沒有展示,我們可以看到有乙個空間已經到了95%

select a.tablespace_name "表空間名",total "表空間大小",free "表空間剩餘大小",(total - free) "表空間使用大小",

total / (1024 * 1024 * 1024) "表空間大小(g)",free / (1024 * 1024 * 1024) "表空間剩餘大小(g)",

(total - free) / (1024 * 1024 * 1024) "表空間使用大小(g)",round((total - free) / total, 4) * 100 "使用率 %"

(4)此時我們執行空間擴增語句。把剛才使用率95%空間從1800m擴增到3000m

alter database datafile '/u2/oracle/plm_sd_data' resize 3000m

其中「/u2/oracle/plm_sd_data」修改為(2)中表空間路徑即可,但需要在system下執行語句。

擴充套件Oracle資料表空間

擴充套件oracle資料表空間 1.先檢視system和sysaux表空間是否是自動擴充套件的。select tablespace name,autoextensible,increment by from dba data files 如果為自動擴充套件那麼autoextensible欄位的值應為...

Oracle表空間擴充套件

1.檢視所有表空間使用情況 select b.file id 檔案id號,b.tablespace name 表空間名,b.bytes 1024 1024 m 位元組數,b.bytes sum nvl a.bytes,0 1024 1024 m 已使用,sum nvl a.bytes,0 1024 ...

Oracle擴充套件表空間

平時在工作中,客戶那邊的伺服器 放置erp的,很容易表空間不足造成業務流程走不通,導致一些不必要的麻煩,作為乙個運維,必須時刻檢視表空間,通過指令碼監控來進行報警 怎麼檢視表空間 select tablespace name,sum bytes 1024 1024 as mb from dba da...