script to get size of generated archived logfiles in certain timeframe

2
Published on Aug 30 2013 # 182 (182 reads) oracle (http://remidian.com/category/oracle/)/scripts (http://remidian. com/category/oracle/scripts/) Script to get size of generated archived logfiles in certain timeframe I’m testing a import datapump load procedure and I need to know the approximate size of generated archives that this load will generate to determine the size needed for our database recoveryarea. Script below queries the v$archived_log view for this information. Please note that I have tested this wi th ONE and only ONE active / valid log_archive_dest destination. I THINK that when there is more than one active log_archive_dest active these archived log entries will be written to v$archived_log as well and the query will not ‘work’ anymore. SQL> SELECT dest_i d, status, dest _n ame, destination 2 FROM v$archive dest status 3 WHERE status <> 'INACTIVE' 4 /  DEST_ID STATUS DEST_NAME DESTINATION ---------- --------- ------------------ -------------------------------------------------- 1 DISABLED LOG_ ARCHI VE_D EST_ 1 2 VALID LOG_ ARCHI VE_D EST_2 /ora/recoveryarea/overflow/ col arc hiv es_ m for 999,999,999,999,999 select round ( sum ( blocks * block_size ) /1024 /1024 ) archives_m from v$archived_log where first_time > to_date( '2013-AUG-30-090000', 'YYYY-MON-DD-HH24MISS') and first time < SYSDATE / Págin a 1 de 2 Script to get size of generated archived logfiles in certain timeframe | remidian.com 26/09/2015 http://remidian.com/2013/08/script-to-get-size-of-generated-archived-logfiles-in-certa...

Upload: modesto-lopez-ramos

Post on 02-Mar-2018

215 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Script to Get Size of Generated Archived Logfiles in Certain Timeframe

7/26/2019 Script to Get Size of Generated Archived Logfiles in Certain Timeframe

http://slidepdf.com/reader/full/script-to-get-size-of-generated-archived-logfiles-in-certain-timeframe 1/2

Published on Aug 30 2013 # 182 (182 reads)

oracle (http://remidian.com/category/oracle/)/scripts (http://remidian.com/category/oracle/scripts/)

Script to get size of generatedarchived logfiles in certain

timeframe

I’m testing a import datapump load procedure and I need to know the approximate size of 

generated archives that this load will generate to determine the size needed for our database

recoveryarea.

Script below queries the v$archived_log view for this information.

Please note that I have tested this with ONE and only ONE active / valid log_archive_dest

destination. I THINK that when there is more than one active log_archive_dest active these

archived log entries will be written to v$archived_log as well and the query will not ‘work’ anymore.

SQL> SELECT dest_id, status, dest_name, destination

2 FROM v$archive_dest_status

3 WHERE status <> 'INACTIVE'

4 /

  DEST_ID STATUS DEST_NAME DESTINATION

---------- --------- ------------------

--------------------------------------------------

1 DISABLED LOG_ARCHIVE_DEST_1

2 VALID LOG_ARCHIVE_DEST_2 /ora/recoveryarea/overflow/

col archives_m for 999,999,999,999,999

select round ( sum ( blocks * block_size ) /1024 /1024 ) archives_mfrom v$archived_log

where first_time > to_date( '2013-AUG-30-090000', 'YYYY-MON-DD-HH24MISS')

and first_time < SYSDATE

/

Página 1 de 2Script to get size of generated archived logfiles in certain timeframe | remidian.com

26/09/2015http://remidian.com/2013/08/script-to-get-size-of-generated-archived-logfiles-in-certa...

Page 2: Script to Get Size of Generated Archived Logfiles in Certain Timeframe

7/26/2019 Script to Get Size of Generated Archived Logfiles in Certain Timeframe

http://slidepdf.com/reader/full/script-to-get-size-of-generated-archived-logfiles-in-certain-timeframe 2/2

SQL> select round ( sum ( blocks * block_size ) /1024 /1024 ) archives_m

2 from v$archived_log

3 where first_time > to_date( '2013-AUG-30-090000', 'YYYY-MON-DD-HH24MIS

S')

4 and first_time < SYSDATE

5 /  ARCHIVES_M

--------------------

24,142

SQL>

OK – I can report back to project the approximate size needed for our recoveryarea to ‘survive’

our new load interface.

Página 2 de 2Script to get size of generated archived logfiles in certain timeframe | remidian.com

26/09/2015http://remidian.com/2013/08/script-to-get-size-of-generated-archived-logfiles-in-certa...