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:

WordPress.com Logo

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

Google photo

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

Twitter picture

You are commenting using your Twitter 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.