Add space to database

From Oracle FAQ

Jump to: navigation, search

DBA's frequently need to add space to a database to cater for database growth. Space can be added to a tablespace by adding more datafiles or by resizing existing datafiles. Use one of the following commands to add space:

SQL> ALTER TABLESPACE ts1 ADD DATAFILE '/path/to/file/name' SIZE 100M;
SQL> ALTER DATABASE DATAFILE '/path/to/data/file/name' RESIZE 200M;

Before adding files, do a select from SYS.DBA_DATA_FILES to get a feel for the sizing and naming standard used on the particular database.

[edit] Notes for installations using ASM

ASM used Oracle Managed Files (OMF) by default and will allow the datafiles to grow automatically provided ASM has enough disks allocated to it.

[edit] Notes for installations using File Systems

When using file systems for storing data files, ensure you pick the right filesystem type and parameters. For example, a Veritas Filesystem will be much faster than a normal UFS fileystem.

[edit] Notes for installations using RAW Volumes

If your installation uses RAW Volumes, pre-allocate the volume or get your Operating System Support to create if for you. This is typically done using commands like: vxassist (Veritas) or lvcreate (HP-UX).

Unless you know exactly what you are doing, never try to resize files on RAW Volumes.

Personal tools