为表空间添加数据文件就可以了,但是有维护好这些文件,使用命令 alter tablespace <TABLESPACE_NAME> add datafile '另一个物理盘\USER02.dbf' size 1024M;
可以,为表空间添加数据文件ALTER TABLESPACE app_data ADD DATAFILE ’/DISK6/app_data_04.dbf’ SIZE 200M AUTOEXTEND ON NEXT 10M MAXSIZE 500M; ALTER TABLESPACE tablespace ADD DATAFILE filespec [autoextend_clause] [, filespec [autoextend_clause]]...autoextend_clause :== [ AUTOEXTEND { OFF|ON[NEXT integer[K|M]] [MAXSIZE UNLIMITED | integer[K|M]] } ] where: AUTOEXTEND OFF disables the automatic extension of the data file AUTOEXTEND ON enables the automatic extension of the data file NEXT specifies the disk space to allocate to the data file when more extents are required MAXSIZE specifies the maximum disk space allowed for allocation to the data file UNLIMITED sets no limit on allocating disk space to the data file
alter tablespace <TABLESPACE_NAME> add datafile '另一个物理盘\USER02.dbf' size 1024M;
ADD DATAFILE ’/DISK6/app_data_04.dbf’
SIZE 200M
AUTOEXTEND ON
NEXT 10M
MAXSIZE 500M;
ALTER TABLESPACE tablespace
ADD DATAFILE filespec [autoextend_clause]
[, filespec [autoextend_clause]]...autoextend_clause :== [ AUTOEXTEND { OFF|ON[NEXT integer[K|M]]
[MAXSIZE UNLIMITED | integer[K|M]] } ]
where: AUTOEXTEND OFF disables the automatic extension of the data file
AUTOEXTEND ON enables the automatic extension of the
data file
NEXT specifies the disk space to allocate to the
data file when more extents are required
MAXSIZE specifies the maximum disk space
allowed for allocation to the data file
UNLIMITED sets no limit on allocating disk space to
the data file
假定表空间ts_data由path/data_01.dbf和path/data_02.dbf(500M)组成
SQL>connect system
SQL>alter tablespace ts_data add datafile ‘path/data_03.dbf’ size 500M;
或alter database datafile ‘path/data_01.dbf’ resize 1000M;
移动表空间数据文件:实例处于关闭状态
oracle用户,ORACLE_SID=orax
svrmgrl
SVRMGR>connect internal
SVRMGR>startup mount
$mv path/data_01.dbf path2/data01.dbf
$mv path/data_02.dbf path2/data02.dbf
SVRMGR>alter database rename file ‘path/data_01.dbf’,’path/data_02.dbf’ to ‘path2/data01.dbf’, ‘path2/data02.dbf’;
或
SVRMGR>alter tablespace ts_data rename datafile ‘path/data_01.dbf’,’path/data_02.dbf’ to ‘path2/data01.dbf’, ‘path2/data02.dbf’;
SVRMGR>alter database open;
注意:上例中数据文件路径和名称均发生改变
2.8 创建用户
假