신문지한장

[Tech] oracle tablespace 및 datafile 생성 및 삭제 (OMF, autoextend) 본문

Oracle/Tech

[Tech] oracle tablespace 및 datafile 생성 및 삭제 (OMF, autoextend)

신문지한장 2024. 1. 4. 10:23
OS : CentOS7.9 (64bit)
DB : Oracle Database 19c ( Release - 19.21.0 )

1. 일반 tablespac 생성 ( none OMF, autoextend ON )

create tablespace test datafile '/oracle/app/oracle/oradata/ORCL19/TEST01.dbf' size 1M autoextend on;

2. 일반 tablespac 생성 ( OMF, autoextend ON )

(1) default file size 100m, autoextend on

CREATE TABLESPACE TESTTBS;

 

(2) size 지정할 경우

CREATE TABLESPACE TESTTBS DATAFILE  SIZE 5M AUTOEXTEND ON ;

3. TDE  tablespac 생성 ( autoextend ON )

create tablespace test_tde datafile '/oracle/app/oracle/oradata/ORCL19/tde_test01.dbf' size 100m autoextend on encryption using 'AES256' default storage(encrypt);

4. tablespace 삭제

drop tablespace test including contents and datafiles;

5. tablespace datafile 추가 ( none OMF,  autoextend ON )

alter tablespace test add datafile '/oracle/app/oracle/oradata/ORCL19/test02.dbf' size 20M autoextend on;

6. tablespace datafile 추가 ( OMF,  autoextend ON )

alter tablespace TESTTBS add datafile;