Total combined size of Archived logs

DB version : 11.2
Platform : AIX
How can I determine the total size of archive logs for a particular DB?
Googling and OTN search didn't provide much details
Didn't get the solution from the following thread either as it digressed from the subject
Re: archive log size
The redo log size for our DB is 100 mb.
SQL> select count(*) from v$archived_log where status = 'A' and name is not null;
  COUNT(*)
        22
So, I can multiply 22*100 = 2200 mb . But there has been some manual switches, the size of those files will be less. This is why I am looking for an accurate way to determine the total size of Archive logs.

Hello;
V$ARCHIVED_LOG contains BLOCKS ( Size of the archived log (in blocks) ) and BLOCK_SIZE ( which is the same as the logical block size of the online log from which the archived log was copied )
So with a little help in the query you should be able to get it.
Archivelog size each day
select
  trunc(COMPLETION_TIME) TIME,
  SUM(BLOCKS * BLOCK_SIZE)/1024/1024 SIZE_MB
from
  V$ARCHIVED_LOG
group by
trunc (COMPLETION_TIME) order by 1;Since COMPLETION_TIME is a DATE you can add another SUM to the query to get the exact total you want for the exact date range you want.
Archivelog size each hour
alter session set nls_date_format = 'YYYY-MM-DD HH24';
select
  trunc(COMPLETION_TIME,'HH24') TIME,
   SUM(BLOCKS * BLOCK_SIZE)/1024/1024 SIZE_MB
from
  V$ARCHIVED_LOG
group by
  trunc (COMPLETION_TIME,'HH24') order by 1;Another example
SELECT   To_char(completion_time,'YYYYMMDD')    run_date,
         Round(Sum(blocks * block_size + block_size) / 1024 / 1024 / 1024) redo_blocks
FROM     v$archived_log
GROUP BY To_char(completion_time,'YYYYMMDD')
ORDER BY 2
/Best Regards
mseberg
Edited by: mseberg on Feb 23, 2012 2:30 AM

Similar Messages

  • Urgent: Huge diff in total redo log size and archive log size

    Dear DBAs
    I have a concern regarding size of redo log and archive log generated.
    Is the equation below is correct?
    total size of redo generated by all sessions = total size of archive log files generated
    I am experiencing a situation where when I look at the total size of redo generated by all the sessions and the size of archive logs generated, there is huge difference.
    My total all session redo log size is 780MB where my archive log directory size has consumed 23GB.
    Before i start measuring i cleared up archive directory and started to monitor from a specific time.
    Environment: Oracle 9i Release 2
    How I tracked the sizing information is below
    logon as SYS user and run the following statements
    DROP TABLE REDOSTAT CASCADE CONSTRAINTS;
    CREATE TABLE REDOSTAT
    AUDSID NUMBER,
    SID NUMBER,
    SERIAL# NUMBER,
    SESSION_ID CHAR(27 BYTE),
    STATUS VARCHAR2(8 BYTE),
    DB_USERNAME VARCHAR2(30 BYTE),
    SCHEMANAME VARCHAR2(30 BYTE),
    OSUSER VARCHAR2(30 BYTE),
    PROCESS VARCHAR2(12 BYTE),
    MACHINE VARCHAR2(64 BYTE),
    TERMINAL VARCHAR2(16 BYTE),
    PROGRAM VARCHAR2(64 BYTE),
    DBCONN_TYPE VARCHAR2(10 BYTE),
    LOGON_TIME DATE,
    LOGOUT_TIME DATE,
    REDO_SIZE NUMBER
    TABLESPACE SYSTEM
    NOLOGGING
    NOCOMPRESS
    NOCACHE
    NOPARALLEL
    MONITORING;
    GRANT SELECT ON REDOSTAT TO PUBLIC;
    CREATE OR REPLACE TRIGGER TR_SESS_LOGOFF
    BEFORE LOGOFF
    ON DATABASE
    DECLARE
    PRAGMA AUTONOMOUS_TRANSACTION;
    BEGIN
    INSERT INTO SYS.REDOSTAT
    (AUDSID, SID, SERIAL#, SESSION_ID, STATUS, DB_USERNAME, SCHEMANAME, OSUSER, PROCESS, MACHINE, TERMINAL, PROGRAM, DBCONN_TYPE, LOGON_TIME, LOGOUT_TIME, REDO_SIZE)
    SELECT A.AUDSID, A.SID, A.SERIAL#, SYS_CONTEXT ('USERENV', 'SESSIONID'), A.STATUS, USERNAME DB_USERNAME, SCHEMANAME, OSUSER, PROCESS, MACHINE, TERMINAL, PROGRAM, TYPE DBCONN_TYPE,
    LOGON_TIME, SYSDATE LOGOUT_TIME, B.VALUE REDO_SIZE
    FROM V$SESSION A, V$MYSTAT B, V$STATNAME C
    WHERE
    A.SID = B.SID
    AND
    B.STATISTIC# = C.STATISTIC#
    AND
    C.NAME = 'redo size'
    AND
    A.AUDSID = sys_context ('USERENV', 'SESSIONID');
    COMMIT;
    END TR_SESS_LOGOFF;
    Now, total sum of REDO_SIZE (B.VALUE) this is far less than archive log size. This at time when no other user is logged in except myself.
    Is there anything wrong with query for collecting redo information or there are some hidden process which doesnt provide redo information on session basis.
    I have seen the similar implementation as above at many sites.
    Kindly provide a mechanism where I can trace which user is generated how much redo (or archive log) on a session basis. I want to track which all user/process are causing high redo to generate.
    If I didnt find a solution I would raise a SR with Oracle.
    Thanks
    [V]

    You can query v$sess_io, column block_changes to find out which session generating how much redo.
    The following query gives you the session redo statistics:
    select a.sid,b.name,sum(a.value) from v$sesstat a,v$statname b
    where a.statistic# = b.statistic#
    and b.name like '%redo%'
    and a.value > 0
    group by a.sid,b.name
    If you want, you can only look for redo size for all the current sessions.
    Jaffar

  • Why size of archive log file increasing in merge clause

    my database is running in archive log mode.
    someone is running oracle merge statement. still it is running.
    He will issue commit after the operation.
    in that period redolog file increasing now.
    my question is why size of archive log file increasing with redolog file.
    i know that after commit archive log file should generate.(may be it is wrong).
    please suggest........
    Edited by: 855516 on Mar 13, 2012 11:18 AM

    855516 wrote:
    my database is running in archive log mode.
    someone is running oracle merge statement. still it is running.
    He will issue commit after the operation.
    in that period redolog file increasing now.
    my question is why size of archive log file increasing with redolog file.
    i know that after commit archive log file should generate.(may be it is wrong). No this is not correct that after commit archive log will generate....You know merge statement causes the insert (if data not present already) or update if database is present.. Obviously these operation will generate lots of redo if the amount of data been processed is high.
    If you feel that this operation is causing excessive of redo then root cause analysis should be done...
    For that use Logminer (excellent tool to provide segment level breakdown of redo size). V$logmnr_contens has columns redo block and redo byte address associated with the current redo
    change
    There are some gudlines in order to reduce redos( which may vary in any environment)
    1) check if there are unwanted indexes being used in tables which are refereed in merge. If yes then remove those could bring down the redo
    2) Use global temporary tables to reduce redo (if there is a need to keep data only temporarily in a session)
    3) Use nologging if possible (but see its implications)
    Hope this helps

  • Size of archived logs

    Hi,
    1- how can we define size of archived logs in 10g R2 ?
    2- how can we define size of archived logs in 8.1.7?
    Thank you.

    You can not drop any logfile member which belongs to a current log group. to drop any member from non current group is
    alter database drop logfile member 'C:\ORACLE\PRODUCT\10.1.0\ORADATA\ORCL\REDO02A.LOG';
    You can add one member in the following way as
    alter database add logfile member 'C:\ORACLE\PRODUCT\10.1.0\ORADATA\ORCL\REDO02A.LOG' to group 2;
    But one thing all these are available in Oracle docs and you better find yourself to enhance your knowledge.
    Thanks

  • How to know the size of archived logs created under ASM

    I using Oracle 10g on Linux x86-64.
    I need to ship the archived logs(not the entire directory, only a few) from the Live database to the DR site, so I need an estimate of how much time it will take to ship them across the network ?
    Is there anyway I can know the size of a specific archived log file stored under ASM ?
    We can use du in ASM to know the size of directory but I dont find a command in ASM to get the size of a file ?

    No we are also switching logfiles manually , so the maximum size may not
    have reached.
    What I need is something like ls -l command in the Unix prompt which will
    help us to find the size of the file , a similar command to help us determine
    a size of file in ASM ?What is the objective?
    Anyways, you can get the size of an archived log file by quering V$ARCHIVED_LOG view.
    SQL> select sequence#, name, blocks*block_size from v$archived_log where sequence# > 180;
    SEQUENCE# NAME                                     BLOCKS*BLOCK_SIZE
           182 C:\MYDB\ARCH\ARC00182_0633314306.001             223053312
           181 C:\MYDB\ARCH\ARC00181_0633314306.001             264281600
           183 C:\MYDB\ARCH\ARC00183_0633314306.001              26209280
           184 C:\MYDB\ARCH\ARC00184_0633314306.001                  4096
           185 C:\MYDB\ARCH\ARC00185_0633314306.001                 16384
    SQL>

  • Size of archived log

    hi,
    i'm so nervous ... this is my 1st day become dba.
    I maintain production database contain 8 tablespace ....
    with whole size tablespace 210 GB.
    My Boss asked me to make the database in archivelog mode with retention guarantee for 7 days.
    What I want to ask .... Approximately How much size of redolog file .... with how many log_archive_destination.
    regards,
    indra

    the retention is based on your backup strategy.
    how do you backup your database. Do you cold backups or RMAN.
    If you use RMAN, it has all the necessary things in terms of retention.
    Check out the RMAN features specific to the version of the database you are using.
    My advice to you would be take sometime out to think what is the request and then work towards it as its a PROD system and you need to be careful.

  • Duplexing the Archive Log - is there a potential performance hit

    Good Afternoon Oracle People -
    I apologize if this question is silly or out of place.
    Basically, we are looking at options for implementing a (cheap) DR solution for our Oracle Database.
    Bottom line objective is to have a second copy of our production system (not running, offline) with a usable archive log to recover from at a remote site with a similar set of disk technologies etc. 
    The sites are linked by 100MBPs link - so any access to secondary site is relatively fast.
    What I was thinking of doing is creating an iSCSI target on the destination SAN and adding this as a disk into the production database.  Then, I was going to go in and define a duplex archive log destination to this iSCSI target.
    My fear is that if the archiver waits for the write to the destination, I would imagine that this would slow down database access.  Is this a valid concern?  Or does Oracle treat the Duplex as a replicated (slower) copy?
    Again, sorry if this question is stupid - i have tried the google machine but couldn't find anything, and it isn't all that clear from the documentation. 
    Kind Regards,
    Aleksei

    Or does Oracle treat the Duplex as a replicated (slower) copy?
    Oracle treats it in a way you tell Oracle to treat it – please take a look at LOG_ARCHIVE_DEST_n parameters such as MANDATORY and OPTIONAL, MAX_FAILURE, etc
    There are two major things to consider:
    ->Is the throughput of the destination enough to handle max archive log generation?
    You need to take a look at the size of archive logs and how frequently they are
    generated during peak load.
    ->What happens when the destination is not available?
    HTH,
    Iordan Iotzov

  • Archived log

    hi
    size of archived log on my system is growing very rapidly. i have to delete the enteries in archive log file on weekly basis. how can i do it?

    If you are using RMAN to backup your database, you should also use RMAN to backup and delete archived log files.
    If you are not using RMAN, you must use an OS command (Unix: rm / Windows: del) to delete archived log files after making sure that they have been correctly backed up.
    See also:
    Delete old archived log files
    Message was edited by:
    Pierre Forstmann

  • Archive log mode

    Hi
    i m using oracle 10gR2 after installation i enable the archive log mode.
    1) How can i determine the size of archive log?
    2)When i enable the archive log mode after switch it genrate the second archive (01_MF_1_2_43.ARC) instead of first (01_MF_1_1_43.ARC) why?
    Thanks

    The size of archived logs will normally be the same as the size of online redo logs. However, if you switch the logs before the get filled with redo, the size of archived log will be smaller depending in the amount of redo.

  • Overheads for Archive Logs

    Hi,
    Not sure where I should address this but I would appreciate any helpful feedback.
    I would like to find out what are the overheads (in terms of size) for managing & storing archive logs for capacity planning purposes. Is this information documented anywhere? How can I find out?
    Thanks in advance.
    Thanks,
    Tony

    Since this number is dependent on your database, it would be impossible to answer. If you have a small database with few changes/deletes, you hardly need any space for archive logs. Oracle reccommends that you size your archive logs so that they switch ~1 time per hour.

  • Get Total DB size , Total DB free space , Total Data & Log File Sizes and Total Data & Log File free Sizes from a list of server

    how to get SQL server Total DB size , Total DB free space , Total Data  & Log File Sizes and Total Data  & Log File free Sizes from a list of server 

    Hi Shivanq,
    To get a list of databases, their sizes and the space available in each on the local SQL instance.
    dir SQLSERVER:\SQL\localhost\default\databases | Select Name, Size, SpaceAvailable | ft -auto
    This article is also helpful for you to get DB and Log File size information:
    Checking Database Space With PowerShell
    I hope this helps.

  • Why the flashback log'size smaller than the archived log ?

    hi, all . why the flashback log'size smaller than the archived log ?

    Lonion wrote:
    hi, all . why the flashback log'size smaller than the archived log ?Both are different.
    Flash logs size depends on parameter DB_FLASHBACK_RETENTION_TARGET , how much you want to keep.
    Archive log files is dumped file of Online redo log files, It can be either size of Online redo log file size or less depending on online redo size when switch occurred.
    Some more information:-
    Flashback log files can be created only under the Flash Recovery Area (that must be configured before enabling the Flashback Database functionality). RVWR creates flashback log files into a directory named “FLASHBACK” under FRA. The size of every generated flashback log file is again under Oracle’s control. According to current Oracle environment – during normal database activity flashback log files have size of 8200192 bytes. It is very close value to the current redo log buffer size. The size of a generated flashback log file can differs during shutdown and startup database activities. Flashback log file sizes can differ during high intensive write activity as well.
    Source:- http://dba-blog.blogspot.in/2006/05/flashback-database-feature.html
    Edited by: CKPT on Jun 14, 2012 7:34 PM

  • Archive Log file size

    I am using Oracle database 9.2.0.1.0, My OS is Linux AS4 Update version.
    My database is in archive log mode, the archive file size generated on disk is 100 MB. I want to monitor the reason that why the size of redo generated is too big.
    Kindly suggest.
    Regards

    Archived log file size will always be the same size as redo log or less than the redo log size (but never bigger than redo log size)
    ARCHIVE_LAG_TARGET is the reason (apart from manual archiving ALTER SYSTEM ARCHIVE LOG CURRENT/ALL) why you see archived logs with lesser size than redo log
    why  archive log file size constanly change?

  • Archive log file size is varying in RAC 10g database.

    ---- Environment oracle 10g rac 9 node cluster database, with 3 log groups for each node with 500 mb size for each redo log file.
    Question is why would be the archive log file size is varying, i know when ever there is log file switch the redo log will be archived, So as our redo log file size is of 500 MB
    isn't the archive log file size should be the same as 500 MB?
    Instead we are seeing the archive log file is varying from 20 MB to 500 MB this means the redo log file is not using the entire 500 MB space? What would be causing this to happen? how can we resolve this?
    Some init parameter values.(just for information)
    fast_start_mttr_target ----- 400
    log_checkpoint_timeout ----- 0
    log_checkpoint_interval ----- 0
    fast_start_io_target ----- 0

    There was a similar discussion a few days back,
    log file switch before it filled up
    The guy later claimed it's because their log_buffer size. It's remain a mystery to me still.

  • Data Guard  Archive log size

    Hi Experts,
    I would like to know do we have any views where we can see the size of the archive log file transfered and applied to the physical standby database. I wanted to see how much space it takes in a day.
    Thanks
    Shaan
    Message was edited by:
    Shaan_dmp

    SQL> desc v$archived_log
    Name Null? Type
    RECID NUMBER
    STAMP NUMBER
    NAME VARCHAR2(257)
    DEST_ID NUMBER
    THREAD# NUMBER
    SEQUENCE# NUMBER
    RESETLOGS_CHANGE# NUMBER
    RESETLOGS_TIME DATE
    FIRST_CHANGE# NUMBER
    FIRST_TIME DATE
    NEXT_CHANGE# NUMBER
    NEXT_TIME DATE
    BLOCKS NUMBER
    BLOCK_SIZE NUMBER
    CREATOR VARCHAR2(7)
    REGISTRAR VARCHAR2(7)
    STANDBY_DEST VARCHAR2(3)
    ARCHIVED VARCHAR2(3)
    APPLIED VARCHAR2(3)
    DELETED VARCHAR2(3)
    STATUS VARCHAR2(1)
    COMPLETION_TIME DATE
    DICTIONARY_BEGIN VARCHAR2(3)
    DICTIONARY_END VARCHAR2(3)
    END_OF_REDO VARCHAR2(3)
    BACKUP_COUNT NUMBER
    ARCHIVAL_THREAD# NUMBER
    ACTIVATION# NUMBER
    Refer to blocks and block_size
    Other than that, you can look this up in the documentation on v$archived_log.
    Why do you act as a spoiled 3 year old, who wants everything on a golden plate, and can't be bothered to do anything himself?
    Blocks and block_size: That is really obvious, isn't it?
    It is just an issue of using your brains!!!
    Sybrand Bakker
    Senior Oracle DBA

Maybe you are looking for

  • Delete file from NOKIA C5-03 phone memory

    I still face a problem that when I buy mobile then phone memory was 40MB, but now it reduced to 30MB. I try to browse and remove unwanted file from phone memory. But nothing gonna happen.  I also use pc suite, mass storage etc, but can't. What can I

  • Multi-select prompt

    Hi All I created a Dashboard prompt and I select Multi-select control. When I previw the results all the values are apprearing in one single line. like 101102103104 etc.....Also the values has hyperlink, so if I click 101 then I am getting just 101 a

  • Can't Edit library image in Photoshop  =(

    I just installed Captivate 2 After recording my first demo, I tried to edit the slide (the "background" image in the library using the EDIT IN command. This command opens MSPaint (gahh! what a horrible program!). There is no way that I can see to tel

  • [SOLVED] Incorrect kernel version on core repository?

    I went on kernel.org this morning after I read a message somewhere about kernel 3.2 rc1 and noticed the "Latest Stable Kernel" is 3.0.4 I'm thinking to myself "odd... didn't I upgrade my arch to 3.0.6 not long ago" First thing I did was went here htt

  • Multi-SCORM Packager

    Hi You may have read a few of my discussions I have raised in the last month or so regarding Aggregator and its border issues: http://forums.adobe.com/message/4528160#4528160 http://forums.adobe.com/message/4528226#4528226 I have recently found out a