六分鐘學(xué)會創(chuàng)建Oracle表空間的實現(xiàn)步驟建站知識
導(dǎo)讀:1建站知識這里介紹創(chuàng)建Oracle表空間的步驟,首先查詢空閑空間、增加Oracle表空間、修改文件大小語句如下、創(chuàng)建Oracle表空間,網(wǎng)站建設(shè)網(wǎng)站建設(shè)哪家好。
經(jīng)過長時間學(xué)習創(chuàng)建Oracle表空間,于是和大家分享一下,看完本文你肯定有不少收獲,希望本文能教會你更多東西。
1、先查詢空閑空間
復(fù)制代碼網(wǎng)站seo優(yōu)化 代碼如下:
selec企業(yè)網(wǎng)站建設(shè)t tablespace_name,file_id,block_id,bytes,blocks from dba_free_space;
2、增加Oracle表空間
先查詢數(shù)據(jù)文件名稱、大小和路徑的信息,語句如下:
復(fù)制代碼 代碼如下:
select tablespace_name,file_id,bytes,file_name from dba_data_files;
3、修改文件大小語句如下
復(fù)制代碼 代碼如下:
alter database datafile '需要增加的數(shù)據(jù)文件路徑,即上面查詢出來的路徑 'resize 800M;
4、創(chuàng)建Oracle表空間
復(fù)制代碼 代碼如下:
create tablespace test datafile '/home/app/oracle/oradata/oracle8i/test01.dbf' size 8M autoextend on next 5M maxsize 10M; create tablespace sales datafile '/home/app/oracle/oradata/oracle8i/sales01.dbf' size 800M autoextend on next 50M maxsize unlimited maxsize unlimited 是大小不受限制 create tablespace sales datafile '/home/app/oracle/oradata/oracle8i/sales01.dbf' size 800M autoextend on next 50M maxsize 1000M extent management local uniform; unform表示區(qū)的大小相同,默認為1M create tablespace sales datafile '/home/app/oracle/oradata/oracle8i/sales01.dbf' size 800M autoextend on next 50M maxsize 1000M extent management local uniform size 500K; unform size 500K表示區(qū)的大小相同,為500K create tablespace sales datafile '/home/app/oracle/oradata/oracle8i/sales01.dbf' size 800M autoextend on next 50M maxsize 1000M extent management local autoallocate; autoallocate表示區(qū)的大小由隨表的大小自動動態(tài)改變,大表使用大區(qū)小表使用小區(qū) create tablespace sales datafile '/home/app/oracle/oradata/oracle8i/sales01.dbf' size 800M autoextend on next 50M maxsize 1000M temporary; temporary創(chuàng)建字典管理臨時表空間 create temporary tablespace sales tempfile '/home/app/oracle/oradata/oracle8i/sales01.dbf' size 800M autoextend on next 50M maxsize 1000M 創(chuàng)建本地管理臨時表空間,如果是臨時表空間,所有語句中的datafile都換為tempfile 8i系統(tǒng)默認創(chuàng)建字典管理臨時表空間,要創(chuàng)建本地管理臨時表空間要加temporary tablespace關(guān)鍵字 創(chuàng)建本地管理臨時表空間時,不得使用atuoallocate參數(shù),系統(tǒng)默認創(chuàng)建uniform管理方式 為表空間增加數(shù)據(jù)文件: alter tablespace sales add datafile '/home/app/oracle/oradata/oracle8i/sales02.dbf' size 800M autoextend on next 50M maxsize 1000M;
聲明: 本文由我的SEOUC技術(shù)文章主頁發(fā)布于:2023-05-22 ,文章六分鐘學(xué)會創(chuàng)建Oracle表空間的實現(xiàn)步驟建站知識主要講述步驟,標簽,六分鐘學(xué)會創(chuàng)建Oracle表空間的實現(xiàn)步驟網(wǎng)站建設(shè)源碼以及服務(wù)器配置搭建相關(guān)技術(shù)文章。轉(zhuǎn)載請保留鏈接: http://www.bifwcx.com/article/web_5046.html