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

Similar Messages

  • *HOW TO DELETE THE ARCHIVE LOGS ON THE STANDBY*

    HOW TO DELETE THE ARCHIVE LOGS ON THE STANDBY
    I have set the RMAN CONFIGURE ARCHIVELOG DELETION POLICY TO APPLIED ON STANDBY; on my physical standby server.
    My archivelog files are not deleted on standby.
    I have set the CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default on the Primary server.
    I've checked the archivelogs with the FRA and they are not beign deleted on the STANDBY. Do I have to do something for the configuation to take effect? Like run a RMAN backup?
    I've done a lot ofresearch and i'm getting mixed answers. Please help. Thanks in advanced.
    J

    Setting the Policy will not delete the Archive logs on the Standby. ( I found a thread where the Data Guard product manager says "The deletion policy on both sides will do what you want" ). However I still
    like to clean them off with RMAN.
    I would use RMAN to delete them so that it can use that Policy are you are protected in case of Gap, transport issue etc.
    There are many ways to do this. You can simply run RMAN and have it clean out the Archive.
    Example :
    #!/bin/bash
    # Name: db_rman_arch_standby.sh
    # Purpose: Database rman backup
    # Usage : db_rman_arch_standby <DBNAME>
    if [ "$1" ]
    then DBNAME=$1
    else
    echo "basename $0 : Syntax error : use . db_rman_full <DBNAME> "
    exit 1
    fi
    . /u01/app/oracle/dba_tool/env/${DBNAME}.env
    echo ${DBNAME}
    MAILHEADER="Archive_cleanup_on_STANDBY_${DBNAME}"
    echo "Starting RMAN..."
    $ORACLE_HOME/bin/rman target / catalog <user>/<password>@<catalog> << EOF
    delete noprompt ARCHIVELOG UNTIL TIME 'SYSDATE-8';
    exit
    EOF
    echo `date`
    echo
    echo 'End of archive cleanup on STANDBY'
    mailx -s ${MAILHEADER} $MAILTO < /tmp/rmandbarchstandby.out
    # End of ScriptThis uses ( calls an ENV) so the crontab has an environment.
    Example ( STANDBY.env )
    ORACLE_BASE=/u01/app/oracle
    ULIMIT=unlimited
    ORACLE_SID=STANDBY
    ORACLE_HOME=$ORACLE_BASE/product/11.2.0.2
    ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
    LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
    LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
    LIBPATH=$LD_LIBRARY_PATH:/usr/lib
    TNS_ADMIN=$ORACLE_HOME/network/admin
    PATH=$ORACLE_HOME/bin:$ORACLE_BASE/dba_tool/bin:/bin:/usr/bin:/usr/ccs/bin:/etc:/usr/sbin:/usr/ucb:$HOME/bin:/usr/bin/X11:/sbin:/usr/lbin:/GNU/bin/make:/u01/app/oracle/dba_tool/bin:/home/oracle/utils/SCRIPTS:/usr/local/bin:.
    #export TERM=linux=80x25 wrong wrong wrong wrong wrong
    export TERM=vt100
    export ORACLE_BASE ORACLE_SID ORACLE_TERM ULIMIT
    export ORACLE_HOME
    export LIBPATH LD_LIBRARY_PATH ORA_NLS33
    export TNS_ADMIN
    export PATH
    export MAILTO=?? your email hereNote use the env command in Unix to get you settings.
    There are probably ten other/better ways to do this, but this works.
    other options ( you decide )
    Configure RMAN to purge archivelogs after applied on standby [ID 728053.1]
    http://www.oracle.com/technetwork/database/features/availability/rman-dataguard-10g-wp-1-129486.pdf
    Maintenance Of Archivelogs On Standby Databases [ID 464668.1]
    Tip I don't care myself but in some of the other forums people seem to mind if you use all caps in the subject. They say it shouting. My take is if somebody is shouting at me I'm probably going to just move away.
    Best Regards
    mseberg
    Edited by: mseberg on May 8, 2012 11:53 AM
    Edited by: mseberg on May 8, 2012 11:56 AM

  • How to delete the archive logs.

    Hi,
    I need to delete the archive logs in standby database which has been generated after created the restore point.
    SEQUENCE# APPLIED
    17 YES
    18 YES
    1 NO
    2 NO
    19 YES
    18 YES
    21 YES
    22 YES
    20 YES
    23 YES
    24 YES
    sequence 1,2 has been generated after created the restore point,how can i remove sequence# 1 and 2 from the v$archived_log;
    ways i have tried
    1.dropped the restore point during that time only the flashback logs has been deleted not the archive log
    2.manually tried from rman ,but i was not working.
    please help me out....
    ***points are waiting for you guys****

    Hi,
    I need to delete the archive logs in standby database which has been generated after created the restore point.
    SEQUENCE# APPLIED
    17 YES
    18 YES
    1 NO
    2 NO
    19 YES
    18 YES
    21 YES
    22 YES
    20 YES
    23 YES
    24 YES
    sequence 1,2 has been generated after created the restore point,how can i remove sequence# 1 and 2 from the v$archived_log;
    ways i have tried
    1.dropped the restore point during that time only the flashback logs has been deleted not the archive log
    2.manually tried from rman ,but i was not working.
    please help me out....
    ***points are waiting for you guys****

  • How to find out who deleted the archive logs

    Hi All,
    Recently some archive logs were deleted from one of our servers. Is there any way to find out which user has deleted the archive logs through OS or through database ?
    OS Version :-
    SunOS Generic_Virtual sun4u sparc SUNW,SPARC-Enterprise
    Database Version:-
    SQL*Plus: Release 9.2.0.8.0 - Production on Mon Apr 9 01:12:15 2012

    888132 wrote:
    Hi All,
    Recently some archive logs were deleted from one of our servers. Is there any way to find out which user has deleted the archive logs through OS or through database ?
    OS Version :-
    SunOS Generic_Virtual sun4u sparc SUNW,SPARC-Enterprise
    Database Version:-
    SQL*Plus: Release 9.2.0.8.0 - Production on Mon Apr 9 01:12:15 2012As explained by others, from oracle database there is no record if they are deleted from OS.
    But you can probably find the history of OS command been run with history command :). You can get the date and time.
    Following link can help
    http://stackoverflow.com/questions/99755/how-do-i-get-the-command-buffer-in-solaris-10
    http://www.cyberciti.biz/faq/unix-linux-bash-history-display-date-time/
    http://www.linuxquestions.org/questions/solaris-opensolaris-20/in-solaris-command-line-how-to-get-the-previous-commands-573814/
    But i suggest you to post in Sun OS forum to get more details as its nothing to do with Database(in this scenario)

  • Scripts for adding/deleting/modifying Open Directory accounts?

    I think I have searched high and low for an answer to this question, but if I missed it please point me in the right direction. Where can I find information on scripts for adding/deleting/modifying open directory accounts? At the very least, a command line utility with some syntax guidelines! Any help would be greatly appreciated.

    Hi
    I personally don't know if any scripts although you can use the command line to do pretty much anything you want with the Open Directory. Consult the manual: man dscl. If you launch terminal and issue dscl you should see something like this:
    my-Laptop:~ me$ dscl
    dscl (v20.4)
    usage: dscl [options] [<datasource> [<command>]]
    datasource:
    localhost (default) or
    <hostname> (requires DS proxy support, >= DS-158) or
    <nodename> (Directory Service style node name) or
    <domainname> (NetInfo style domain name)
    options:
    -u <user> authenticate as user (required when using DS Proxy)
    -P <password> authentication password
    -p prompt for password
    -raw don't strip off prefix from DS constants
    -url print record attribute values in URL-style encoding
    -q quiet - no interactive prompt
    commands:
    -read <path> [<key>...]
    -create <record path> [<key> [<val>...]]
    -delete <path> [<key> [<val>...]]
    -list <path> [<key>]
    -append <record path> <key> <val>...
    -merge <record path> <key> <val>...
    -change <record path> <key> <old value> <new value>
    -changei <record path> <key> <value index> <new value>
    -search <path> <key> <val>
    -auth [<user> [<password>]]
    -authonly [<user> [<password>]]
    -passwd <user path> [<new password> | <old password> <new password>]
    Entering interactive mode...
    The above is for 10.4 and should server equally as well for 10.5.
    Hope this helps, Tony

  • Delete standby archived log

    I need to delete some standby archived log from my downstreams database but I not find the way, please help me.

    If you are looking for an automatic way to delete them, then you can archive to a flash recovery area on the standby, which can act as a FIFO archivelog bucket:
    $ sqlplus / as sysdba
    SQL> alter system set db_recovery_file_dest='+datadg' scope=both;
    SQL> alter system set db_recovery_file_dest_size=2G scope=both;
    SQL> alter system set log_archive_dest_1='location=use_db_recovery_file_dest' scope=both;
    $ rman target /
    RMAN> configure retention policy to redundancy 1;
    RMAN> configure archivelog deletion policy to applied on standby;Of course substitute your own preferred values for above, use the RMAN catalog if you have one, and don't step on any pre-existing retention policy or FRA that you might wish to keep the way it is.
    Regards,
    Jeremiah Wilton
    Blue Gecko, Inc.
    [http://www.bluegecko.net|http://www.bluegecko.net]

  • Deletion of archive log using RMAN Target in Oracle 10g

    Hi All,
    I recently have noticed that the archive logs have occupied 102 GBs out of the drive and I need to free up some space. When I tried to connect RMAN Catalog using
    connect catalog user@dbI got error message as
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-06445: cannot connect to recovery catalog after NOCATALOG has been usedBut I was able to get through using
    connect target user@dbMy Query is can I use
    RMAN> delete noprompt expired archivelog all;as given in [how to delete archive log file |https://forums.oracle.com/forums/thread.jspa?threadID=2321257&start=0&tstart=0]
    Or shall I take any other approach to delete the obsolete archive logs?
    Regards,
    *009*

    Hello;
    I recently have noticed that the archive logs have occupied 102 GBs out of the drive and I need to free up some space. When I tried to connect RMAN Catalog using
    connect catalog user@dbI got error message as
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-06445: cannot connect to recovery catalog after NOCATALOG has been usedBut I was able to get through using
    connect target user@db
    Are you trying to connect it through Grid control ? If connecting through a script, then please post its contents.
    Make sure you are not connecting to the target database using "nocatalog".
    rman target sys/<pwd_of_target>@<target_db> catalog <catalog_schema>/<catalog_schema_pwd>@<catalog_db>
    My Query is can I use
    RMAN> delete noprompt expired archivelog all;
    as given in [how to delete archive log file |https://forums.oracle.com/forums/thread.jspa?threadID=2321257&start=0&tstart=0]
    Or shall I take any other approach to delete the obsolete archive logs?
    Regards,
    *009*Are these archives backed up ? The above command only updates the RMAN repository if in case the archives were delete manually at OS level.
    I would recommend you to backup these archives and then delete them.
    RMAN>backup archivelog all not backedup 1 times delete input;If these archives are already backed up and have not been deleted from the disk, then you can use the below command
    RMAN>delete force noprompt archivelog all completed before 'SYSDATE-n';where "n" is the number of days behind the current date. Make sure to verify if these archives have been backed up before deleting.
    Regards,
    Shivananda

  • Shell script for Automatic Awr Report

    Hi Good Morning,
    I have a requirement to generate the AWR report daily between (10AM - 06PM , 10AM - 01PM , 01PM - 10PM) . I have the below script for this . But the issue is this script is working only when i run it two times and before running i have to delete snap_list.lst file. Please let me know what is the problem in this script and how to resolve it.
    Script :
    dt=`date +%d%m%Y`
    cd /orabkp/awr_report
    chmod 777 *
    rm -rf snap_list.lst
    touch snap_list.lst
    #rm -rf snap_list.lst
    #rm -rf snap_list.lst
    sqlplus -s " /as sysdba " <<EOF > snap_list.lst
    host sleep 10
    @/oracle/scripts/cron_scripts/rpt1.sql;
    @?/rdbms/admin/awrrpt.sql
    HTML
    1
    `cat snap_list.lst | grep "10:0" | awk '{print $1}'`
    `cat snap_list.lst | grep "13:0" | awk '{print $1}'`
    awrrpt\_$dt\_10AM\-01PM.html
    prompt 2
    @?/rdbms/admin/awrrpt.sql
    HTML
    1
    `cat snap_list.lst | grep "13:0" | awk '{print $1}'`
    `cat snap_list.lst | grep "18:0" | awk '{print $1}'`
    awrrpt\_$dt\_01PM\-06PM.html
    @?/rdbms/admin/awrrpt.sql
    HTML
    1
    `cat snap_list.lst | grep "10:0" | awk '{print $1}'`
    `cat snap_list.lst | grep "18:0" | awk '{print $1}'`
    awrrpt\_$dt\_10AM\-06PM.html
    @?/rdbms/admin/addmrpt.sql
    `cat snap_list.lst | grep "06:0" | awk '{print $1}'`
    `cat snap_list.lst | grep "12:0" | awk '{print $1}'`
    ADDM_REPORT\_$dt\_10AM\-06PM.txt
    EOF
    exit
    cat /oracle/scripts/cron_scripts/rpt1.sql
    host echo 1
    host sleep 10
    @?/rdbms/admin/awrrpt.sql
    HTML
    1
    `cat snap_list.lst | grep "10:0" | awk '{print $1}'`
    `cat snap_list.lst | grep "13:0" | awk '{print $1}'`
    awrrpt\_$dt\_10AM\-01PM.html
    Regards
    Rajasekar

    Hi,
    Modify & Try this script used for rac awr ..
    #!/bin/ksh
    set -x
    ORACLE_SID=DBSID
    ORACLE_HOME=/u01/app/ora11g/product/11.2.0/db_1
    export ORACLE_HOME
    TERM=vt100
    export TERM
    PATH=/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/local/bin:/usr/bin/X11:/bin:/sbin:.
    PATH=$ORACLE_HOME/bin:$PATH
    export DT=`date '+%d_%b_%Y_%HH_%MM'`
    export ORACLE_BASE ORACLE_SID ORACLE_HOME PATH DT
    echo $DT
    MAIL="[email protected]"
    CMAIL="[email protected]"
    AWRR="/u01/DBA_Scripts/AWR_REPO"
    sqlplus -s "/ as sysdba"<<EOFSQL
    set head off
    set feed off
    spool /tmp/bsnap.lst
    select max(SNAP_ID)- 3 from dba_hist_snapshot;
    spool off
    spool /tmp/esnap.lst
    select max(SNAP_ID) from dba_hist_snapshot;
    spool off
    spool /tmp/iname.lst
    select instance_name from v\$instance;
    spool off
    spool /tmp/dname.lst
    select database_name from v\$database;
    spool off
    spool /tmp/inum.lst
    select instance_number from v\$instance;
    spool off
    spool /tmp/dbid.lst
    select dbid from v\$database;
    spool off
    EOFSQL
    BSNAP=`cat /tmp/bsnap.lst | tail -1 | awk '{ print $1}'`;export BSNAP
    ESNAP=`cat /tmp/esnap.lst | tail -1 | awk '{ print $1}'`;export ESNAP
    INAME=`cat /tmp/iname.lst | tail -1 | awk '{ print $1}'`;export INAME
    DNAME=`cat /tmp/dname.lst | tail -1 | awk '{ print $1}'`;export DNAME
    INUM=`cat /tmp/inum.lst | tail -1 | awk '{ print $1}'`;export INUM
    DID=`cat /tmp/dbid.lst| tail -1 | awk '{ print $1}'`;export DID
    echo "Begin Snap  : $BSNAP"
    echo "End Snap    : $ESNAP"
    #echo "InstanceName: $INAME"
    echo "DB Name     : $DNAME"
    #echo "InstanceId  : $INUM"
    echo "DB ID       : $DID"
    sqlplus -s "/ as sysdba"<<EOFSQL
          define  inst_num     = $INUM;
          define  num_days     = 12;
          define  inst_name    = 'ALL';
          define  db_name      = '$DNAME';
          define  dbid         = $DID;
          define  begin_snap   = $BSNAP;
          define  end_snap     = $ESNAP;
          define  report_type  = 'html';
          define  report_name  = $AWRR/Awr_report_$DT.html
          @@?/rdbms/admin/awrgrpti
    EOFSQL
    cat /u01/DBA_Scripts/mail_body.txt | mailx -a $AWRR/Awr_report_$DT.html -c $CMAIL -s "DB Report - DB "  $MAILThanks,
    Ajay More
    http://www.moreajays.com

  • VBA script for automatically indexing topics

    A big disadvantage with InDesign's indexing system is that you cannot automatically index all occurences of topics currently in the index.
    Instead, you have to find an occurence of each topic in the document itself and go to the Index menus and then click New Page Reference...Add All, for each index topic individually.
    To get around this, I have been trying to produce a VBA script to automatically index all occurrences in a document of the topics currently in the document index.
    I have been using the MS Excel VBA development environment but find the definitions of the object model in the Excel VBA browser rather inadequate and ambiguous .
    Is there a more thorough reference work for these?
    The plan was to start by taking each individual topic in the index which I tried to access with something along the lines of:
    MyDocument.Index.Topic(1)
    This hasn't worked.
    The plan then was to take each index topic and use it to find an occurence in the document of that topic and then use that occurence to invoke the New Page Reference...Add All option to index all occcurences of that selected term, using something like:
    MyDocument.PageReferences.Add
    Again, without success.
    Any guidance or suggestions would be appreciated.

    Dear Peter,
    Many thanks for your posting, that was very helpful.
    This is the state of the script so far (I have added a large number of MsgBox entries - these aren't needed, they are just for debugging purposes during development):
    'VBA script which tries to work through all of the topics in the index and automatically index each occurence of them in the current text frame:
    main
    Function main()
    Set MyInDesign = CreateObject("InDesign.Application.CS4")
    If MyInDesign.Documents.Count > 0 Then
        Set MyDocument = MyInDesign.ActiveDocument
        Set MyPage = MyDocument.Pages.Item(1)
        Set MyTextFrame = MyPage.TextFrames.Item(1)
        Set MyStory = MyTextFrame.ParentStory
        Set MyIndex = MyDocument.Indexes(1)
        Set MyTopics = MyIndex.AllTopics
        MyIndexesCount = MyDocument.Indexes.Count
        MsgBox "Current indexes Count: " & MyIndexesCount
        MyIndexTopicsCount = MyTopics.Count
        MsgBox "Current index topics Count: " & MyIndexTopicsCount
        For i = 1 To MyTopics.Count Step 1 'work through the topics
    MyIndexTerm=MyTopics(i)
    MsgBox "Current indexes Topic: " & MyIndexTerm
    'search for MyIndexTerm :
            'Clear Find preferences:
            MyInDesign.FindTextPreferences = idNothingEnum.idNothing
            'Set up search paramaters:
            If MyIndexTerm <> "" Then
                MyInDesign.FindTextPreferences.FindWhat = MyIndexTerm
                'Set search options:
                MyInDesign.FindChangeTextOptions.CaseSensitive = False
                MyInDesign.FindChangeTextOptions.IncludeFootnotes = False
                MyInDesign.FindChangeTextOptions.IncludeHiddenLayers = False
                MyInDesign.FindChangeTextOptions.IncludeLockedLayersForFind = False
                MyInDesign.FindChangeTextOptions.IncludeLockedStoriesForFind = False
                MyInDesign.FindChangeTextOptions.IncludeMasterPages = False
                MyInDesign.FindChangeTextOptions.WholeWord = False
                'Search for the string:
                Set MyFoundItems = MyDocument.FindText 'this ought to be limited to the Story, not the Document eg MyStory
             MsgBox "Found index terms:" & MyFoundItems.Count
                For j = MyFoundItems.Count To 1 Step -1
                   MyTopics(i).PageReferences.Add MyFoundItems(j)
                Next
               'Clear preference:
                MyInDesign.FindTextPreferences = idNothingEnum.idNothing
                'Having found it, add page reference:
             'MyDocument.PageReferences.Add
            Else
                MsgBox "No search term specified"
            End If
    Response=MsgBox ("Continue?", vbYesNo)
    If Response = vbNo then
      Exit For
    End If
       Next
    'Set up Index options:
    MyIndex.IndexOptions.Title = "Index"
    MyIndex.IndexOptions(1).TitleStyle="Chapter Head"
    MyIndex.IndexOptions(1).ReplaceExistingIndex = True
    'Generate the index:
    MyIndex.Generate
    Else
        MsgBox ("Please open a document, select an object, and try again.")
    End If
    End Function
    There are a couple of problem areas still:
    1. Index terms appear to be added irrespective of whether or not that particular page reference already exists in the index.
    This can result in duplicate page references under each topic - especially if the script is run several times.
    Is there any way of avoiding these duplicate references?
    2. I haven't yet suceeded in getting the script to generate the index - so far I've had to do it manually after the script has run.
    The problem lies somewhere in the code to set up the index options and then generate the index.
    3. It might be useful to be able to limit the indexing to the curent story rather than the whole document - but I haven't yet got it to do that.
    Best wishes.

  • How to delete old archived logs

    hai i am running oracle 9i in archive log mode
    my disk is about 90% full
    pls tell me how to delete archive logs that are very older

    Hi Rajeskm,
    First of all, archives should not be deleted, depending your backup policie, you can need them in a recovery. But if you want delete them, do:
    find <log_archive_dest>/ -name *.rdo (or extention used by you) mtime +<days ago> -exec rm{}\
    Explanation:
    Find -- The first, and most obvious, use is find's ability to locate old, big, or unused files, or files that you forgot where they are.
    mtime -- The mtime--modify time--is the time when the actual contents of a file was last modified. This is the time displayed in a long directoring listing (ls -l).
    rm -- Deletes a file without confirmation (by default).
    Regards,
    Jonathan Ferreira - Brazil
    http://www.ebs11i.com.br

  • Script for batch delet redundant layer

    I have thousands files in the different folders, each file has same layer named “Job Info”. Can someone help me to write a script for del this layer folder by folder?
    I expected the script tells me that I have to select a folder, then it can automatically open the files, del “job info” layer then save file, rewrite, close file

    Hi Ashram,
    Sorry, I misunderstood your question. Please try the below.
    var folder = Folder.selectDialog ("Select the root folder");
    var myfiles = [];
    var _layers = ["test1", "test2", "test3"];
    getsubfolderfiles(folder);
    for(var i =0;i<myfiles.length;i++)
            var doc = app.open(myfiles[i],false);
            for(var j=0;j<_layers.length;j++)
                try
                    app.activeDocument.layers.add({name:_layers[j]})
                catch(e){}
            doc.save();
            doc.close();
    function getsubfolderfiles(folder)
        var filelist = folder.getFiles();
        for(var i =0;i<filelist.length;i++)
            if(filelist[i] instanceof Folder)
                getsubfolderfiles (filelist[i]);
            else if(filelist[i] instanceof File)
                if(filelist[i].name.indexOf(".indd") > -1){
                    myfiles.push(filelist[i]);
    Hi HarveyLiu,
    Try this,
    var folder = Folder.selectDialog ("Select the root folder");
    var myfiles = [];
    getsubfolderfiles(folder);
    for(var i =0;i<myfiles.length;i++)
            var doc = app.open(myfiles[i],false);
            try{
                var _layer = doc.layers.item("Job Info");
                _layer.remove();
                var link, image, frame,
                links = doc.links, counter = 0;
                for (var i = links.length-1; i >= 0; i--) {
                    if (links[i].status == LinkStatus.LINK_MISSING) {
                        try {
                            link = links[i];
                            image = link.parent;
                            frame = image.parent;
                            frame.remove();
                            counter++;
                        catch (err) {
                            $.writeln(i + " - " + err);
            catch(e){}
            doc.save();
            doc.close();
    function getsubfolderfiles(folder)
        var filelist = folder.getFiles();
        for(var i =0;i<filelist.length;i++)
            if(filelist[i] instanceof Folder)
                getsubfolderfiles (filelist[i]);
            else if(filelist[i] instanceof File)
                if(filelist[i].name.indexOf(".indd") > -1){
                    myfiles.push(filelist[i]);
    Regards,
    Chinna

  • I accidently delete the archived log, how to recover?

    There was old archived log file in a directory, I delete the directory, so when I backup whole archived log with RMAN, I often got error like this,
    RMAN-06059: expected archived log not found, lost of archived log compromises recoverabiligy
    ora-196525: error identifying file G:\oracle\oradata\archive\arc00081.001
    I am using oracle 9.2 on windows XP
    Edited by: user8117130 on Jun 14, 2009 9:35 PM

    HI..
    I delete the directory, so when I backup other archived log with RMAN, I often got error like this From metalink:-
    Error:     RMAN-06059 (RMAN-6059)Text:     expected archived log not found, lost of archived log compromises
         recoverability
    Cause:     The archived log was not found. The repository thinks it does
         exist. If the archived log has in fact been lost and there is no
         backup, then the database is no longer recoverable across the
         point in time covered by the archived log. This may occur because
         the archived log was removed by an outside utility without
         updating the repository.
    Action:     If the archived log has been removed with an outside utility and
         the archivelog has already been backed up, then you can
         synchronize the repository by running CROSSCHECK ARCHIVELOG ALL.
         If the archivelog has not been previously backed up, then you
         should take a full backup of the database and archivelogs to
         preserve recoverability. Previous backups are not fully
         recoverable.
    >
    Anand

  • Delete unwanted archive logs

    We do only one way replication using stream. How do I find archive logs that can be deleted at source. Our destination runs nonarchive.

    If you use RMAN - it is streams friendly and should know which logs can be purged.
    Otherwise, I use the following query:
    SELECT r.CONSUMER_NAME,
    r.NAME,
    r.FIRST_SCN,
    r.NEXT_SCN,
    case when (r.next_scn > c.required_checkpoint_scn) then ‘NO’ else ‘YES’ end purgable
    FROM DBA_REGISTERED_ARCHIVED_LOG r, DBA_CAPTURE c
    WHERE r.CONSUMER_NAME = c.CAPTURE_NAME;
    According to Metalink note 373066.1 this is what RMAN does, so it should be safe.

  • For streams , database in Archive log mode or non archive log mode?

    Hello ,
    I have a basic question,
    To set up oracle streams, what should be the the database mode (archive log or non archive log mode)?
    Thanks in advance,
    Raj

    It needs to be in archive log mode..thts the place frm where it captures the necessary information....
    Kapil

  • Script for moving & deleting files

    Hi
    I'm quite new to scripts & looking for a script to move selected files with time-stamp & also a script to delete selected file/s in a directory. Below is an example of my requirement
    Move
    Ex:  c:\work\source\test.txt to c:\work\target\test.txt_04202015022100
    Delete
    Ex: c:\work\target\test-1.txt
    Could someone help me please.
    Thank very much
    Neil

    This forum is for scripting questions rather than script requests.
    Please start by reading the following:
    Posting guidelines
    Handy tips for posting to this forum
    How to ask questions in a technical forum
    Rubber duck problem solving
    How to write a bad forum post
    Help Vampires: A Spotter's Guide
    -- Bill Stewart [Bill_Stewart]

Maybe you are looking for

  • IOS 4.3 Home Sharing:  "Shared" Not Appearing In iPod

    I just updated to 4.3 today and enabled Home Sharing on my computer immediately afterwards. The account showed "On, no users connected" under iTunes preferences on the computer, and iTunes was open and running the entire time I attempted the followin

  • Hp pavilion g6

    my hp pavilion's hinge on the left side under the power button is broken and crack. it make me can't start and operate my hp pavilion g6. when I start to open the screen, part on the left corner beside the left hinge open too and the power button  is

  • Using a iMac in Europe

    Hi everyone, I am buying my mother-in-law a iMac for her birthday and she lives in Germany. Is this a true statement? Apple uses universal hardware within their systems, which means the power should automatically switch based upon the voltage coming

  • Setting up Static IP addresses

    In the FAQ entry for setting up static IP addresses, it says to set the "Preferred DNS server" to: 192.168.1.1 Currently, mine is set to: 68.94.156.1 with an Alternate DNS Server of: 68.94.157.1 Now, I'm wondering, does the Prefered DNS [i]have[/i] t

  • Photoshop CS6 and Suitcase Fusion 4

    I am trying to work with my previous Photoshop files I created last night on CS5.5 and Suitcase Fusion 4.  All my loaded and active fonts are not active in Photoshop.  How do i get my fonts to be activated in my adobe applications??