表空间新增数据文件及扩展大小
显示表空间数据文件明细
Sql > select file_name,tablespace_name,bytes/(1024*1024) from dba_data_files;
显示临时表空间的数据文件明细
Sql > select file_name,tablespace_name,bytes/(1024*1024) from dba_temp_files;
1)增加SAMPLE1表空间的数据文件10M
SQL>alter tablespace SAMPLE1 add datafile 'E:\ORADATA\GSDOORDB\SAMPLE1_2.DBF' size 10M;
新加成功,显示如下:
2)增加TEMP表空间的文件
SQL>alter tablespace temp add tempfile 'E:\ORADATA\GSDOORDB\temp02.dbf' size 10M;
新增成功,显示如下
3)改变SAMPLE1表空间的数据文件大小
SQL>alter database datafile 'E:\ORADATA\GSDOORDB\SAMPLE1_2.DBF ' resize 100M;
修改成功,显示如下:
4)更改数据文件的扩展方式
SQL> alter database datafile 'E:\ORADATA\GSDOORDB\SAMPLE1_1.DBF' autoextend on next 5M maxsize 500M;