Script to remove old files from archive in the window

Hello

I want to keep the latest files to archive two days and delete old files to Archive.

Can you please help me with the script which should be used in a scheduled task.
My files in the archive are named as SPCOLD < number >. ARC.

My operating system in windows 2000 and my oracle's 9i.

You can try this...

create two files on .bat and the second .sql file and more planning the .bat file

The .bat file can be like that

off @echo
RMAN target sys/xxx@db_name @.

and for the .sql file, simply add a line

Run {}
delete archivelog all completed before ' to_date (sysdate - 2);
}

and finally to plan the .bat file using the task schedular system

I hope this help you

Neeraj-

Tags: Database

Similar Questions

  • How to remove old files from backup under vista

    How can I delete old backup files?

    Hi AcieWorkman,
    Thanks for posting in the Microsoft community!
    I understand that you want to remove old backup files created using the Backup Wizard. Please correct me if I'm wrong.
    Please follow the steps under How can I delete a backup I created using the back up files Wizard?
    http://Windows.Microsoft.com/en-us/Windows-Vista/back-up-and-restore-frequently-asked-questions

    Please report if you are still having the problem. I will be happy to provide you with the additional options that you can use to get the problem resolved.
    We can't wait to hear back on your part.

  • Recovery using files from archive of log_archive_dest

    Hello

    For my DB, I configured 2 log_archive_dest

    * .log_archive_dest_1 = "location = / arch /'"
    *. LOG_ARCHIVE_DEST_2 ='location = / Arch1 / mandatory '

    I am trying to recover it using the file to archive.

    If I put files from archive in the folder of the Ark and give the command "recover database", it says that the files are expected in arch1.

    Is it because /arch1 is a mandatory place?

    Thanks in advance...

    Kind regards
    JJ

    Yes

    * .log_archive_dest_1 = "location = / arch /'"
    *. LOG_ARCHIVE_DEST_2 ='location = / Arch1 / mandatory '

    Just restart the database with settings

    * .log_archive_dest_1 = "location = / arch /'"
    * .log_archive_dest_2 = "

    and start the recovery.

  • How can I delete files from archive

    Hello
    the db runs on the log mode archive
    Plan to remove the files from archive (am running out of space), I take the new backup to hot in the data files.
    What should be the steps followed series?

    Published by: udayjampani on October 14, 2011 16:34

    As mentioned by others, it's time for you to start to use RMAN to make your life easier.

    If you want to identify the archive logs generated before starting your backup, check your alerts log. You will see something like the following in your alert before 'begin backup ": log

    Thread 1 Advanced to record the sequence 14891 (switch LGWR)
    Currently Journal # 2 seq # 14891...

    In this case, all archive logs with seq #.<14891 are="" older="">

  • How to remove unnecessary files from my mac computer?

    HW to remove unnecessary files from my computer without following these instructions

    MacKeeper

    Human inside

    Results of the analysis of your Mac arrived.

    The State of your system is:

    seriously

    MacKeeper found in:

    327 items

    The amount of junk mail on your Mac is:

    507 bytes

    5 cleaning
    Elements

    1 security
    Elements

    Optimization 0
    Elements

    Activate MacKeeper

    We strongly recommend that set you all the found items. Otherwise, you may experience:

    5 cleaning items

    1 security features

    Low because of unnecessary files disk space

    Theft of personal data:
    user names, passwords.
    credit card

    Already set free: 321 items.

    Activate MacKeeper
    Best regards
    Constantin
    Your Apple certified
    Technical support engineer
    1 (888) 572-5876 1 (800) 462-715 0 (808) 189-1280
    This e-mail has been sent to *.
    Please add [email protected] to your address book to ensure our emails reach your Inbox.

    If you prefer not receiving news from us, here is the link to unsubscribe.
    To change your communication preferences, use this link. Kromtech Alliance Corp., Richmodstrasse 6, 50667 Cologne, Germany Privacy policy

    Remove MacKeeper rather - we know junkware that will try to entice you to pay money, the company has had several lawsuits against it for their business practices.

    http://AppleInsider.com/articles/15/08/10/MacKeeper-to-pay-out-2m-in-proposed-CL ass-action-regulation

    Ignore it and delete the app. Where you get/download MacKeeper?

  • How can I remove old updates from windows to prevent their fill my hard drive?

    How can I remove old updates from windows to prevent their fill my hard drive?

    You don't want to. Otherwise, why would have installed their in the first place? They are updated for security. Thema alone.

  • Remove temporary files from the local disk c/documents and settings/user/localsettings/temp name

    Remove temporary files from the local disk c/documents and settings/user/localsettings/temp name

    By definition, this folder should contain only the elements you don't need.  If I understand correctly, this temporary folder is a place where temporary files are stored during program facilities and the facilities.  However, I have seen references other sites to help saying some programs can store folders and files.

    I do my own temporary file elsewhere, name it accordingly and move all the files in the temp folder to the new folder. Use your computer normally for a while, and if nothing complains about missing files, you have a good indication that none of the moved files are important and should be safe to delete.

  • How to remove unused files from my account site live hotmail?

    original title: unused files

    How to remove unused files from my account site live hotmail?

    The question you have posted is bound using Windows Live (hotmail) and would be better suited to the Windows Live Help Solution . Please visit this link to find a community that will provide the support you want.

  • How can I remove restrictions file from an external hard drive so I can view or access these files on any computer instead of just one file has first been created?

    I have an external hard drive that I loaded all my important files on all my computers. There is a file that I put in place restrictions to access, but it has been so long that I don't know how I did it or how to remove it. How can I remove restrictions file from an external hard drive so I can view or access these files on any computer instead of just one file has first been created? The computer that I created the folder of running Windows Vista. I am not able to access files in this folder from any other computer. It gives me the following error: "E:\School is not accessible. Access is denied. »

    Hi mango127,

    I suggest that you give all permissions for everyone on this folder and check if it works.

    "Access denied" error message when you try to open a folder

    http://support.Microsoft.com/kb/810881

    How to capture a file or a folder in Windows XP

    http://support.Microsoft.com/kb/308421

    If the previous step fails then I would suggest that you take the backup of this folder on the computer you were accessing and later to format the hard drive.

    How to use disk management to configure basic disks in Windows XP

    http://support.Microsoft.com/kb/309000

  • How to remove old files saved in Word pad

    How can I remove old files saved in Word Pad?

    Find where Wordpad stored the files on the disk.  The first place to look is in your Documents folder: click the Start button, and then click Documents . Boulder computer Maven
    Most Microsoft Valuable Professional

  • Transfer older files from OS to the newest operating system

    Can I transfer files from Win 98SE to Windows XP.  If so, how?

    So, here are a few suggestions. What you do depends on 1) if the Win98 box has the material; (2) the amount of data you have.

    1. Since you have Win98 second edition, USB is supported. Copy the data files on a USB key. You need to get the Win98 drivers on site of the thumb drive mftr. ; or

    2nd burn data on a CD - R (not CD -RW ) if the Win98 box has a burner; or

    3 remove the hard drive from Win98 and put in a USB drive or adapter box and attach it to the XP box. MS - MVP - Elephant Boy computers - don't panic!

  • How to remove programe files that remain in the registry after I uninstalled these programs?

    How to remove programe files that remain in the registry after I uninstalled these programs?
    I uninstalled Nero 8 on my system (Windows Vista Edition home premium, 64-bit dell 1737 studio system); but several Nero files are always stuck in my registry. How can I remove them without destabilizing the system? Thank you.

    Yes, Nero is a software that I hate. I liked Nero until 6 version, I think, but after the Version 8 and 9, it was pathetic.

    2 years ago I had uninstalled a lot of software and there were many many registry entries obsolete - when a search I found that a member of a forum on the Web recommend CCleaner.

    Used from 2 years - each time without making registry backups. He never did wrong with my two PC - Windows XP SP3 and Windows 7 SP1 (previously Windows 7 RTM).

    The registry cleaner is fantastic.

    In which case you can try it, here's the download link.

    WARNING: Installation be sure to uncheck the installation of Google Chrome options.

    CCleaner automatically prompts you to create backups of registry before she cleans up the registry. The choice is totally yours.

  • How can I remove an account from activation if the former owner is not found?

    How can I remove an account from activation if the former owner is not found?

    Unless it's yours, you can't, and Apple will be not remove for you. Locking activation is a measure of protection against theft.

    (141565)

  • How to find all the old files and documents on the hard drive

    Original title: how to find a file

    How to find all THE old files and documents on the hard drive

    Hello

    -Are the old hidden files?

    I recommend you follow the steps in these articles for help.

    Show hidden files
    Find a file or folder

  • Whenever I try to delete files from my USB, the message saying that you can not delete the file, the disk is write protected

    original title: write protection

    Whenever I try to delete files from my USB, the message saying that you can not delete the file, the disc is write protected is displayed. What I can do to undo the write protection?

    Try this
    Go to disk management in administrative tools of the control by just one panel right click on the icon my computer on the desktop and select manage and then try to format your USB

    OR

    Try this
    http://www.ehow.com/how_5187399_format-write-protected-disk.html

Maybe you are looking for