Monday, December 14, 2009

How to add a new data file to Oracle Tablespace using sqlplus

First login as the "oracle" user, and issue the command "sqlplus "/ as sysdba"" (I am assuming that you already have configured the 
PATH environment variable correctly) and then type the following:
alter tablespace tablespace_name 
add datafile '/oracle/data/file1.dbf' size 12G autoextend off;
The above command adds a data file named "file1.db" of size 12 GB to the "/oracle/data" path with the autoextend feature turned off

No comments: