Automatic archive log

I am learning Oracle on 9i, try to set database as automatic archive log but always failed. pls help.
Thanks
Init.ora:
# Redo Log and Recovery
log_archive_start = true
log_archive_dest = %ORACLE_HOME%\database\%%ORACLE_SID%%\archive
log_archive_format = "%%ORACLE_SID%%%T%TS%S.ARC"
here the info:
SQL> archive log list
Database log mode Archive Mode
Automatic archival Disabled
Archive destination D:\oracle\ora90\RDBMS
Oldest online log sequence 12
Next log sequence to archive 14
Current log sequence 14

I am learning Oracle on 9i, try to set database as automatic archive log but always failed. pls help.
Thanks
Init.ora:
# Redo Log and Recovery
log_archive_start = true
log_archive_dest = %ORACLE_HOME%\database\%%ORACLE_SID%%\archive
log_archive_format = "%%ORACLE_SID%%%T%TS%S.ARC"
here the info:
SQL> archive log list
Database log mode Archive Mode
Automatic archival Disabled
Archive destination D:\oracle\ora90\RDBMS
Oldest online log sequence 12
Next log sequence to archive 14
Current log sequence 14 I think you're close to getting it working, you have all of the init.ora parameters set. If you do the following in SQL Plus it should work:
SHUTDOWN IMMEDIATE
STARTUP MOUNT <SID> EXCLUSIVE
ALTER DATABASE <SID> ARCHIVELOG
SHUTDOWN IMMEDIATE
STARTUP
Then run ARCHIVE LOG LIST to verify it worked.

Similar Messages

  • Archive log automatically getting deleted

    Hi,
    My Archive logs are getting automatically deleted from ASM. I keep my Archive logs in FRA. My alert log shows deletions like this:
    Deleted Oracle managed file +DATA1/orcl/archivelog/...Retention policy to recovery window is set to 24 days. The +DATA1 ASM disk has lots of free space. Archivelog deletion policy is set to None and I don't run archive deletion from rman too...
    Is there any other option I need to check?

    Thank you werner,
    Below queries show that I already have space in FRA...
    SQL> select (SPACE_LIMIT/1024/1024/1024), (SPACE_USED/1024/1024/1024), (SPACE_RECLAIMABLE/1024/1024/1024) from v$recovery_file_dest;
    (SPACE_LIMIT/1024/1024/1024) (SPACE_USED/1024/1024/1024) (SPACE_RECLAIMABLE/1024/1024/1024)
                             500                  36.6706381                          3.2632184
    SQL>
    SQL> select * from v$flash_recovery_area_usage;
    FILE_TYPE                            PERCENT_SPACE_USED PERCENT_SPACE_RECLAIMABLE NUMBER_OF_FILES
    CONTROLFILE                                         .02                         0               1
    ONLINELOG                                           .12                         0              12
    ARCHIVELOG                                         1.03                       .65              29
    BACKUPPIECE                                           0                         0               0
    IMAGECOPY                                             0                         0               0
    FLASHBACKLOG                                       6.36                      6.15             125
    6 rows selected.
    SQL>See my alert log after some "alter system switch logfile;"
    Tue Apr 27 11:17:46 2010
    Thread 1 advanced to log sequence 83570
      Current log# 109 seq# 83570 mem# 0: +DATA1/orcl/onlinelog/group_109.19715.679998731
      Current log# 109 seq# 83570 mem# 1: +DATA1/orcl/onlinelog/group_109.20362.679998737
    Tue Apr 27 11:17:47 2010
    Deleted Oracle managed file +DATA1/orcl/archivelog/2010_04_26/thread_3_seq_90114.17125.717358729
    Deleted Oracle managed file +DATA1/orcl/flashback/log_74.12659.717340839
    Deleted Oracle managed file +DATA1/orcl/flashback/log_85.18441.717351679
    Deleted Oracle managed file +DATA1/orcl/flashback/log_8.11194.717355103
    Deleted Oracle managed file +DATA1/orcl/flashback/log_9.12991.717355123
    Deleted Oracle managed file +DATA1/orcl/flashback/log_10.17043.717355141
    Deleted Oracle managed file +DATA1/orcl/flashback/log_1.15281.717355097
    Deleted Oracle managed file +DATA1/orcl/flashback/log_79.13174.717355163
    Deleted Oracle managed file +DATA1/orcl/flashback/log_138.15374.717355185
    Deleted Oracle managed file +DATA1/orcl/flashback/log_139.19996.717357319
    Tue Apr 27 11:17:48 2010
    Thread 1 advanced to log sequence 83571
      Current log# 105 seq# 83571 mem# 0: +DATA1/orcl/onlinelog/group_105.12632.679998535
      Current log# 105 seq# 83571 mem# 1: +DATA1/orcl/onlinelog/group_105.15649.679998539
    Tue Apr 27 11:17:49 2010
    Deleted Oracle managed file +DATA1/orcl/archivelog/2010_04_26/thread_2_seq_87077.21363.717362485
    Tue Apr 27 11:17:49 2010
    Deleted Oracle managed file +DATA1/orcl/archivelog/2010_04_26/thread_4_seq_87136.11714.717365975
    Deleted Oracle managed file +DATA1/orcl/flashback/log_129.20212.717344739
    Deleted Oracle managed file +DATA1/orcl/flashback/log_140.11185.717358727
    Deleted Oracle managed file +DATA1/orcl/flashback/log_5.21454.717358739
    Deleted Oracle managed file +DATA1/orcl/flashback/log_11.15673.717358753
    Deleted Oracle managed file +DATA1/orcl/flashback/log_87.12289.717358783
    Deleted Oracle managed file +DATA1/orcl/flashback/log_12.21878.717358779
    Deleted Oracle managed file +DATA1/orcl/flashback/log_141.17658.717358807
    Deleted Oracle managed file +DATA1/orcl/flashback/log_143.20355.717358847
    Deleted Oracle managed file +DATA1/orcl/flashback/log_142.15020.717358817
    Deleted Oracle managed file +DATA1/orcl/flashback/log_145.11651.717358889
    Deleted Oracle managed file +DATA1/orcl/flashback/log_137.13239.717351771
    Deleted Oracle managed file +DATA1/orcl/flashback/log_86.20900.717355183
    Deleted Oracle managed file +DATA1/orcl/flashback/log_147.11174.717362357
    Deleted Oracle managed file +DATA1/orcl/flashback/log_146.10495.717358957
    Deleted Oracle managed file +DATA1/orcl/flashback/log_149.14900.717362391
    Deleted Oracle managed file +DATA1/orcl/flashback/log_150.19760.717362403
    Deleted Oracle managed file +DATA1/orcl/flashback/log_14.20074.717362515
    Deleted Oracle managed file +DATA1/orcl/flashback/log_148.12779.717362383
    Deleted Oracle managed file +DATA1/orcl/flashback/log_13.15276.717362485
    Deleted Oracle managed file +DATA1/orcl/flashback/log_151.13222.717365933
    Deleted Oracle managed file +DATA1/orcl/flashback/log_152.21251.717365947
    Tue Apr 27 11:17:53 2010
    Thread 1 advanced to log sequence 83572
      Current log# 104 seq# 83572 mem# 0: +DATA1/orcl/onlinelog/group_104.18737.679998357
      Current log# 104 seq# 83572 mem# 1: +DATA1/orcl/onlinelog/group_104.17641.679998363
    Tue Apr 27 11:17:53 2010
    Deleted Oracle managed file +DATA1/orcl/archivelog/2010_04_26/thread_1_seq_83563.18107.717366141
    Tue Apr 27 11:17:54 2010
    Deleted Oracle managed file +DATA1/orcl/archivelog/2010_04_26/thread_4_seq_87137.10526.717366139
    Deleted Oracle managed file +DATA1/orcl/flashback/log_153.20718.717365963
    Deleted Oracle managed file +DATA1/orcl/flashback/log_17.21619.717365977
    Deleted Oracle managed file +DATA1/orcl/flashback/log_18.20172.717365989
    Deleted Oracle managed file +DATA1/orcl/flashback/log_19.12078.717366005
    Deleted Oracle managed file +DATA1/orcl/flashback/log_48.19221.717366017
    Deleted Oracle managed file +DATA1/orcl/flashback/log_154.14279.717366053
    Deleted Oracle managed file +DATA1/orcl/flashback/log_155.14745.717366079
    Deleted Oracle managed file +DATA1/orcl/flashback/log_156.17031.717366101
    Tue Apr 27 11:18:07 2010
    Deleted Oracle managed file +DATA1/orcl/archivelog/2010_04_27/thread_2_seq_87079.20751.717379897
    Deleted Oracle managed file +DATA1/orcl/flashback/log_157.10653.717366127
    Deleted Oracle managed file +DATA1/orcl/flashback/log_144.17927.717358881
    Deleted Oracle managed file +DATA1/orcl/flashback/log_2.18495.717366169
    Deleted Oracle managed file +DATA1/orcl/flashback/log_20.16857.717369567
    Deleted Oracle managed file +DATA1/orcl/flashback/log_16.12724.717363263
    Deleted Oracle managed file +DATA1/orcl/flashback/log_23.13471.717369587
    Deleted Oracle managed file +DATA1/orcl/flashback/log_89.16244.717369613
    Deleted Oracle managed file +DATA1/orcl/flashback/log_88.11076.717369605
    Deleted Oracle managed file +DATA1/orcl/flashback/log_158.11103.717369643
    Deleted Oracle managed file +DATA1/orcl/flashback/log_159.21379.717369685
    Deleted Oracle managed file +DATA1/orcl/flashback/log_15.22226.717362555
    Deleted Oracle managed file +DATA1/orcl/flashback/log_160.13946.717369711
    Deleted Oracle managed file +DATA1/orcl/flashback/log_6.14447.717369491
    Deleted Oracle managed file +DATA1/orcl/flashback/log_24.11233.717373129
    Deleted Oracle managed file +DATA1/orcl/flashback/log_76.10929.717373141
    Deleted Oracle managed file +DATA1/orcl/flashback/log_90.12864.717373157
    Deleted Oracle managed file +DATA1/orcl/flashback/log_163.13475.717373171
    Deleted Oracle managed file +DATA1/orcl/flashback/log_164.20384.717373187
    Deleted Oracle managed file +DATA1/orcl/flashback/log_165.15963.717373215
    Deleted Oracle managed file +DATA1/orcl/flashback/log_166.20629.717373249
    Deleted Oracle managed file +DATA1/orcl/flashback/log_167.21197.717373279
    Deleted Oracle managed file +DATA1/orcl/flashback/log_161.13500.717369751
    Deleted Oracle managed file +DATA1/orcl/flashback/log_25.13335.717373553
    Deleted Oracle managed file +DATA1/orcl/flashback/log_162.17288.717372027
    Deleted Oracle managed file +DATA1/orcl/flashback/log_22.20002.717372205
    Deleted Oracle managed file +DATA1/orcl/flashback/log_91.16639.717376749
    Deleted Oracle managed file +DATA1/orcl/flashback/log_92.15382.717376759
    Deleted Oracle managed file +DATA1/orcl/flashback/log_169.19652.717376787
    Deleted Oracle managed file +DATA1/orcl/flashback/log_170.14527.717376801
    Deleted Oracle managed file +DATA1/orcl/flashback/log_168.10371.717376781
    Tue Apr 27 11:21:28 2010
    Thread 1 advanced to log sequence 83573
      Current log# 103 seq# 83573 mem# 0: +DATA1/orcl/onlinelog/group_103.11697.679998293
      Current log# 103 seq# 83573 mem# 1: +DATA1/orcl/onlinelog/group_103.21923.679998297
    Tue Apr 27 11:21:28 2010
    Deleted Oracle managed file +DATA1/orcl/archivelog/2010_04_27/thread_1_seq_83564.19690.717379897
    Deleted Oracle managed file +DATA1/orcl/archivelog/2010_04_27/thread_2_seq_87080.11232.717383337
    Tue Apr 27 11:22:10 2010
    Deleted Oracle managed file +DATA1/orcl/flashback/log_26.12608.717374927
    Deleted Oracle managed file +DATA1/orcl/flashback/log_27.12714.717380335
    Deleted Oracle managed file +DATA1/orcl/flashback/log_33.17297.717380353
    Deleted Oracle managed file +DATA1/orcl/flashback/log_34.14547.717380371
    Deleted Oracle managed file +DATA1/orcl/flashback/log_36.17079.717380389
    Deleted Oracle managed file +DATA1/orcl/flashback/log_93.18491.717380407
    Deleted Oracle managed file +DATA1/orcl/flashback/log_174.10790.717380465
    Tue Apr 27 11:22:11 2010
    Thread 1 advanced to log sequence 83574
      Current log# 108 seq# 83574 mem# 0: +DATA1/orcl/onlinelog/group_108.15776.679998703
      Current log# 108 seq# 83574 mem# 1: +DATA1/orcl/onlinelog/group_108.13383.679998709
    Tue Apr 27 11:22:11 2010
    Deleted Oracle managed file +DATA1/orcl/archivelog/2010_04_27/thread_1_seq_83566.16358.717383421
    Deleted Oracle managed file +DATA1/orcl/archivelog/2010_04_27/thread_4_seq_87141.11563.717383423
    Deleted Oracle managed file +DATA1/orcl/archivelog/2010_04_27/thread_3_seq_90119.12158.717383423
    Tue Apr 27 11:22:25 2010Edited by: OSSGeek on Apr 27, 2010 12:49 AM

  • Script for automatic delete of archive logs/redologs

    Hi Experts,
    Do you have any idea on how to create a shell script. Actually the function of it, is to automatically deletes the archive logs/redologs if reaches the limit. Or is there any parameter to change to set the automatic deletion of archive logs/redologs.
    Regards

    Hi,
    at first, archivelogs should always be saved to tape before you delete them. If you don't want to backup them, may be for a test system, you can suppress them in ORACLE instead to delete them later.
    You can run the database in "NOARCHIVE LOG MODE". If you do so, the online redologs are not archived, they are still reused and overwritten. You can not run an online Backup, when the database is in noarchive log mode. If you want to backup the database, you have to run an offline backup.
    Do not use the NOARCHIVE LOG MODE for production or developemet systems.
    To change the archive log mode:
    shutdown the database
    startup mount;
    alter database noarchivelog;
    alter database open;
    archive log list       will show the actual status
    regards Ulrich

  • Cleanup job to remove archive logs automatically through OEM Grid control

    Hi All,
    I am working on 11gR2 3node RAC database. we have enabled archivelog mode for the databases and don't have any backup processes (like rman) and not using ASM.
    Please let me know how to cleanup the old archivelogs automatically through oem Grid control.
    I have some idea how to do it in standalone database, but not sure how it works in RAC environment through OEM. Please let me know.
    Thanks in advance.

    Hari wrote:
    Thanks for your reply and The requirement is, put the DB in archive log mode and cleanup the old archive logs which is more than 5days. We are doing this because of space issue and don't have backup for these files and the DB must be in archive log mode.
    I have few question here.
    1. Is it must to take the backup of the archive log files and before delete them?No, but if you aren't backing up, why create the archivelogs in the first place?
    2. If i delete them without backup, what is the negative impact?If you aren't backing up the database in the first place (as you stated in an earlier post) then it really doesn't matter what you do with the archivelogs as they are worthless anyway.
    3. What is the recommended process to do it?My recommendation is you first start using rman to backup the database
    4. I need to setup this process through OEM grid control.
    Please let me know.
    Thanks,
    HariIt all begs the question which has already been asked and you avoided answering . . . if you are not taking backups, why bother archiving? The archive logs have ZERO VALUE outside of a consistent backup strategy. So how is it you have a 'requirement' to run in archivelog mode but no requirement for backups?
    Edited by: EdStevens on Dec 2, 2011 9:30 PM

  • "Database log mode" &  "Automatic archival"

    I was asked to do the below
    "Database log mode" should be set to
    "No Archive Mode" now.
    Do not mix up "Database log mode" with
    "Automatic archival".
    Can you please tell me how to "disable databse log mode", with Automatic Archival enabled.
    Regards,
    Susan

    From documentation:
    ARCHIVELOG mode
    The mode of the database in which Oracle copies filled online redo logs to disk. Specify the mode at database creation or by using the ALTER DATABASE statement. You can enable automatic archiving either dynamically using the ALTER SYSTEM statement or by setting the initialization parameter LOG_ARCHIVE_START to TRUE.
    Running the database in ARCHIVELOG mode has several advantages over NOARCHIVELOG mode. You can:
    * Back up the database while it is open and being accessed by users.
    * Recover the database to any desired point in time.
    To protect the ARCHIVELOG mode database in case of failure, back up the archived logs.
    Configuring ARCHIVELOG Mode For the Database<a>
    <br>
    Or you can check this tutorial from Oracle:
    Disabling Automatic Archiving
    <br>
    <br>
    Or something like this:<br>
    sqlplus /nolog
    connect / as sysdba
    shutdown
    startup mount exclusive
    alter database noarchivelog
    alter database open
    <br>
    And I don't know if it's needed to have automatic archival enabled since the database will not be in archive mode.

  • Archive log can not ship to GAP logfiles to standby DB automatically

    we have a non-real time standby database, which will receive the archive file from the primary database server most of the time, and will apply the logfiles only at one point of time daily.
    Some times, we need to shutdown the Standby DB server for a while ( 3-4 hours).
    The missed logfiles will catch up during the standby down time later.
    But since last week we had an storage incident, the primary DB server stops to catch up the missed logfiles, and saw this message at the archvie trace file:
    ABC: tkrsf_al_read: No mirror copies to re-read data
    Current, we found the archive log gaps on the standby server, and have to manually copy those logfiles over and register them.
    Saw some tips on the internet to change the parameter "log_archive_max_processes", but no help for us at all.
    Here is the parameter on the Primary DB server:
    log_archive_dest_2 = SERVICE=Standby_server reopen=300

    which will receive the archive file from the primary database server most of the timeMost times from primary. Then remaining times? so you Copy manually and register?
    Then it's dataguard not an manual standby.
    Error 1034 received logging on to the standby
    Errors in file /******/***arc210536.trc:
    ORA-01034: ORACLE not available
    FAL[server, ARC2]: FAL archive failed, see trace file.these errors in primary when , stanby is down and when primary tries to connect to standby, so tese errors not considerable to investigate ,
    When you don't want to apply archives on standby no need to shutdown. Just put this value log_archive_dest_state_2='defer'
    Once you enable check what are the errors in primary alert log file.
    How is your network band width speed? Is it capable to hold that much archive data?
    May be it will take some time when you pause & start.
    Also use LGWR in log_archive_dest_2 for real time apply after creatin standby redo logs.
    So post the alert log information once you enable standby database.

  • Automatically removing archive logs

    I'm currentyl running level 0 and level 1 backups and then removing archive logs using the following command:
    backup incremental level 0 database diskratio=0 plus archivelog delete input;
    I want to retain a weeks worth of archive logs on disk, I'd like to still use RMAN to manage the archive logs. Any suggestion how I would do so?
    TIA

    Don't use the DELETE INPUT and have another delete command that deletes the archivelogs once you know the backup was successful.
    RMAN> delete noprompt archivelog all completed before 'sysdate - 7';

  • Logical standby | archive log deleted | how to remove gap ???

    hi gurus...
    i have problem on logical standby
    by mistake standby log coming to logical standby has been deleted , now how to fill up the gap ???
    ON STANDBY
    SEQUENCE# FIRST_CHANGE# NEXT_CHANGE# APPLIED
    228 674847 674872 YES
    229 674872 674973 CURRENT
    230 674973 674997 NO
    231 674997 675023 NO
    232 675023 675048 NO
    233 675048 675109 NO
    234 675109 675135 NO
    235 675135 675160 NO
    236 675160 675183 NO
    237 675183 675208 NO
    238 675208 675232 NO
    239 675232 675257 NO
    240 675257 675282 NO
    241 675282 675382 NO
    242 675382 675383 NO
    243 675383 675650 NO
    244 675650 675652 NO
    245 675652 675670 NO
    246 675670 675688 NO
    247 675688 675791 NO
    248 675791 678524 NO
    archive log are shipping to standby location also and getting registered
    ALERT LOG OF STANDBY
    Fri May 7 12:25:36 2010
    Primary database is in MAXIMUM PERFORMANCE mode
    RFS[21]: Successfully opened standby log 5: '/u01/app/oracle/oradata/BEST/redo05.log'
    Fri May 7 12:25:37 2010
    RFS LogMiner: Registered logfile [u01/app/oracle/flash_recovery_area/BEST/archivelog/archBEST_248_1_715617824.dbf] to LogMiner session id [1]
    but i dont have standby log after 229 sequence ...
    ON PRIMARY
    SYS@TEST AS SYSDBA> archive log list
    Database log mode Archive Mode
    Automatic archival Enabled
    Archive destination /u01/app/oracle/flash_recovery_area/TEST/standlogOldest online log sequence 247
    Next log sequence to archive 249
    Current log sequence 249
    what to do next to apply sequences and bring both in sync.
    please help me ,,,,
    Edited by: user12281508 on May 7, 2010 9:45 AM

    thanks for response.
    no its pure logical standby
    i have tried to ftp the archive logs of primary to standby and applied manually
    SYS@BEST AS SYSDBA> alter database register logfile '/u01/app/oracle/flash_recovery_area/BEST/archivelog/archBEST_230_1_715617824.dbf';
    alter database register logfile '/u01/app/oracle/flash_recovery_area/BEST/archivelog/archBEST_230_1_715617824.dbf'
    ERROR at line 1:
    ORA-01289: cannot add duplicate logfile
    SYS@BEST AS SYSDBA> alter database register logfile '/u01/app/home/archTEST_230_1_715617824.dbf';
    alter database register logfile '/u01/app/home/archTEST_230_1_715617824.dbf'
    ERROR at line 1:
    ORA-01289: cannot add duplicate logfile
    any other way ????

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

  • How to enable automatic archiving?

    Hi!
    This is about Oracle 10.2.0.4 on Solaris.
    First the most important information.
    SQL>archive log list
    Database log mode Archive Mode
    Automatic archival Enabled
    Archive destination ?/dbs/arch
    Oldest online log sequence 12
    Next log sequence to archive 12
    Current log sequence 17
    SQL> show parameter recov
    NAME TYPE VALUE
    db_recovery_file_dest string /data/MVS_P0/reco01
    db_recovery_file_dest_size big integer 98G
    recovery_parallelism integer 0
    SQL> show parameter archive
    NAME TYPE VALUE
    archive_lag_target integer 0
    log_archive_config string
    log_archive_dest string
    log_archive_dest_1 string
    log_archive_dest_10 string
    log_archive_dest_2 string
    log_archive_dest_3 string
    log_archive_dest_4 string
    log_archive_dest_5 string
    log_archive_dest_6 string
    log_archive_dest_7 string
    NAME TYPE VALUE
    log_archive_dest_8 string
    log_archive_dest_9 string
    log_archive_dest_state_1 string enable
    log_archive_dest_state_10 string enable
    log_archive_dest_state_2 string enable
    log_archive_dest_state_3 string enable
    log_archive_dest_state_4 string enable
    log_archive_dest_state_5 string enable
    log_archive_dest_state_6 string enable
    log_archive_dest_state_7 string enable
    log_archive_dest_state_8 string enable
    NAME TYPE VALUE
    log_archive_dest_state_9 string enable
    log_archive_duplex_dest string
    log_archive_format string %t_%s_%r.dbf
    log_archive_local_first boolean TRUE
    log_archive_max_processes integer 2
    log_archive_min_succeed_dest integer 1
    log_archive_start boolean FALSE
    log_archive_trace integer 0
    remote_archive_enable string true
    standby_archive_dest string ?/dbs/arch
    The problem
    When I do a 'alter system log switch' the lines below are shown in the alertlog:
    Errors in file /data/MVS_P0/admin/bdump/mvs_r1_arc0_12115.trc:
    ORA-16014: Message 16014 not found; No message file for product=RDBMS, facility=ORA; arguments: [6] [12]
    ORA-00312: Message 312 not found; No message file for product=RDBMS, facility=ORA; arguments: [6] [1] [data/MVS_P0/redo01/log06.rdo]
    SQL> select recid, completion_time, name from v$archived_log
    RECID COMPLETIO NAME
    1 23-JUL-08 /data/MVS_P0/reco01/MVS_P0/archivelog/2008_07_23/o1_mf_1_1_48gf98jq_.arc
    2 23-JUL-08 /data/MVS_P0/reco01/MVS_P0/archivelog/2008_07_23/o1_mf_1_2_48gfjvq1_.arc
    3 28-JUL-08 /data/MVS_P0/reco01/MVS_P0/archivelog/2008_07_28/o1_mf_1_3_48vf0cns_.arc
    4 02-AUG-08 /data/MVS_P0/reco01/MVS_P0/archivelog/2008_08_02/o1_mf_1_4_497pys3n_.arc
    5 06-AUG-08 /data/MVS_P0/reco01/MVS_P0/archivelog/2008_08_06/o1_mf_1_5_49mfqbrb_.arc
    6 11-AUG-08 /data/MVS_P0/reco01/MVS_P0/archivelog/2008_08_11/o1_mf_1_6_4b16ml0y_.arc
    7 17-AUG-08 /data/MVS_P0/reco01/MVS_P0/archivelog/2008_08_17/o1_mf_1_7_4bhd48pc_.arc
    8 21-AUG-08 /data/MVS_P0/reco01/MVS_P0/archivelog/2008_08_21/o1_mf_1_8_4bvlck3b_.arc
    9 22-AUG-08 /data/MVS_P0/reco01/arch/1_9_660770425.dbf
    10 22-AUG-08 /data/MVS_P0/reco01/arch/1_10_660770425.dbf
    11 22-AUG-08 /data/MVS_P0/reco01/arch/1_11_660770425.dbf
    11 rows selected.
    It looks like the archives are not written, or I can not find them. I check $ORACLE_HOME/dbs/arch and /data/MVS_P0/reco01 but it is not there. It worked before, but the person who configured it is on holiday. I know that I did 'something' that created archives (check the last three lines above), but that is somehow not working anymore.
    Can someone help me by finding the archives?
    (I need to make a online copy to create a standby-database, that is quite hard without archives. ;-))

    The query above does not show errors:
    DESTINATION STATUS FAIL_DATE VALID_NOW ERROR
    INACTIVE UNKNOWN
    INACTIVE UNKNOWN
    INACTIVE UNKNOWN
    INACTIVE UNKNOWN
    INACTIVE UNKNOWN
    INACTIVE UNKNOWN
    INACTIVE UNKNOWN
    INACTIVE UNKNOWN
    INACTIVE UNKNOWN
    9 rows selected.
    I have set the log_archive_dest_1 to location=/data/MVS_P0/reco01/arch reopen=5
    When I archive manually, the archives are written to /data/MVS_P0/reco01/arch

  • Archived Log files

    Hello,
    I have a understanding problem off the function of the archived log files. My Oracle 9i Database is running in ARCHIVELOG. So if the online log files are full they get backed up to 3 different locations.
    However if I view now the v$archive_log view then I see all the archived log files.
    So now my questions:
    1. At which point does these archived log files get deleted ?
    2. If they never get deleted how do I know which archived log file can I delete.
    3. If I run a full hot/cold backup can I delete this archive log files?
    4. Is there any other way to delete the archived log files then using rman "delete input" option ? Like is there any way to delete the archived log files form the sqplplus prompt ?
    I have searched and read some articles in the net about it but it is always just about how to set up the db into archivelog mode but I was not able to find anything answering my questions.
    Thank you
    Marcus

    Out of the box, archived logs are not deleted
    automatically. However, you can delete them via
    RMAN. RMAN will delete them based on the set
    retention policy. You can see which logs and
    backups RMAN considers obsolete via the "report
    obsolete" command. RMAN keeps track of logs that
    are necessary for recovery, and those that can
    be safely deleted.
    Another option, as you have noted, is to backup
    archivelogs using RMAN, with the "delete input"
    option.
    The best option (IMHO) is to automate deletion
    of obsolete archive logs via a script. This
    can be done using the "delete noprompt obsolete"
    RMAN command.
    I'm not aware of any SQLPlus based method to delete
    logs. In any case, this would NOT be a good idea, as
    RMAN would not be aware of any such deletions.
    Hope this helps.
    Kailash.

  • Archive log files are not being created

    I am doing some testing of the backup and recovery of our databases.
    I have a database which is in archive log mode.
    I have added some records to a table and I am expecting to see some archive files
    being written to but nothing is being produced.
    We are running Oracle Database 11g Release 11.2.0.2.0 - 64bit Production
    The current archive information is as follows :
    SQL> archive log list;
    Database log mode Archive Mode
    Automatic archival Enabled
    Archive destination USE_DB_RECOVERY_FILE_DEST
    Oldest online log sequence 1
    Next log sequence to archive 3
    Current log sequence 3
    SQL> show parameter db_recovery_file_dest;
    NAME TYPE VALUE
    db_recovery_file_dest string /export/flash_recovery_area
    When I look in the directory as indicated above I see no files :
    cd /export/flash_recovery_area/MRESTORE/archivelog/2013_04_16
    (no files)
    I'm wondering if I am missing something obvious here.
    Thank you in advance.

    user6502667 wrote:
    I am doing some testing of the backup and recovery of our databases.
    I have a database which is in archive log mode.
    I have added some records to a table and I am expecting to see some archive files
    being written to but nothing is being produced.
    We are running Oracle Database 11g Release 11.2.0.2.0 - 64bit Production
    The current archive information is as follows :
    SQL> archive log list;
    Database log mode Archive Mode
    Automatic archival Enabled
    Archive destination USE_DB_RECOVERY_FILE_DEST
    Oldest online log sequence 1
    Next log sequence to archive 3
    Current log sequence 3
    SQL> show parameter db_recovery_file_dest;
    NAME TYPE VALUE
    db_recovery_file_dest string /export/flash_recovery_area
    When I look in the directory as indicated above I see no files :
    cd /export/flash_recovery_area/MRESTORE/archivelog/2013_04_16
    (no files)
    I'm wondering if I am missing something obvious here.
    Thank you in advance.There can be several, but I'd say the most likely is that you simply didn't yet generate enough redo information to fill a redolog and thus trigger the writing of an archivelog.

  • How to remove archive log files from ASM managed 11g R2 database?

    Hi,
    I am planning to automate deletion of older archive log files from my 11g R2 Production instance which is ASM managed.
    Also want to remove the archive log files files from standby database.
    Please provide your inputs on how can I remove the older archive log files.
    Regards,
    Avinash

    Greetings
    Did you check RMAN,
    RMAN>show all;
    CONFIGURE RETENTION POLICY . . . .
    CONFIGURE ARCHIVELOG DELETION POLICY TO [CLEAR | NONE | APPLIED ON STANDBY];
    DELETE NOPROMPT EXPIRED ARCHIVELOG ALL;
    DELETE NOPROMPT ARCHIVELOG ALL COMPLETED BEFORE 'SYSDATE-10';
    This will be part of your RMAN Backup scripts/process
    Check the urls below:
    11gRel2:
    http://download.oracle.com/docs/cd/E11882_01/backup.112/e10642/rcmmaint.htm#BRADV90079
    http://download.oracle.com/docs/cd/E11882_01/backup.112/e10642/rcmmaint.htm#BRADV89634
    10g:
    http://download.oracle.com/docs/cd/B19306_01/backup.102/b14193/toc.htm#sthref45
    http://download.oracle.com/docs/cd/B19306_01/backup.102/b14191/rcmconc1.htm#i1008093
    http://download.oracle.com/docs/cd/B19306_01/backup.102/b14192/maint003.htm#sthref712
    Regards & Thanks
    BN

  • Managing ARCHIVE Logs in Oracle 10.2.0.3

    I am working with a customer who seems to think there is a way of controling the database other than a custom JOB, script or RMAN in how it creates, manages and deletes its archive logs while running in archivelog mode. He wants the database to automatically delete obsolete archive logs. He also wants to control the duration in time between each time an archive log is written in order to stop the growth of archive logs and filling up disk space.
    I am saying this is not possible. You either configure RMAN to delete the obsolete or expired archive logs based on your retention policy or do it manually in the Enterprise Manager or Grid Control Console by deletenig obsolete or expired logs.
    Am I correct or am I off base here?

    4.1.3 Sizing Redo Log Files
    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. Undersized log files increase checkpoint activity and reduce performance.
    Although the size of the redo log files does not affect LGWR performance, it can affect DBWR and checkpoint behavior. Checkpoint frequency is affected by several factors, including log file size and the setting of the FAST_START_MTTR_TARGET initialization parameter. 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.
    It may not always be possible to provide a specific size recommendation for redo log files, but redo log files in the range of a hundred megabytes to a few gigabytes are considered reasonable. Size your online redo log files according to the amount of redo your system generates. A rough guide is to switch logs at most once every twenty minutes.
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14211/build_db.htm#sthref237
    If you are talking about data guard then:
    4.1.3 Sizing Redo Log Files
    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. Undersized log files increase checkpoint activity and reduce performance.
    Although the size of the redo log files does not affect LGWR performance, it can affect DBWR and checkpoint behavior. Checkpoint frequency is affected by several factors, including log file size and the setting of the FAST_START_MTTR_TARGET initialization parameter. 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.
    It may not always be possible to provide a specific size recommendation for redo log files, but redo log files in the range of a hundred megabytes to a few gigabytes are considered reasonable. Size your online redo log files according to the amount of redo your system generates. A rough guide is to switch logs at most once every twenty minutes.
    Automatic Deletion of Applied Archive Logs
    Archived logs, once they are applied on the logical standby database, will be automatically deleted by SQL Apply.
    This feature reduces storage consumption on the logical standby database and improves Data Guard manageability.
    See also:
    Oracle Data Guard Concepts and Administration for details
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14214/chapter1.htm#sthref269

  • How: Script archive log transfer to standby db

    Hi,
    I’m implementing disaster recovery right now. For some special reason, the only option for me is to implement non-managed standby (manual recovery) database.
    The following is what I’m trying to do using shell script:
    1.     Compress archive logs and copy them from Primary site to Standby site every hour. ( I have a very low network )
    2.     Decompress archive logs at standby site
    3.     Check if there are missed archive logs. If no, then do the manual recovery
    Did I miss something above? And I’m not skill in to build shell scripts, is there any sample scripts I can follow? Thanks.
    Nabil
    Message was edited by:
    11iuser

    Hi,
    Take a look at data guard packages. There is a package just for this purpose: Bipul Kumar notes:
    http://www.dba-oracle.com/t_oracledataguard_174_unskip_table_.htm
    "the time lag between the log transfer and the log apply service can be built using the DELAY attribute of the log_archive_dest_n initialization parameter on the primary database. This delay timer starts when the archived log is completely transferred to the standby site. The default value of the DELAY attribute is 30 minutes, but this value can be overridden as shown in the following example:
    LOG_ARCHIVE_DEST_3=’SERVICE=logdbstdby DELAY=60’;"
    1. Compress archive logs and copy them from Primary site to Standby site every hour.Me, I use tar (or compress) and rcp, but I don't know the details of your environment. Jon Emmons has some good notes:
    http://www.lifeaftercoffee.com/2006/12/05/archiving-directories-and-files-with-tar/
    2. Decompress archive logs at standby siteSee the man pages for uncompress. I do it through a named pipe to simplify the process:
    http://www.dba-oracle.com/linux/conditional_statements.htm
    3. Check if there are missed archive logs.I keep my standby data in recovery mode, and as soon as the incoming logs are uncompressed, they are applied automatically.
    Again, if you don't feel comfortable writing your own, consider using the data guard packages.
    Hope this helps. . .
    Donald K. Burleson
    Oracle Press author

Maybe you are looking for

  • Workflow from capture to publish

    I am just starting in the world of Wedding and Event Videography. I love the excitement and emotion of weddings and feel privileged to be able to provide a record of the day. And I don't mind the long hours either. I am having trouble though with my

  • PO GRPO lead time

    Hi, If anyone can help me with a query it would be greatly appreciated. What I'm trying to get to is the average lead time from PO to GRPO at a number of levels. Here's an example of the code I've got for the first step: SELECT T0.[ItemCode] 'Item Co

  • Need to know Account Alias Issue API which can be used

    Hi, I am trying to implement Account Alias issue using package. Please let know API if anybody is aware of this API. Thanks in Advance..

  • Undefined charecters When I write arabic in a resource file

    I have another problem in my resource bundle files, when I write arabic in my Dictionary_ar.proerties file, I save and close the file, but when I reopen it, all of my arabic writings turns to question marks,here is a line of code from the file: Save

  • IMac Freezing after every 2-4 days (randomly)

    Hi folks, I recently bought a 2014 iMac (21.5) inch 16GB machine. I'm going batty with it randomly freezing (beach ball) once every 2-4 days for no apparent reason. I've even looked at console logs and can't figure out. I've resetted SMC/PV(whatever)