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

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

  • How to increase the size of Redo log files?

    Hi All,
    I have 10g R2 RAC on RHEL. As of now, i have 3 redo log files of 50MB size. i have used redo log size advisor by setting fast_start_mttr_target=1800 to check the optimal size of the redologs, it is showing 400MB. Now, i want to increase the size of redo log files. how to increase it?
    If we are supposed to do it on production, how to do?
    I found the following in one of the article....
    "The size of the redo log files can influence performance, because the behavior of the database writer and archiver processes depend on the redo log sizes. Generally, larger redo log files provide better performance, however it must balanced out with the expected recovery time.Undersized log files increase checkpoint activity and increase CPU usage."
    I did not understand the the point however it must balanced out with the expected recovery time in the above given paragraph.
    Can anybody help me?
    Thanks,
    Praveen.

    You dont have to shutdown the database before dropping redo log group but make sure you have atleast two other redo log groups. Also note that you cannot drop active redo log group.
    Here is nice link,
    http://www.idevelopment.info/data/Oracle/DBA_tips/Database_Administration/DBA_34.shtml
    And make sure you test this in test database first. Production should be touched only after you are really comfortable with this procedure.

  • 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.

  • Problem about space management of archived log files

    Dear friends,
    I have a problem about space management of archived log files.
    my database is Oracle 10g release 1 running in archivelog mode. I use OEM(web based) to config all the backup and recovery settings.
    I config "Flash Recovery Area" to do backup and recovery automatically. my daily backup schedule is every night at 2:00am. and my backup setting is "disk settings"--"compressed backup set". the following is the RMAN script:
    Daily Script:
    run {
    allocate channel oem_disk_backup device type disk;
    recover copy of database with tag 'ORA$OEM_LEVEL_0';
    backup incremental level 1 cumulative copies=1 for recover of copy with tag 'ORA$OEM_LEVEL_0' database;
    the retention policy is the second choice, that is "Retain backups that are necessary for a recovery to any time within the specified number of days (point-in-time recovery)". the recovery window is 1 day.
    I assign enough space for flash recovery area. my database size is about 2G. I assign 20G as flash recovery area.
    now here is the problem, through oracle online manual, it said oracle can manage the flash recovery area automatically, that is, when the space is full, it can delete the obsolete archived log files. but in fact, it never works! whenever the space is full, the database will hang up! besides, the status of archived log files is very strange, for example, it can change "obsolete" stauts from "yes" to "no", and then from "no" to "yes". I really have no idea about this! even though I know oracle usually keep archived files for some longer days than retention policy, but I really don't know why the obsolete status can change automatically. although I can write a schedule job to delete obsolete archived files every day, but I just want to know the reason. my goal is to backup all the files on disk and let oracle automatically manage them.
    also, there is another problem about archive mode. I have two oracle 10g databases(release one), the size of db1 is more than 20G, the size of db2 is about 2G. both of them have the same backup and recovery policy, except I assign more flash recovery area for db1. both of them are on archive mode. both of nearly nobody access except for the schedule backup job and sometime I will admin through oem. the strange thing is that the number of archived log files of smaller database, db2, are much bigger than ones of bigger database. also the same situation for the size of the flashback logs for point-in-time recovery. (I enable flashback logging for fast database point-in-time recovery, the flashback retention time is 24 hours.) I found the memory utility of smaller database is higher than bigger database. nearly all the time the smaller database's memory utility keeps more than 99%. while the bigger one's memory utility keeps about 97%. (I enable "Automatic Shared Memory Management" on both databases.) but both database's cup and queue are very low. I'm nearly sure no one hack the databases. so I really have no idea why the same backup and recovery policy will result so different result, especially the smaller one produces more redo logs than bigger one. does there anyone happen to know the reason or how should I do to check the reason?
    by the way, I found web based OEM can't reflect the correct database status when the database shutdown abnormally. for example, if the database hang up because of out of flash recovery area, after I assign more flash recovery area space and then restart the database, the OEM usually can't reflect the correct database status. I must restart OEM manually to correctly reflect the current database status. does there anyone know in what situation I should restart OEM to reflect the correct database status?
    sorry for the long message, I just want to describe in details to easy diagnosis.
    any hint will be greatly appreciated!
    Sammy

    thank you very much, in fact, my site's oracle never works about managing archive files automatically although I have tried all my best. at last, I made a job running daily to check the archive files and delete them.
    thanks again.

  • Roblem about space management of archived log files

    Dear friends,
    I have a problem about space management of archived log files.
    my database is Oracle 10g release 1 running in archivelog mode. I use OEM(web based) to config all the backup and recovery settings.
    I config "Flash Recovery Area" to do backup and recovery automatically. my daily backup schedule is every night at 2:00am. and my backup setting is "disk settings"--"compressed backup set". the following is the RMAN script:
    Daily Script:
    run {
    allocate channel oem_disk_backup device type disk;
    recover copy of database with tag 'ORA$OEM_LEVEL_0';
    backup incremental level 1 cumulative copies=1 for recover of copy with tag 'ORA$OEM_LEVEL_0' database;
    the retention policy is the second choice, that is "Retain backups that are necessary for a recovery to any time within the specified number of days (point-in-time recovery)". the recovery window is 1 day.
    I assign enough space for flash recovery area. my database size is about 2G. I assign 20G as flash recovery area.
    now here is the problem, through oracle online manual, it said oracle can manage the flash recovery area automatically, that is, when the space is full, it can delete the obsolete archived log files. but in fact, it never works! whenever the space is full, the database will hang up! besides, the status of archived log files is very strange, for example, it can change "obsolete" stauts from "yes" to "no", and then from "no" to "yes". I really have no idea about this! even though I know oracle usually keep archived files for some longer days than retention policy, but I really don't know why the obsolete status can change automatically. although I can write a schedule job to delete obsolete archived files every day, but I just want to know the reason. my goal is to backup all the files on disk and let oracle automatically manage them.
    also, there is another problem about archive mode. I have two oracle 10g databases(release one), the size of db1 is more than 20G, the size of db2 is about 2G. both of them have the same backup and recovery policy, except I assign more flash recovery area for db1. both of them are on archive mode. both of nearly nobody access except for the schedule backup job and sometime I will admin through oem. the strange thing is that the number of archived log files of smaller database, db2, are much bigger than ones of bigger database. also the same situation for the size of the flashback logs for point-in-time recovery. (I enable flashback logging for fast database point-in-time recovery, the flashback retention time is 24 hours.) I found the memory utility of smaller database is higher than bigger database. nearly all the time the smaller database's memory utility keeps more than 99%. while the bigger one's memory utility keeps about 97%. (I enable "Automatic Shared Memory Management" on both databases.) but both database's cup and queue are very low. I'm nearly sure no one hack the databases. so I really have no idea why the same backup and recovery policy will result so different result, especially the smaller one produces more redo logs than bigger one. does there anyone happen to know the reason or how should I do to check the reason?
    by the way, I found web based OEM can't reflect the correct database status when the database shutdown abnormally. for example, if the database hang up because of out of flash recovery area, after I assign more flash recovery area space and then restart the database, the OEM usually can't reflect the correct database status. I must restart OEM manually to correctly reflect the current database status. does there anyone know in what situation I should restart OEM to reflect the correct database status?
    sorry for the long message, I just want to describe in details to easy diagnosis.
    any hint will be greatly appreciated!
    Sammy

    thank you very much, in fact, my site's oracle never works about managing archive files automatically although I have tried all my best. at last, I made a job running daily to check the archive files and delete them.
    thanks again.

  • Private strand flush not complete how to find optimal size of redo log file

    hi,
    i am using oracle 10.2.0 on unix system and getting Private strand flush not complete in the alert log file. i know this is due to check point is not completed.
    I need to increase the size of redo log files or add new group to the database. i have log file switch (checkpoint incomplete) in the top 5 wait event.
    i can't change any parameter of database. i have three redo log group and log files are of 250MB size. i want to know the suitable size to avoid problem.
    select * from v$instance_recovery;
    RECOVERY_ESTIMATED_IOS     ACTUAL_REDO_BLKS     TARGET_REDO_BLKS     LOG_FILE_SIZE_REDO_BLKS     LOG_CHKPT_TIMEOUT_REDO_BLKS     LOG_CHKPT_INTERVAL_REDO_BLKS     FAST_START_IO_TARGET_REDO_BLKS     TARGET_MTTR     ESTIMATED_MTTR     CKPT_BLOCK_WRITES     OPTIMAL_LOGFILE_SIZE     ESTD_CLUSTER_AVAILABLE_TIME     WRITES_MTTR     WRITES_LOGFILE_SIZE     WRITES_LOG_CHECKPOINT_SETTINGS     WRITES_OTHER_SETTINGS     WRITES_AUTOTUNE     WRITES_FULL_THREAD_CKPT
    625     9286     9999     921600          9999          0     9     112166207               0     0     219270206     0     3331591     5707793please suggest me or tell me the way how to find out suitable size to avoid problem.
    thanks
    umesh

    How often should a database archive its logs
    Re: Redo log size increase and performance
    Please read the above thread and great replies by HJR sir. I think if you wish to get concept knowledge, you should add in your notes.
    "If the FAST_START_MTTR_TARGET parameter is set to limit the instance recovery time, Oracle automatically tries to checkpoint as frequently as necessary. Under this condition, the size of the log files should be large enough to avoid additional checkpointing due to under sized log files. The optimal size can be obtained by querying the OPTIMAL_LOGFILE_SIZE column from the V$INSTANCE_RECOVERY view. You can also obtain sizing advice on the Redo Log Groups page of Oracle Enterprise Manager Database Control."
    Source:http://download-west.oracle.com/docs/cd/B13789_01/server.101/b10752/build_db.htm#19559
    Pl also see ML Doc 274264.1 (REDO LOGS SIZING ADVISORY) on tips to calculate the optimal size for redo logs in 10g databases
    Source:Re: Redo Log Size in R12
    HTH
    Girish Sharma

  • 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

  • Will RMAN delete archive log files on a Standby server?

    Environment:
    Oracle 11.2.0.3 EE on Solaris 10.5
    I am currently NOT using an RMAN repository (coming soon).
    I have a Primary database sending log files to a Standby.
    My Retention Policy is set to 'RECOVERY WINDOW OF 8 DAYS'.
    Question: Will RMAN delete the archive log files on the Standby server after they become obsolete based on the Retention Policy or do I need to remove them manually via O/S command?
    Does the fact that I'm NOT using an RMAN Repository at the moment make a difference?
    Couldn't find the answer in the docs.
    Thanks very much!!
    -gary

    Hello again Gary;
    Sorry for the delay.
    Why is what you suggested better?
    No, its not better, but I prefer to manage the archive. This method works, period.
    Does that fact (running a backup every 4 hours) make my archivelog deletion policy irrelevant?
    No. The policy is important.
    Having the Primary set to :
    CONFIGURE ARCHIVELOG DELETION POLICY TO APPLIED ON STANDBYBut set to "NONE" on the Standby.
    Means the worst thing that can happen is RMAN will bark when you try to delete something. ( this is a good thing )
    How do I prevent the archive backup process from backing up an archive log file before it gets shipped to the standby?
    Should be a non-issue, the archive does not move, the REDO is transported and applied. There's SQL to monitor both ( Transport and Apply )
    For Data Guard I would consider getting a copy of
    "Oracle Data Guard 11g Handbook" - Larry Carpenter (AKA Dr. Paranoid ) ISBN 978-0-07-162111-2
    Best Oracle book I've read in 10 years. Covers a ton of ground clearly.
    Also Data Guard forum here :
    Data Guard
    Best Regards
    mseberg
    Edited by: mseberg on Apr 10, 2012 4:39 PM

  • How to recover the database when some of the archive log file get deleted.

    I am facing a problem with Oracle database, which is related to archivelogs.
    Our development database is running in archivelog mode, but we don't have backups scheduled and have no recovery catalog.
    When the database was in running condition, disk got full, so some archivelogs were deleted manually.
    After this they restarted the DB, and now DB is not coming up. Errors are as follows:
    SQL> startup
    ORACLE instance started.
    Total System Global Area 1444383504 bytes
    Fixed Size 731920 bytes
    Variable Size 486539264 bytes
    Database Buffers 956301312 bytes
    Redo Buffers 811008 bytes
    Database mounted.
    ORA-01589: must use RESETLOGS or NORESETLOGS option for database open
    SQL> alter database open resetlogs;
    alter database open resetlogs
    ERROR at line 1:
    ORA-01113: file 1 needs media recovery
    ORA-01110: data file 1: '/export/home/oracle/dev/ADVFRW/ADVFRW.system'
    SQL> recover datafile '/export/home/oracle/dev/ADVFRW/ADVFRW.system'
    ORA-00283: recovery session canceled due to errors
    ORA-01610: recovery using the BACKUP CONTROLFILE option must be done
    SQL> recover database using backup controlfile;
    ORA-00279: change 215548705 generated at 09/02/2008 17:06:10 needed for thread
    1
    ORA-00289: suggestion :
    /export/home/oracle/dev/ADVFRW/ADVFRW.archivelog1/LOG_ADVFRW_1107_1.ARC
    ORA-00280: change 215548705 for thread 1 is in sequence #1107
    Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
    /export/home/oracle/dev/ADVFRW/ADVFRW.archivelog1/LOG_ADVFRW_1107_1.ARC
    ORA-00308: cannot open archived log
    '/export/home/oracle/dev/ADVFRW/ADVFRW.archivelog1/LOG_ADVFRW_1107_1.ARC'
    ORA-27037: unable to obtain file status
    SVR4 Error: 2: No such file or directory
    Additional information: 3
    Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
    CANCEL
    Media recovery cancelled.
    SQL>
    1. How to recover the database and bring it online
    Any help will be highly appreciated.
    With Regards
    Hemant Joshi
    Edited by: hem_Kec on Sep 7, 2008 9:07 AM

    Hi,
    Archive log files are the copies of redolog files.As redo log files are circularly overwritten,oracle generates archive log file of the corresponding redo logfiles being overwritten.So if you have a backup that dates back to 10 am in the morning and if your database creashed at 3 pm,you cannot use the redo log files alone as they have incomplete information.To completely recover the database upto 3 pm,you need archive log files generated between 10 am to 3 pm. In your case since you are missing one archive log file,you cannot perform complete recovery and hence would suffer data loss.

  • Archived log file are not shifted to standby side and applied

    Hi Guru's,
    DB
    My OS Version:Windows Server 2003
    DB Version:11.2.0.1.0
    I am trying to create Physical Standby DB on my test machine after setting all the parameters and start standby db in mount mode when i do the verification of archived log files that need to be shift from pri site to standby site i am getting:
    no rows selected.
    I am following the below mentioned doc for reference
    http://docs.oracle.com/cd/E11882_01/server.112/e25608/create_ps.htm#i63561
    Can anyone from your side can help me to sort out this problem.
    Thanks in advance

    vk82 wrote:
    SQL> select max(sequence#) from v$archived_log;
    MAX(SEQUENCE#)
    39
    SQL> select process,status,sequence# from v$managed_standby;
    PROCESS STATUS SEQUENCE#
    ARCH CLOSING 38
    ARCH CLOSING 36
    ARCH CONNECTED 0
    ARCH CLOSING 37
    SQL> select max(sequence#) from v$archived_log where applied='YES';
    MAX(SEQUENCE#)
    39
    Yes the max sequence generated on primary is same as the max sequence applied on standby.
    And what is MRP and why it is important can you please let me know abt thisWhenever you created standby database, Make a habit of tail to alert log file to monitor whats happening on the standby database, Besides MRP is an Media Recovery Process , which applies archies/redo on standby database.
    MRP can apply based on the redo transport, If you are using real-time apply then Redo will be writtened to the standby redo log files at the same time recovery will be performed by MRP process, If you are not using Real-Time apply then whenever a archive generated on primary that archive will be transported to the standby and applied on the standby database.
    It is recommended to use Realtime apply, so that you can avoid much data lost.
    However you are in 11gR2, You can use below query to monitor
    SQL> SELECT * FROM V$STANDBY_EVENT_HISTOGRAM WHERE NAME = 'apply lag'  AND COUNT > 0;
    NAME             TIME UNIT                  COUNT LAST_TIME_UPDATED
    apply lag           0 seconds                 431 08/05/2012 22:14:21
    apply lag           1 seconds                   7 08/05/2012 22:13:31
    SQL>Edited by: CKPT on Nov 6, 2012 6:49 PM

  • Archived log files not registered in the Database

    I have Widows Server 2008 R2
    I have Oracle 11g R2
    I configured primary and standby database in 2 physical servers , please find below the verification:
    I am using DG Broker
    Renetly I did failover from primary to standby database
    Then I did REINSTATE DATABASE to returen the old primary to standby mode
    Then I did Switchover again
    I have problem that archive logs not registered and not imeplemented.
    SQL> select max(sequence#) from v$archived_log; 
    MAX(SEQUENCE#)
             16234
    I did alter system switch logfile then I ssue the following statment to check and I found same number in primary and stanbyd has not been changed
    SQL> select max(sequence#) from v$archived_log;
    MAX(SEQUENCE#)
             16234
    Any body can help please?
    Regards

    Thanks for reply
    What I mean after I do alter system switch log file, I can see the archived log files is generated in the physical Disk but when
    select MAX(SEQUENCE#) FROM V$ARCHIVED_LOG;
    the sequence number not changed it should increase by 1 when ever I do switch logfile.
    however I did as you asked please find the result below:
    SQL> alter system switch logfile;
    System altered.
    SQL> /
    System altered.
    SQL> /
    System altered.
    SQL> /
    System altered.
    SQL> SELECT DB_NAME,HOSTNAME,LOG_ARCHIVED,LOG_APPLIED_02,LOG_APPLIED_03,APPLIED_TIME,LOG_ARCHIVED - LOG_APPLIED_02 LOG_GAP_02,
      2  LOG_ARCHIVED - LOG_APPLIED_03 LOG_GAP_03
      3  FROM (SELECT NAME DB_NAME FROM V$DATABASE),
      4  (SELECT UPPER(SUBSTR(HOST_NAME, 1, (DECODE(INSTR(HOST_NAME, '.'),0, LENGTH(HOST_NAME),(INSTR(HOST_NAME, '.') - 1))))) HOSTNAME FROM V$INSTANCE),
      5  (SELECT MAX(SEQUENCE#) LOG_ARCHIVED FROM V$ARCHIVED_LOG WHERE DEST_ID = 1 AND ARCHIVED = 'YES'),
      6  (SELECT MAX(SEQUENCE#) LOG_APPLIED_02 FROM V$ARCHIVED_LOG WHERE DEST_ID = 2 AND APPLIED = 'YES'),
      7  (SELECT MAX(SEQUENCE#) LOG_APPLIED_03 FROM V$ARCHIVED_LOG WHERE DEST_ID = 3 AND APPLIED = 'YES'),
      8  (SELECT TO_CHAR(MAX(COMPLETION_TIME), 'DD-MON/HH24:MI') APPLIED_TIME FROM V$ARCHIVED_LOG WHERE DEST_ID = 2 AND APPLIED = 'YES');
    DB_NAME HOSTNAME           LOG_ARCHIVED   LOG_APPLIED_02    LOG_APPLIED_03     APPLIED_TIME     LOG_GAP_02      LOG_GAP_03
    EPPROD  CORSKMBBOR01     16252                  16253                        (null)                      15-JAN/12:04                  -1                   (       null)

  • Why is the transaction log file not truncated though its simple recovery model?

    My database is simple recovery model and when I view the free space in log file it shows 99%. Why doesn't my log file truncate the committed
    data automatically to free space in ldf file? When I shrink it does shrink. Please advice.
    mayooran99

    My database is simple recovery model and when I view the free space in log file it shows 99%. Why doesn't my log file truncate the committed
    data automatically to free space in ldf file? When I shrink it does shrink. Please advice.
    mayooran99
    If log records were never deleted(truncated) from the transaction log it wont show as 99% free.Simple recoveyr model
    Log truncation automatically frees space in the logical log for reuse by the transaction log and thats what you are seeing. Truncation wont change file size. It more like
    log clearing, marking
    parts of the log free for reuse. 
    As you said "When I shrink it does shrink" I dont see any issues here. Log truncation and shrink file is 2 different things.
    Please read below link for understanding "Transaction log Truncate vs Shrink"
    http://blog.sqlxdetails.com/transaction-log-truncate-why-it-didnt-shrink-my-log/

  • Oracle write archive log files continuosly

    Hi all,
    I don't know why my Oracle Database has this problem. Online log are writen to archive log file continuously(3 minutes period). My archive logfile is 300M. I have startup force my database. It work, but archive log files are writen so much. This is alert log:
    >
    Sat Jan 1 14:23:19 2011
    Successfully onlined Undo Tablespace 5.
    Sat Jan 1 14:23:19 2011
    SMON: enabling tx recovery
    Sat Jan 1 14:23:19 2011
    Database Characterset is AL32UTF8
    Opening with internal Resource Manager plan
    where NUMA PG = 1, CPUs = 16
    replication_dependency_tracking turned off (no async multimaster replication found)
    Sat Jan 1 14:23:40 2011
    WARNING: AQ_TM_PROCESSES is set to 0. System operation might be adversely affected.
    Sat Jan 1 14:24:32 2011
    db_recovery_file_dest_size of 204800 MB is 28.64% used. This is a
    user-specified limit on the amount of space that will be used by this
    database for recovery-related files, and does not reflect the amount of
    space available in the underlying filesystem or ASM diskgroup.
    Sat Jan 1 14:24:40 2011
    Completed: ALTER DATABASE OPEN
    Sat Jan 1 14:27:05 2011
    Warning: PROCESSES may be too low for current load
    shared servers=360, want 7 more but starting only 3 more
    Warning: PROCESSES may be too low for current load
    shared servers=363, want 9 more but starting only 0 more
    Sat Jan 1 14:27:39 2011
    Warning: PROCESSES may be too low for current load
    shared servers=363, want 9 more but starting only 1 more
    Warning: PROCESSES may be too low for current load
    shared servers=364, want 9 more but starting only 0 more
    Sat Jan 1 14:28:58 2011
    Thread 1 advanced to log sequence 9463 (LGWR switch)
    Current log# 3 seq# 9463 mem# 0: /u01/oradata/TNORA3/redo03a.log
    Current log# 3 seq# 9463 mem# 1: /u02/oradata/TNORA3/redo03b.log
    Sat Jan 1 14:30:20 2011
    Errors in file /opt/app/oracle/admin/TNORA3/bdump/tnora_j000_17762.trc:
    ORA-00604: error occurred at recursive SQL level 1
    ORA-00018: maximum number of sessions exceeded
    Sat Jan 1 14:39:47 2011
    Thread 1 advanced to log sequence 9464 (LGWR switch)
    Current log# 1 seq# 9464 mem# 0: /u01/oradata/TNORA3/redo01a.log
    Current log# 1 seq# 9464 mem# 1: /u02/oradata/TNORA3/redo01b.log
    Sat Jan 1 14:42:51 2011
    Errors in file /opt/app/oracle/admin/TNORA3/bdump/tnora_s008_17165.trc:
    ORA-07445: exception encountered: core dump [_intel_fast_memcpy.J()+80] [SIGSEGV] [Address not mapped to object] [0x2B8988CE2018] [] []
    Sat Jan 1 14:42:57 2011
    Thread 1 advanced to log sequence 9465 (LGWR switch)
    Current log# 2 seq# 9465 mem# 0: /u01/oradata/TNORA3/redo02a.log
    Current log# 2 seq# 9465 mem# 1: /u02/oradata/TNORA3/redo02b.log
    Sat Jan 1 14:43:11 2011
    found dead shared server 'S008', pid = (42, 1)
    Sat Jan 1 14:45:39 2011
    Thread 1 advanced to log sequence 9466 (LGWR switch)
    Current log# 3 seq# 9466 mem# 0: /u01/oradata/TNORA3/redo03a.log
    Current log# 3 seq# 9466 mem# 1: /u02/oradata/TNORA3/redo03b.log
    Sat Jan 1 14:48:47 2011
    Thread 1 cannot allocate new log, sequence 9467
    Checkpoint not complete
    Current log# 3 seq# 9466 mem# 0: /u01/oradata/TNORA3/redo03a.log
    Current log# 3 seq# 9466 mem# 1: /u02/oradata/TNORA3/redo03b.log
    Sat Jan 1 14:48:50 2011
    Thread 1 advanced to log sequence 9467 (LGWR switch)
    Current log# 1 seq# 9467 mem# 0: /u01/oradata/TNORA3/redo01a.log
    Current log# 1 seq# 9467 mem# 1: /u02/oradata/TNORA3/redo01b.log
    Sat Jan 1 14:52:11 2011
    Thread 1 advanced to log sequence 9468 (LGWR switch)
    Current log# 2 seq# 9468 mem# 0: /u01/oradata/TNORA3/redo02a.log
    Current log# 2 seq# 9468 mem# 1: /u02/oradata/TNORA3/redo02b.log
    Sat Jan 1 14:55:12 2011
    Thread 1 advanced to log sequence 9469 (LGWR switch)
    Current log# 3 seq# 9469 mem# 0: /u01/oradata/TNORA3/redo03a.log
    Current log# 3 seq# 9469 mem# 1: /u02/oradata/TNORA3/redo03b.log
    Sat Jan 1 14:58:12 2011
    Thread 1 advanced to log sequence 9470 (LGWR switch)
    Current log# 1 seq# 9470 mem# 0: /u01/oradata/TNORA3/redo01a.log
    Current log# 1 seq# 9470 mem# 1: /u02/oradata/TNORA3/redo01b.log
    Sat Jan 1 15:02:00 2011
    Thread 1 advanced to log sequence 9471 (LGWR switch)
    Current log# 2 seq# 9471 mem# 0: /u01/oradata/TNORA3/redo02a.log
    Current log# 2 seq# 9471 mem# 1: /u02/oradata/TNORA3/redo02b.log
    Sat Jan 1 15:05:16 2011
    Thread 1 advanced to log sequence 9472 (LGWR switch)
    Current log# 3 seq# 9472 mem# 0: /u01/oradata/TNORA3/redo03a.log
    Current log# 3 seq# 9472 mem# 1: /u02/oradata/TNORA3/redo03b.log
    Sat Jan 1 15:08:30 2011
    Thread 1 advanced to log sequence 9473 (LGWR switch)
    Current log# 1 seq# 9473 mem# 0: /u01/oradata/TNORA3/redo01a.log
    Current log# 1 seq# 9473 mem# 1: /u02/oradata/TNORA3/redo01b.log
    Sat Jan 1 15:11:12 2011
    Thread 1 cannot allocate new log, sequence 9474
    Checkpoint not complete
    Current log# 1 seq# 9473 mem# 0: /u01/oradata/TNORA3/redo01a.log
    Current log# 1 seq# 9473 mem# 1: /u02/oradata/TNORA3/redo01b.log
    Sat Jan 1 15:11:14 2011
    Thread 1 advanced to log sequence 9474 (LGWR switch)
    Current log# 2 seq# 9474 mem# 0: /u01/oradata/TNORA3/redo02a.log
    Current log# 2 seq# 9474 mem# 1: /u02/oradata/TNORA3/redo02b.log
    Sat Jan 1 15:14:15 2011
    Thread 1 advanced to log sequence 9475 (LGWR switch)
    Current log# 3 seq# 9475 mem# 0: /u01/oradata/TNORA3/redo03a.log
    Current log# 3 seq# 9475 mem# 1: /u02/oradata/TNORA3/redo03b.log
    >
    PLs, help me.

    This is the contait of tail -100 /opt/app/oracle/admin/TNORA3/bdump/tnora_s008_17165.trc | more
    KCBS: Tot bufs in set segwise
    KCBS: nbseg[0] is 1568
    KCBS: nbseg[1] is 1568
    KCBS: nbseg[2] is 1569
    KCBS: nbseg[3] is 1568
    KCBS: nbseg[4] is 1568
    KCBS: nbseg[5] is 1568
    KCBS: nbseg[6] is 1569
    KCBS: nbseg[7] is 1568
    KCBS: nbseg[8] is 1568
    KCBS: nbseg[9] is 1568
    KCBS: nbseg[10] is 1569
    KCBS: nbseg[11] is 1568
    KCBS: nbseg[12] is 1568
    KCBS: nbseg[13] is 1568
    KCBS: nbseg[14] is 1569
    KCBS: nbseg[15] is 1568
    KCBS: nbseg[16] is 1568
    KCBS: nbseg[17] is 1568
    KCBS: nbseg[18] is 1569
    KCBS: nbseg[19] is 1568
    KCBS: Act cnt = 15713
    KCBS: bufcnt = 31365, nb_kcbsds = 31365
    KCBS: fbufcnt = 445
    KCBS: Tot bufs in set segwise
    KCBS: nbseg[0] is 1568
    KCBS: nbseg[1] is 1568
    KCBS: nbseg[2] is 1569
    KCBS: nbseg[3] is 1568
    KCBS: nbseg[4] is 1568
    KCBS: nbseg[5] is 1568
    KCBS: nbseg[6] is 1569
    KCBS: nbseg[7] is 1568
    KCBS: nbseg[8] is 1568
    KCBS: nbseg[9] is 1568
    KCBS: nbseg[10] is 1569
    KCBS: nbseg[11] is 1568
    KCBS: nbseg[12] is 1568
    KCBS: nbseg[13] is 1568
    KCBS: nbseg[14] is 1569
    KCBS: nbseg[15] is 1568
    KCBS: nbseg[16] is 1568
    KCBS: nbseg[17] is 1568
    KCBS: nbseg[18] is 1569
    KCBS: nbseg[19] is 1568
    KCBS: Act cnt = 15713
    KCBS: bufcnt = 31365, nb_kcbsds = 31365
    KCBS: fbufcnt = 445
    KCBS: Tot bufs in set segwise
    KCBS: nbseg[0] is 1568
    KCBS: nbseg[1] is 1568
    KCBS: nbseg[2] is 1568
    KCBS: nbseg[3] is 1569
    KCBS: nbseg[4] is 1568
    KCBS: nbseg[5] is 1568
    KCBS: nbseg[6] is 1568
    KCBS: nbseg[7] is 1569
    KCBS: nbseg[8] is 1568
    KCBS: nbseg[9] is 1568
    KCBS: nbseg[10] is 1568
    KCBS: nbseg[11] is 1569
    KCBS: nbseg[12] is 1568
    KCBS: nbseg[13] is 1568
    KCBS: nbseg[14] is 1568
    KCBS: nbseg[15] is 1569
    KCBS: nbseg[16] is 1568
    KCBS: nbseg[17] is 1568
    KCBS: nbseg[18] is 1568
    KCBS: nbseg[19] is 1569
    KCBS: Act cnt = 15713
    KCBS: bufcnt = 31365, nb_kcbsds = 31365
    KCBS: fbufcnt = 444
    KCBS: Tot bufs in set segwise
    KCBS: nbseg[0] is 1568
    KCBS: nbseg[1] is 1568
    KCBS: nbseg[2] is 1568
    KCBS: nbseg[3] is 1569
    KCBS: nbseg[4] is 1568
    KCBS: nbseg[5] is 1568
    KCBS: nbseg[6] is 1568
    KCBS: nbseg[7] is 1569
    KCBS: nbseg[8] is 1568
    KCBS: nbseg[9] is 1568
    KCBS: nbseg[10] is 1568
    KCBS: nbseg[11] is 1569
    KCBS: nbseg[12] is 1568
    KCBS: nbseg[13] is 1568
    KCBS: nbseg[14] is 1568
    KCBS: nbseg[15] is 1569
    KCBS: nbseg[16] is 1568
    KCBS: nbseg[17] is 1568
    KCBS: nbseg[18] is 1568
    KCBS: nbseg[19] is 1569
    KCBS: Act cnt = 15713
    KSOLS: Begin dumping all object level stats elements
    KSOLS: Done dumping all elements. Exiting.
    Dump event group for SESSION
    Unable to dump event group - no SESSION state objectDump event group for SYSTEM
    ssexhd: crashing the process...
    Shadow_Core_Dump = partial

Maybe you are looking for

  • Itunes 10.6.1/Iphone 4s

    Hey all, I got the new iPhone 4S a couple of days ago and I have been having a few issues with iTunes. My problem is, I had previously an older version installed and obviously as this doesn't support the new iPhone, iTunes gave me the option to downl

  • Set value of SPFieldLookup programmatically

    Hi, I have a situation wherein when I add an item in List A in website A, same item needs to be added in List B in website B(Both the list have same meta data of course). I have an event handler and registered it for List A, wherein in Item Added eve

  • Normalize function: audition vs sound forge

    I am a long time sound forge user.  but the changes sony has made to the program between sf8, sf9 and now sf10, have all but destroyed my workflow and have rendered the program useless. I noticed that I can use the sony DX effects in audition, which

  • Is Office XP no longer supported in BPC 7 MS Version?

    Hi experts, Does anybody know if Office XP (Office 2002) is still supported in BPC7 (we're on Sp3)? The Installation guide does not mention it for the Admin and Client prerequisites but it does appear in section 7 (requirements for TS and Citrix). On

  • I want to say something about your QC.

    I've had ipad3 for 6 months before i found the problem about speaker. I returned it and got the new one with the yellow screen problem. I can't notice it at the first time, but when i use it often i found that screen is yellowish on the left side in