|
未创建表空间前:
[oracle@master ~]$ df -k
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda1 14500068 7743556 6019936 57% /
none 505740 0 505740 0% /dev/shm
创建表空间:
SQL> create tablespace test
2 datafile '/oracle/test.dbf' size 1000M;
创建表空间后:
[oracle@master ~]$ df -k
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda1 14500068 8768568 4994924 64% /
none 505740 0 505740 0% /dev/shm
删除表空间:
SQL> drop tablespace test;
Tablespace dropped.
[oracle@master ~]$ df -k
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda1 14500068 8768568 4994924 64% /
none 505740 0 505740 0% /dev/shm
发现原文件没有删掉,磁盘不会释放
[oracle@master oracle]$ ls -l
total 1025032
drwxr-x--- 3 oracle oinstall 4096 Jan 22 17:16 admin
drwxr-x--- 3 oracle oinstall 4096 Jan 22 17:17 flash_recovery_area
drwxr-x--- 3 oracle oinstall 4096 Jan 22 17:16 oradata
drwxrwx--- 6 oracle oinstall 4096 Jan 22 17:10 oraInventory
drwxrwxr-x 3 oracle oinstall 4096 Jan 22 16:16 product
-rw-r----- 1 oracle oinstall 1048584192 Apr 7 01:21 test.dbf
重新建立表空间:
SQL> create tablespace test1 datafile '/oracle/test.dbf';
Tablespace created.
删除表空间:
SQL> drop tablespace test1 including contents and datafiles;
Tablespace dropped.
查看容量:
[oracle@master ~]$ df -k
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda1 14500068 7743560 6019932 57% /
none 505740 0 505740 0% /dev/shm
说明"drop tablespace test1 including contents and datafiles;"才是真正把表空间连同磁盘数据文件删掉
[ 本帖最后由 anycall2010 于 2008-4-8 01:06 编辑 ] |
|