Tuesday, January 17, 2012

Oracle: How to Change Datafile Size

Connect as SYSTEM or SYS and execute the following commands.

ALTER DATABASE DATAFILE '/datafilename.dbf'  RESIZE 100M;
Example: Temp tablespace:

To see the used and freespace of the table space:

select TABLESPACE_NAME, BYTES_USED, BYTES_FREE from V$TEMP_SPACE_HEADER;

Change the tablespace size:
alter database tempfile 'D:\oracle\bise1\oradata\bise1db\TEMP01.DBF' resize 300M;

Cheers :)

No comments:

Post a Comment