Home > dba_scripts > Important Oracle DBA Tips

Important Oracle DBA Tips

1)Enabling and Disabling Automatic Extension for a Datafile

 alter database datafile  ‘/u01/app/oradata/ukdevdv1/system01.dbf’ autoextend off

2)Manually Resizing a Datafile

 ALTER DATABASE DATAFILE ‘/u01/app/oradata/ukdevdv1/system01.dbf’
   RESIZE 1560M;

3)Check Tablespace size

select b.tablespace_name, tbs_size SizeMb, a.free_space FreeMb
from  (select tablespace_name, round(sum(bytes)/1024/1024 ,2) as free_space
       from dba_free_space
       group by tablespace_name) a,
      (select tablespace_name, sum(bytes)/1024/1024 as tbs_size
       from dba_data_files
       group by tablespace_name) b
where a.tablespace_name(+)=b.tablespace_name;

Categories: dba_scripts
  1. No comments yet.
  1. No trackbacks yet.

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s

%d bloggers like this: