1、指定目录
sql> alter system set db_create_file_dest='C:\orcl1122\disk7';
System altered
2、创建表空间
sql> create tablespace myoracle;
Tablespace created
3、查看
sql> select * from dba_data_files where tablespace_name='MYORACLE';
FILE_NAME FILE_ID TABLESPACE_NAME BYTES BLOCKS STATUS RELATIVE_FNO AUTOEXTENSIBLE MAXBYTES MAXBLOCKS INCREMENT_BY USER_BYTES USER_BLOCKS ONLINE_STATUS
-------------------------------------------------------------------------------- ---------- ------------------------------ ---------- ---------- --------- ------------ -------------- ---------- ---------- ------------ ---------- ----------- -------------
C:\ORCL1122\DISK7\ORCL\DATAFILE\O1_MF_MYORACLE_DW6X2HYZ_.DBF 8 MYORACLE 104857600 12800 AVAILABLE 8 YES 3435972198 4194302 12800 103809024 12672 ONLINE
4、增加一个数据文件
sql> alter tablespace myoracle add datafile size 50M;
Tablespace altered
5、查看 数据文件随机命名
sql> select * from dba_data_files where tablespace_name='MYORACLE';
FILE_NAME FILE_ID TABLESPACE_NAME BYTES BLOCKS STATUS RELATIVE_FNO AUTOEXTENSIBLE MAXBYTES MAXBLOCKS INCREMENT_BY USER_BYTES USER_BLOCKS ONLINE_STATUS
-------------------------------------------------------------------------------- ---------- ------------------------------ ---------- ---------- --------- ------------ -------------- ---------- ---------- ------------ ---------- ----------- -------------
C:\ORCL1122\DISK7\ORCL\DATAFILE\O1_MF_MYORACLE_DW6X2HYZ_.DBF 8 MYORACLE 104857600 12800 AVAILABLE 8 YES 3435972198 4194302 12800 103809024 12672 ONLINE
C:\ORCL1122\DISK7\ORCL\DATAFILE\O1_MF_MYORACLE_DW6X7HN8_.DBF 11 MYORACLE 52428800 6400 AVAILABLE 11 NO 0 0 0 51380224 6272 ONLINE
6、删除空间myoracle
sql> drop tablespace myoracle;
Tablespace dropped
7、查看: sql> select * from dba_data_files where tablespace_name='MYORACLE'; FILE_NAME FILE_ID TABLESPACE_NAME BYTES BLOCKS STATUS RELATIVE_FNO AUTOEXTENSIBLE MAXBYTES MAXBLOCKS INCREMENT_BY USER_BYTES USER_BLOCKS ONLINE_STATUS -------------------------------------------------------------------------------- ---------- ------------------------------ ---------- ---------- --------- ------------ -------------- ---------- ---------- ------------ ---------- ----------- ------------- 木有了 原文链接:https://www.f2er.com/oracle/207621.html