SQL> -- This is comment on sql--before adding a datafile in a tablespace check mount point space --
SQL> !df -h /d01/oracle/oradata/prod
Filesystem Size Used Avail Use% Mounted on
/dev/sda9 15G 11G 2.6G 82% /d01
SQL> -- To see datafiles in a tablespace use below command ---
SQL> select file_name from dba_data_files where file_name like '%abdulwasiq%';
FILE_NAME
--------------------------------------------------------------------------------
/d01/oracle/oradata/prod/abdulwasiq.dbf
SQL> ---Adding a datafile in a tablespace ---
SQL> alter tablespace abdulwasiq add datafile '/d01/oracle/oradata/prod/abdulwasiq01.dbf' size 100m;
Tablespace altered.
SQL> --Now check whether the datafiles is added or not-----
SQL> select file_name from dba_data_files where file_name like '%abdulwasiq%';
FILE_NAME
--------------------------------------------------------------------------------
/d01/oracle/oradata/prod/abdulwasiq.dbf
/d01/oracle/oradata/prod/abdulwasiq01.dbf
SQL>
No comments:
Post a Comment