Note: Technical Talk being moved to:
www.nazimcricket.com/wiki


Thursday, 25 February 2010

Check Oracle Database Size

A good way to check the size of your database is to add up the size of your tablespaces (including Temp) and the redo logs as follows:
select sum(megabytes) 
 from (
select sum(bytes)/1024/1024 megabytes from dba_temp_files
union
select sum(bytes)/1024/1024 megabytes from dba_data_files
union
select sum(bytes)/1024/1024 megabytes from v$log
);

Saturday, 6 February 2010

RMAN Archivelog Deletions

Note to self
rman nocatalog<< DATA
connect target
delete noprompt archivelog until time 'SYSDATE-n';
DATA
rman nocatalog<< DATA
connect target
delete noprompt archivelog until sequence= nnnnnnn;
DATA

A scenario where so many archivelogs are being generated, that you have to resort to using RMAN to clear out archivelogs on the fly, can also be supported by increasing the physical space for archivelog files alongwith boosting the db_recovery_file_dest_size parameter i.e. increasing the flash recovery area.

ORA-19815: WARNING: db_recovery_file_dest_size of n bytes is n% used, and has n remaining bytes available.

alter system set db_recovery_file_dest_size=nM/G scope=both;