Procedure to delete archive log from standby server

Hi
We are using oracle10g(10.2.0.3) and we configured dataguard .
I want to know procedure to delete applied archive log from standby server?
Thanks
With Regards
umair

[Delete Applied Archivelogs on Standby Database |http://emrebaransel.blogspot.com/2009/03/delete-applied-archivelogs-on-standby.html]
http://tinyurl.com/p2krga
Kamran Agayev A. (10g OCP)
http://kamranagayev.wordpress.com
[Step by Step install Oracle on Linux and Automate the installation using Shell Script |http://kamranagayev.wordpress.com/2009/05/01/step-by-step-installing-oracle-database-10g-release-2-on-linux-centos-and-automate-the-installation-using-linux-shell-script/]

Similar Messages

  • How to delete archive log on standby site

    hi
    i configured dataguard on 10g. could anyone suggest how to delete archived log on standby site..

    Hi,
    There is no automatic feature out-of-the-box but you have the following views:
    1) Shows archive logs transfered:
    select sequence#, first_time, next_time from v$archived_log order by sequence#;
    2) Shows archive logs applied:
    select sequence#, archived, applied from v$archived_log order by sequence#;
    If you see your archivelogs applied you can safely remove archive log files from your disk. It is your decision if you keep or delete them completely.

  • HELP....How to delete archive log from v$archived_log table...

    Hi All
    Our prod database was running in Archive log mode and now it is in NO Archive log mode. I deleted all archive logs from the disk but I can still see them in v$archived_log table. How do I delete them from this table.
    Environment is Oracle8i(8.1.7) running on Windows 2000 Advanced Server.
    Thank you
    Amit

    Hi,
    Recreating the controlfile is the only way to force a cleanup of all entries in v$archived_log.
    You can see information on Metalink Note:1012929.6
    Paolo

  • Unable to delete archive logs from primary

    Dear DBAs,
    I made the necessary configuration in RMAN at both site (primary and physical standby) as below:
    on primary:
    configure archivelog deletion policy to applied on standby;
    alter system set "_log_deletion_policy"=ALL scope=spfile;
    log_archive_dest_10=LOCATION=USE_DB_RECOVERY_FILE_DEST VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=ora10cs1
    log_archive-dest_1=service="(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=tcp)
    (HOST=LBLX-ORA10-SCS1)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=ora10scs1_XPT)(INSTANCE_NAME=ora10cs1)(SERVER=dedicated)))",
    ARCH SYNC NOAFFIRM delay=0 OPTIONAL max_failure=0 max_connections=1 reopen=300 db_unique_name="ora10scs1" register net_timeout=180 valid_for=
    (online_logfile,primary_role)
    at standby:
    configure archivelog deletion policy to none;
    By the way i'm using Oracle 10gR2 patch4 on RHEL 5
    and till now the database won't delete the archivelogs automaticaly, since the current available size in the flash folder is only 2MB.
    Please waiting your advice
    Thx in advance

    Hi,
    I have a different issue, I am not sure i can combine on the same thread.
    From the DOC, this command is appeared to be useful. I am not sure if it can be applied to my environment.
    CONFIGURE ARCHIVELOG DELETION POLICY TO APPLIED ON STANDBY
    We have some databases with DG configuration on Sun. We take the backups only primary using RMAN online & archivelog alternate days. But, the archivelogs on standby are to be deleted every day manually (i mean we have a script scheduled for it).
    Note: We use "delete input" on primary backup every day after they are backedup by RMAN. Anyway, the logs that are not applied on standby will not be deleted as RMAN is intelligent to keep them safe.
    In the past we attempted to delete using rman script with the command shown below.
    delete archivelog all completed before 'sysdate-2/24';
    This causes a problem every time for us with regard to the primary database Backup as it expects the archivelogs on primay which were deleted by RMAN on standby. We had to crosscheck archivelog all every time to resolve the issue. There seems to be a mismatch of the archlog status both on primary and standby.
    Please let me know if the above configuration command "CONFIGURE ARCHIVELOG DELETION POLICY " on both primary and standby or give an idea/steps what way i can use this.
    Regards,
    Vasu.
    Edited by: vasu77 on Aug 31, 2009 4:02 PM
    Edited by: vasu77 on Aug 31, 2009 4:05 PM
    Edited by: vasu77 on Aug 31, 2009 4:10 PM

  • Best way of deleting archive logs on standby when backup taken on primary

    Hello,
    I have a 11gr2 dataguard configuration without the broker.
    main problem in my particular situation arises from my FRA size on primary much more than on standby (90Gb vs 30Gb) and in some situations I'm constrained with FRA space on standby.... I'm going to align the FRAs but in the mean time....
    can anyone confirm that if I have configuration as in subject with maximum performance mode and I'm not using the broker I should consider a sort of "external" way for archive log deletion on the physical standby?
    In fact I'm setting on primary
    - retention policy = redundancy 1
    - archivelog deletion = applied on standby (without using any "backed up...." option)
    Considering the standby it seems from docs that:
    - retention policy always wins over deletion policy (so no archive eligible for deletion is deleted if retention is not satisfied)
    - I can set on standby archivelog deletion = applied on standby (without using any "backed up...." option)
    But it is not clear to me the effect of this config in case this is a standby itself and without any other cascade standby databases
    The manual says this has to be met:
    1) The archived redo log files have been applied to the required standby databases.
    ---> what does this mean in case the db is a standby.. met or not met as I have no other cascade standby dependant on this one?
    2) The logs are not needed by the BACKED UP ... TIMES TO DEVICE TYPE deletion policy. If the BACKED UP policy is not set, then this condition is always met.
    ---> I should be ok
    So the last question for standby is
    - what to set retention policy to?
    I have not understood if I set it to "NONE", this means no retention at all or retention for ever....
    sometimes I read that there is no policy; in other examples that files will be retained forever (because no file considered as obsolete).... or at least so I understood...
    I would like to have a sort of policy on standby where the archive logs can be deleted as soon as they are applied during the continuous media recovery phase...
    It seems I can't find a self contained set of configurations across the dataguard....
    Thanks in advance.
    Gianluca

    I agree with you.... It is a temporary contingency....
    I already stressed the fact that sizes between sites must be quite identical...
    we are going towards a production dataguard, migrating from a windows config (without it) to a Linux based config....
    but this contingency made me think about these considerations regarding policies and automatic dataguard operations
    I also stressed on equal size grow capability for both sites file systems, also for data tablespaces, so that for example in case of high fragmentation we have to avoid a limit situation where
    1) a file system full for DR datafiles causes abend of automatic media recovery
    2) this generates FRA growth in DR because archive logs are shipped but not applied any more
    3) FRA goes 100% in DR and primary cannot ship any more
    4) archive logs cannot be automatically deleted on primary because not already shipped
    5) FRA full on primary and DB hangs....
    Thanks anyway for input

  • Archived log to standby server stopped

    Hi,
    I configured dataguard standby server few weeks ago,
    I set log_archive_dest_2='SERVICE=JHRD0107_OFS1 OPTIONAL'
    and log_archive_dest_state=ENABLE in primary server,
    and very go fine until yesterday, I shutdown my standby server and set the log_archive_dest_state=DEFER,
    when I tried to startup again the standby server, and set log_archive_dest_state=ENABLE again,
    the archive stop sending the archived log to log_archive_dest_2.
    No error was found in alert log of primary and standby server.
    It seem that the primary server don't know there is another archive destination..
    The database version is 10g 10.2.0.4
    Anyone what could be the cause of this?
    Thanks

    Hi, Below is the parameter related to archive in my primary server
    SQL> alter system set log_archive_dest_state_2=enable;
    System altered.
    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 LOCATION=I:\OFSDB\OFS1\archive
    MANDATORY REOPEN=300
    log_archive_dest_10 string LOCATION=USE_DB_RECOVERY_FILE_
    DEST OPTIONAL REOPEN=300
    log_archive_dest_2 string SERVICE=JHRD0107_OFS1 OPTIONAL
    log_archive_dest_3 string
    log_archive_dest_4 string
    log_archive_dest_5 string
    NAME TYPE VALUE
    log_archive_dest_6 string
    log_archive_dest_7 string
    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
    NAME TYPE VALUE
    log_archive_dest_state_7 string enable
    log_archive_dest_state_8 string enable
    log_archive_dest_state_9 string enable
    log_archive_duplex_dest string
    log_archive_format string ARC%S_%R.%T
    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
    NAME TYPE VALUE
    standby_archive_dest string %ORACLE_HOME%\RDBMS
    Thanks for your response.
    Vincent

  • Change the location of Archive Logs on standby Server

    Can somebody tell me the process how to change the archive logs location for the standby by server. e.g. Its going now to location C:\stby\archives and I want to send it to E:\stby\archives
    Thx

    Hi,
    Change the STANDBY SPFILE/PFILE Value of <b>standby_archive_dest=E:\stby\archives</b>
    see this
    http://download.oracle.com/docs/cd/B10501_01/server.920/a96653/init_params.htm#84366
    HTH
    Regards!

  • Is RMAN only way to take backup and delete Archive Logs?

    On primary db:
    ===============
    OS: Windows 2003 server 32-bit
    Oracle: Oracle 10g (10.2.0.1.0) R2 32-bit
    On Physical standby db:
    ===============
    OS: Windows 2003 server 32-bit
    Oracle: Oracle 10g (10.2.0.1.0) R2 32-bit
    Data Guard just configured. Archive Logs are properly being shipped to standby db. Is RMAN only way to take backup and delete Archive Logs from both primary and standby db? What other command can be used?
    Thanks

    No, but anything else is way more work. Without using RMAN you would have to find another way to keep track of applied logs.
    RMAN make this very simple :
    RMAN> CONFIGURE ARCHIVELOG DELETION POLICY TO APPLIED ON ALL STANDBY;Using another method would be like using the handle of your screwdriver as a hammer.
    See "RMAN Recipes for Oracle Database 11g" ISBN 978-1-5959-851-1
    Best Regards
    mseberg

  • How to delete Archived files from FTP

    HI,
    I am looking to delete Archived files from FTP Server, Can anybody have idea about this.
    Thanks,
    Ram

    To be frank, deletion of archived files is really a manual activity and is never in reality done by an interface
    so you have two options;
    1. log into the archived folder and manually delete archived files
    2. run a script in your file adapter - this way everytime the interface is triggered the files will be deleted - but then y do this.. instead just dont archive any files at all

  • How to delete archive log files from ASM through Grid Control

    Hi
    Anybody suggest me how to delete archive log files from ASM through Grid Control.
    Thanks

    It is important to specify both, the oracle version and os version when posting, so confusions can be avoided.
    In this particular case, since you are referring to asm and grid control you could be talking about either 10gR1, 10gR2 or 11gR1; but I strongly suggest you to avoid us to be guessing. In either case, you sould go to the maintenance tab of the target database and program a scheduled 'delete noprompt obsolete;' procedure. This will purge the information stored at the Flash recovery area, which I assume you have declared inside the ASM.
    ~ Madrid
    http://hrivera99.blogspot.com/

  • How to delete archive logs on the standby database....in 9i

    Hello,
    We are planning to setup a data guard (Maximum performance configuration ) between two Oracle 9i databases on two different servers.
    The archive logs on the primary servers are deleted via a RMAN job bases on a policy , just wondering how I should delete the archive logs that are shipped to the standby.
    Is putting a cron job on the standby to delete archive logs that are say 2 days old the proper approach or is there a built in data guard option that would some how allow archive logs that are no longer needed or are two days old deleted automatically.
    thanks,
    C.

    We are planning to setup a data guard (Maximum performance configuration ) between two Oracle 9i databases on two different servers.
    The archive logs on the primary servers are deleted via a RMAN job bases on a policy , just wondering how I should delete the archive logs that are shipped to the standby.
    Is putting a cron job on the standby to delete archive logs that are say 2 days old the proper approach or is there a built in data guard option that would some how allow archive logs that are no longer needed or are two days old deleted automatically.From 10g there is option to purge on deletion policy when archives were applied. Check this note.
    *Configure RMAN to purge archivelogs after applied on standby [ID 728053.1]*
    Still it is on 9i, So you need to schedule RMAN job or Shell script file to delete archives.
    Before deleting archives
    1) you need to check is all the archives are applied or not
    2) then you can remove all the archives completed before 'sysdate-2';
    RMAN> delete archvielog all completed before 'sysdate-2';
    As per your requirement.

  • How can we delete archive log files from OEM

    Hi,
    I took backup of the archive log file and deleted it at OS level but in it is not reflecting in the EM can any one tell me how to delete archive log files from OEM.
    any help will be appreciated.
    Regards,
    Ashraf

    This link?
    http://download-west.oracle.com/docs/cd/B10501_01/em.920/a96670/ch_backp.htm#26936

  • Transfering archive logs in standby database

    hi,
    i am trying to create a standby database for a a test scenario using oracle 10g R2 and windows xp
    Primary DB = primary
    standby DB=stby
    iam able to ping databases from each other using tnsping , but iam not able to transfer archive logs from primary to standby
    pfile for primary is
    primary.__db_cache_size=67108864
    primary.__java_pool_size=4194304
    primary.__large_pool_size=4194304
    primary.__shared_pool_size=88080384
    primary.__streams_pool_size=0
    *.audit_file_dest='C:\oracle\product\10.2.0/admin/primary/adump'
    *.background_dump_dest='C:\oracle\product\10.2.0/admin/primary/bdump'
    *.compatible='10.2.0.1.0'
    *.control_files='C:\oracle\product\10.2.0\oradata\primary\control01.ctl','C:\oracle\product\10.2.0\oradata\primary\control02.ctl','C:\oracle\product\10.2.0\oradata\primary\control03.ctl'
    *.core_dump_dest='C:\oracle\product\10.2.0/admin/primary/cdump'
    *.db_block_size=8192
    *.db_domain=''
    *.db_file_multiblock_read_count=16
    *.db_name='primary'
    *.dispatchers='(PROTOCOL=TCP) (SERVICE=primaryXDB)'
    *.job_queue_processes=10
    *.log_archive_dest_2='SERVICE=stby'
    *.log_archive_dest_state_2=ENABLE
    *.open_cursors=300
    *.pga_aggregate_target=16777216
    *.processes=150
    *.remote_login_passwordfile='EXCLUSIVE'
    *.sga_target=167772160
    *.undo_management='AUTO'
    *.undo_tablespace='UNDOTBS1'
    *.user_dump_dest='C:\oracle\product\10.2.0/admin/primary/udump'
    log_archive_dest_1='LOCATION=C:\oracle\product\10.2.0\db_1\database\archive'
    log_archive_dest_state_1=ENABLE
    LOG_ARCHIVE_CONFIG='DG_CONFIG=(primary,stby)'
    pfile from standby
    primary.__db_cache_size=75497472
    primary.__java_pool_size=4194304
    primary.__large_pool_size=4194304
    primary.__shared_pool_size=79691776
    primary.__streams_pool_size=0
    *.audit_file_dest='C:\oracle\product\10.2.0\admin\adump'
    *.background_dump_dest='C:\oracle\product\10.2.0\admin\bdump'
    *.compatible='10.2.0.1.0'
    *.control_files='C:\oracle\product\10.2.0\oradata\stby.ctl'
    *.core_dump_dest='C:\oracle\product\10.2.0\admin\cdump'
    *.db_block_size=8192
    *.db_domain=''
    *.db_file_multiblock_read_count=16
    *.db_name='primary'
    db_unique_name='stby'
    *.dispatchers='(PROTOCOL=TCP) (SERVICE=primaryXDB)'
    *.job_queue_processes=10
    *.open_cursors=300
    *.pga_aggregate_target=16777216
    *.processes=150
    *.remote_login_passwordfile='EXCLUSIVE'
    *.sga_target=167772160
    *.undo_management='AUTO'
    *.undo_tablespace='UNDOTBS1'
    *.user_dump_dest='C:\oracle\product\10.2.0\admin\udump'
    standby_archive_dest='C:\oracle\product\10.2.0\stbyarch'
    db_file_name_convert='C:\oracle\product\10.2.0\oradata\primary','C:\oracle\product\10.2.0\oradata'
    log_file_name_convert='C:\oracle\product\10.2.0\oradata\primary','C:\oracle\product\10.2.0\oradata'
    standby_file_management=AUTO

    You do not point to the standby database from your primary, in order to get the archivelogs transfered. You need to set at least the parameter LOG_ARCHIVE_DEST_2 like this:
    SQL>alter system set LOG_ARCHIVE_DEST_2='SERVICE=stdby VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=stdby';stdby has to be resolved by the tnsnames.ora on the primary server. Have a look here:
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14239/create_ps.htm#i67520
    That explains all you need to do to create a physical standby briefly.
    Kind regards
    Uwe
    http://uhesse.wordpress.com

  • Manual delete archived log files

    Because we don't have RMAN in our development server, I need to use manual operation to delete all archived logs. Is my procedure correct and safe?
    SHUTDOWN IMMEDIATE
    STARTUP MOUNT
    ALTER DATABASE NOARCHIVELOG;
    EXITRun OS command to manually delete archived log files:
    rm /oradata/arch/*
    Login to sqlplus
    SHUTDOWN IMMEDIATE
    STARTUP MOUNT
    ALTER DATABASE ARCHIVELOG;
    STARTUP OPENThanks!

    linuxos wrote:
    Oh I suppose RMAN need to be configured somthing before use. I tried it, and find no pre-requisite is required. Thanks!
    If the archives are deleted manually in open mode, how can Oracle match the archived logs' retention policy? Does Oracle store the archived logs in data dictionary?While you can delete archivelogs manually any time you want, you should let rman manage them with appropriate rman commands, preferably in a script that you schedule for regular execution.
    Some of your questions lead me to question if you understand that archivelogs are not actively open by the database, and they technically are not part of the database. They are simply a series of "offline" copies of the online redo logs. They are written to once, when an online redo is being archived, then they just sit there until needed for a recovery.

  • When to delete Archive Log files ? and is safe to delete ?

    Hi all,
    I have a question, my DB is running in Archive Log mode and is growing day by day, so should I delete archive log files and where i find that my which files are old and how to delete theses files, for info I also take full RMAN and export backup regularly .
    abbas

    Well, if you're not comfortable with Backup and Recovery principles, i'd advise you to first read TFM: Backup and Recovery Concept(click) for you data safety's sake.
    Anyway, just to give you a glance at what could happen, immagine suche a situation where your database is made of 5 different datafiles (whatever they are - SYSTEM, SYSAUX, UNDO, ...), controlfiles and online redo logs. If, for example your backup is done in a timeline such as:T0 : Backup datafile F1 and F2
    T1 : Backup datafile F2 and controlfile
    T2 : Backup datafile F3, F4
    T3 : Backup datafile F5
    T0' : Backup datafile F1 and F2
    T1' : Backup datafile F2 and controlfile
    T2' : Backup datafile F3, F4
    T3' : Backup datafile F5
    ...If your server crashes (for example is thrown though the 5th floor window..) in order to make a full recovery, you could proceed multiple ways.
    . Restore files from Tx' backups. Then you'd need every archived redo logs created from T0' to now in order to be able to do a full recovery.
    . Restore files from backups; T3, T0', T2' and rectreate controlfile. Then you'd need every archived redo log created from T3 (inclusive).
    . Restore Tx backup, ...
    . Restore ...
    and so on.
    What's important is that you're at least able to resynch a full-set backup. What I mean is: if you restored "T3, T0', T2' and rectreate controlfile", in order to open the database you'll absolutely need every archived redo log created between T3 and T2' inclusive. If one is missions, you won't be able to open it.
    That is the principle. Read the concept book I linked to get more infos.
    Regards,
    Yoann.

Maybe you are looking for