日本综合一区二区|亚洲中文天堂综合|日韩欧美自拍一区|男女精品天堂一区|欧美自拍第6页亚洲成人精品一区|亚洲黄色天堂一区二区成人|超碰91偷拍第一页|日韩av夜夜嗨中文字幕|久久蜜综合视频官网|精美人妻一区二区三区

RELATEED CONSULTING
相關(guān)咨詢
選擇下列產(chǎn)品馬上在線溝通
服務(wù)時間:8:30-17:00
你可能遇到了下面的問題
關(guān)閉右側(cè)工具欄

新聞中心

這里有您想知道的互聯(lián)網(wǎng)營銷解決方案
oracle關(guān)于表空間的一些操作

查看 xxx 表空間是否為自動擴展:

創(chuàng)新互聯(lián)公司是一家以網(wǎng)站設(shè)計建設(shè),微信小程序開發(fā)、網(wǎng)站開發(fā)設(shè)計,網(wǎng)絡(luò)軟件產(chǎn)品開發(fā),企業(yè)互聯(lián)網(wǎng)推廣服務(wù)為主的民營科技公司。主要業(yè)務(wù)涵蓋:為客戶提供網(wǎng)站策劃、網(wǎng)站設(shè)計、網(wǎng)站開發(fā)、國際域名空間、網(wǎng)站優(yōu)化排名、買友情鏈接等服務(wù)領(lǐng)域。憑借建站老客戶口碑做市場,建設(shè)網(wǎng)站時,根據(jù)市場搜索規(guī)律和搜索引擎的排名收錄規(guī)律編程,全力為建站客戶設(shè)計制作排名好的網(wǎng)站,深受老客戶認可和贊譽。

select file_name,autoextensible,increment_by from dba_data_files;

select file_id,file_name,tablespace_name,autoextensible,increment_by from dba_data_files order by file_id desc; 

打開表空間自動擴展功能:

alter database datafile '/u01/app/oracle/oradata/testdb/test01.dbf' autoextend on;

查看數(shù)據(jù)文件大?。?/strong>

select TABLESPACE_NAME,FILE_NAME,BYTES/1024/1024 M from dba_data_files order by TABLESPACE_NAME;

查詢表空間的總?cè)萘浚?/strong> 

select tablespace_name, sum(bytes) / 1024 / 1024 as MB 

from dba_data_files 

group by tablespace_name; 

查詢表空間使用率:

select total.tablespace_name, 

round(total.MB, 2) as Total_MB, 

round(total.MB - free.MB, 2) as Used_MB, 

round((1 - free.MB / total.MB) * 100, 2) || '%' as Used_Pct 

from (select tablespace_name, sum(bytes) / 1024 / 1024 as MB 

from dba_free_space 

group by tablespace_name) free, 

(select tablespace_name, sum(bytes) / 1024 / 1024 as MB 

from dba_data_files 

group by tablespace_name) total 

where free.tablespace_name = total.tablespace_name; 

擴展表空間:

#首先查看表空間的名字和所屬文件及空間 

select tablespace_name, file_id, file_name,round(bytes/(1024*1024),0) total_space from dba_data_files order by tablespace_name; 

#三種擴展方法 

1.alter tablespace test add datafile '/u01/test02.dbf' size 10M(自動加一個datafile) 

2.alter database datafile '/u01/test.dbf' resize 20M; 

3.alter database datafile '/u01/test.dbf' autoextend on next 10M maxsize 1G; 

設(shè)定后查看表空間信息:

select a.tablespace_name,a.bytes total,b.bytes used,c.bytes free,(b.bytes*100)/a.bytes "% used",(c.bytes*100)/a.bytes "% free" from sys.sm$ts_avail a,sys.sm$ts_used b,sys.sm$ts_free c where a.tablespace_name=b.tablespace_name and a.tablespace_name=c.tablespace_name; 


網(wǎng)站名稱:oracle關(guān)于表空間的一些操作
文章網(wǎng)址:http://www.dlmjj.cn/article/goioic.html