1、创建表空间(创建一个表空间对应三个数据文件)
SQL>create tablespace ts_dong
logging
datafile '/opt/orcl_11g/oradata/dong/dong01.dbf'
size 200m
autoextend on
next 100m maxsize UNLIMITED ,
'/opt/orcl_11g/oradata/dong/dong02.dbf'
size 200m
autoextend on
next 100m maxsize UNLIMITED ,
'/opt/orcl_11g/oradata/dong/dong03.dbf'
size 200m
autoextend on
next 100m maxsize UNLIMITED
extent management local;
2、追加数据表空间数据文件
SQL>alter tablespace data_tb add datafile '/opt/orcl_11g/oradata/dong/dong04.dbf' size 200m
autoextend on
next 100m maxsize UNLIMITED ;
3、追加临时表空间数据文件
SQL>alter tablespace ts_temp_hwttoa add TEMPFILE '/opt/oracl_11g/data/test/hwttoa/temp_hwttoa02.dbf' size 200m
autoextend on
next 100m maxsize UNLIMITED ;
4、查看所有表空间及对应数据文件
SQL>select file_name, tablespace_name from dba_data_files;