We can directly resize datafiles
TEST.SQL>SELECT FILE_NAME, BYTES FROM DBA_DATA_FILES WHERE TABLESPACE_NAME=’SYSTEM’;
FILE_NAME BYTES
—————- ———-
/…/dbsGNX.dbf 419430400
TEST.SQL>ALTER DATABASE DATAFILE ‘/…/dbsGNX.dbf’ RESIZE 390M;
Database altered.
TEST.SQL>SELECT FILE_NAME, BYTES FROM DBA_DATA_FILES WHERE TABLESPACE_NAME=’SYSTEM’;
FILE_NAME BYTES
————— ———-
/…/dbsGNX.dbf 408944640
But the minimum file size is the size of the extend the furthest in the datafile:
TEST.SQL>SELECT FILE_ID,FILE_NAME FROM DBA_DATA_FILES WHERE TABLESPACE_NAME=’SYSTEM’;
FILE_ID FILE_NAME
———- —————–
1 /…/dbsGNX.dbf
TEST.SQL>SELECT MAX(BLOCK_ID) MBID FROM DBA_EXTENTS WHERE FILE_ID=1;
MBID
———-
25129
TEST.SQL>SELECT SEGMENT_NAME,OWNER,SEGMENT_TYPE FROM DBA_EXTENTS WHERE FILE_ID=1 AND BLOCK_ID=25129;
SEGMENT_NAME OWNER SEGMENT_TYPE
——————– —————————— ——————
I_OBJAUTH2 SYS INDEX
TEST.SQL>SHOW PARAMETER BLOCK_SIZE
NAME TYPE VALUE
———————————— ——————————– ——————————
db_block_size integer 8192
TEST.SQL>SELECT 8192*25129 FROM DUAL;
8192*25129
———-
205856768
about 200M.
We can directly resize datafiles
TEST.SQL>SELECT FILE_NAME, BYTES FROM DBA_DATA_FILES WHERE TABLESPACE_NAME=’SYSTEM’;
FILE_NAME BYTES
—————– ———-
/…/dbsGNX.dbf 419430400
TEST.SQL>ALTER DATABASE DATAFILE ‘/…/dbsGNX.dbf’ RESIZE 390M;
Database altered.
TEST.SQL>SELECT FILE_NAME, BYTES FROM DBA_DATA_FILES WHERE TABLESPACE_NAME=’SYSTEM’;
FILE_NAME BYTES
—————- ———-
/…/dbsGNX.dbf 408944640
But the minimum file size is the size of the extend the furthest in the datafile:
TEST.SQL>SELECT FILE_ID,FILE_NAME FROM DBA_DATA_FILES WHERE TABLESPACE_NAME=’SYSTEM’;
FILE_ID FILE_NAME
———- ————————-
1 /…/dbsGNX.dbf
TEST.SQL>SELECT MAX(BLOCK_ID) MBID FROM DBA_EXTENTS WHERE FILE_ID=1;
MBID
———-
25129
TEST.SQL>SELECT SEGMENT_NAME,OWNER,SEGMENT_TYPE FROM DBA_EXTENTS WHERE FILE_ID=1 AND BLOCK_ID=25129;
SEGMENT_NAME OWNER SEGMENT_TYPE
——————— —————————— ——————
I_OBJAUTH2 SYS INDEX
TEST.SQL>SHOW PARAMETER BLOCK_SIZE
NAME TYPE VALUE
———————————— ——————————– ——————————
db_block_size integer 8192
TEST.SQL>SELECT 8192*25129 FROM DUAL;
8192*25129
———-
205856768
About 200M.
Reference : http://forums.oracle.com/forums/message.jspa?messageID=1058350