OracleDBA之路之Tabespace(七)

使用resize来修改表数据文件的大小
alter database datafile 'xxx' resize xxxM

实验

修改/u01/oradata/houzhh/myts02.dbf打打小到200M
SQL> select file_name,tablespace_name as tname,bytes from dba_data_files;
FILE_NAME                      TNAME                               BYTES
------------------------------ ------------------------------ ----------
/u01/oradata/houzhh/myts01.dbf MYTABLESPACE                    104857600
/u01/oradata/houzhh/myts02.dbf MYTABLESPACE                    104857600

 

SQL> alter database datafile '/u01/oradata/houzhh/myts02.dbf' resize 200M;
 
Database altered.

SQL> select file_name,tablespace_name as tname,bytes from dba_data_files;
 
FILE_NAME                      TNAME                               BYTES
------------------------------ ------------------------------ ----------
/u01/oradata/houzhh/myts01.dbf MYTABLESPACE                    104857600
/u01/oradata/houzhh/myts02.dbf MYTABLESPACE                    209715200

 

你可能感兴趣的:(oracle)