Oracle表領域の作成を6分で習得するには
3530 ワード
長い間勉強してOracle表領域を作成したので、皆さんと共有して、本文を見てからきっと多くの収穫があって、本文がもっと多くのことを教えてくれることを望んでいます.
1、空きスペースを先に問い合わせる
select tablespace_name,file_id,block_id,bytes,blocks from dba_free_space;
2、Oracle表領域の追加
データファイル名、サイズ、パスの情報を先に問い合せます.文は次のとおりです.
select tablespace_name,file_id,bytes,file_name from dba_data_files;
3、ファイルサイズ変更文は以下の通りです.
alter database datafile
' ,
'resize 800M;
4、Oracle表領域の作成
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 , 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 , 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 ,
create tablespace sales
datafile '/home/app/oracle/oradata/oracle8i/sales01.dbf' size 800M
autoextend on
next 50M
maxsize 1000M
temporary;
temporary
create temporary tablespace sales
tempfile '/home/app/oracle/oradata/oracle8i/sales01.dbf' size 800M
autoextend on
next 50M
maxsize 1000M
, , datafile tempfile
8i , temporary tablespace
, atuoallocate , uniform
:
alter tablespace sales add
datafile '/home/app/oracle/oradata/oracle8i/sales02.dbf' size 800M
autoextend on next 50M
maxsize 1000M;
ローカル管理テンポラリOracle表領域を作成します.テンポラリ表領域の場合、すべての文のdatafileがtempfile 8 iシステムのデフォルト作成辞書管理テンポラリ表領域に置き換えられます.ローカル管理テンポラリ表領域を作成するにはtemporary tablespaceキーワードを追加してローカル管理テンポラリ表領域を作成する場合は、atuoallocateパラメータを使用しないでください.システムのデフォルト作成uniform管理方式
表領域にデータファイルを追加するには、次の手順に従います.
alter tablespace sales add
datafile '/home/app/oracle/oradata/oracle8i/sales02.dbf' size 800M
autoextend on next 50M
maxsize 1000M;
5、自動拡張属性を変更する:
alter database datafile
'/home/app/oracle/oradata/oracle8i/sales01.dbf',
'/home/app/oracle/oradata/oracle8i/sales02.dbf'
'/home/app/oracle/oradata/oracle8i/sales01.dbf
autoextend off;
6、表領域を削除する:
drop tablespace xxx including contents and datafiles
以上、Oracle表領域の作成について説明しましたが、ここで皆さんと共有して、役に立つことを願っています.
原文を調べる