Is there a way I can delete the archive log files that are older than three days in Windows 2000?
Yes, you can. In Unix, I have a scheduled job which does this for me. Unfortunately, there is no native way to script this in a Windows platform since the DIR command cannot find files older than a specific date. To cure this problem, I had to create a Perl script which does this for me. You can find a copy of this Perl script on my Web site at http://www.peasland.net/delete_old.pl and of course, you'll need to install Perl on your machine to get this to work. A good installation of Perl can be found on ActiveState's Web site (http://www.activestate.com).
In my Perl script, there is a variable that you can easily modify that will specify how old the files must be. You'll also have to change the directory that the files reside in for your specific installation.
I also schedule this job using Window's AT command. This way, I can automate the removal of these older files.
For More Information
- Dozens more answers to tough Oracle questions from Brian Peasland are available.
- The Best Oracle Web Links: tips, tutorials, scripts, and more.
- Have an Oracle or SQL tip to offer your fellow DBAs and developers? The best tips submitted will receive a cool prize. Submit your tip today!
- Ask your technical Oracle and SQL questions -- or help out your peers by answering them -- in our live discussion forums.
- Ask the Experts yourself: Our SQL, database design, Oracle, SQL Server, DB2, metadata, object-oriented and data warehousing gurus are waiting to answer your toughest questions.
Dig Deeper on Oracle database design and architecture
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.