SQL>alter tablespace ...add datafile ...
SQL>alter tablespace ...add tempfile ...
一、增加文件:
SQL>CREATE SMALLFILE TABLESPACE "STAGING" DATAFILE '/u01/app/Oracle/oradata/orcl/staging01.dbf' SIZE 3M REUSE NOLOGGING
EXTENT MANAGEMENT LOCAL
SEGMENT SPACE MANAGEMENT AUTO
1、添加文件
SQL>alter tablespace myts01
add datafile 'd:oracleproduct10.2.0oradataorclmyts03.dbf' size 10M;
2、临时表空间添加文件
SQL>alter tablespace temp
add tempfile 'd:oracleproduct10.2.0oradataorclmytemp.dbf' size 10M;
==============================================================
二、改变数据文件的大小
1、设置数据文件为自动增长
SQL>create smallfile tablespace myts02
datafile 'd:oracleproduct10.2.0oradataorclmyts02_1.dbf' size 10M
autoextend on
next 5M
maxsize 50M;
SQL>alter tablespace myts02
add datafile 'd:oracleproduct10.2.0oradataorclmyts02_2.dbf' size 10M
autoextend on
next 4k
maxsize 40M;
SQL>alter database
datafile 'd:oracleproduct10.2.0oradataorclmyts01_3.dbf'
autoextend on
next 2M
maxsize 20M;
---取消自动增长---
SQL>alter database
datafile 'd:oracleproduct10.2.0oradataorclmyts01_3.dbf'
autoextend off;
2、修改数据文件的大小
SQL>alter database
datafile 'd:oracleproduct10.2.0oradataorclmyts01_3.dbf' resize 100M;