Add or alter data file in Oracle Database

Add/alter data file in Oracle Db

Add a datafile to a tablespace

Alter tablespace USERS add datafile '/u01/data/users02.dbf' size 5G;

Enable autoextend on for a datafile

Alter database datafile '/u01/data/users02.dbf' autoextend on;

Resize a datafile

alter database datafile '/u01/data/users02.dbf' resize 10G;

Make a datafile offline/online

Alter database datafile '/u01/data/users02.dbf' offline;
Alter database datafile '/u01/data/users02.dbf' online;

Drop a datafile:

Alter tablespace USERS drop datafile '/u01/data/users02.dbf';

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.