Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Delete the log using cron job

 
MInu
Ranch Hand
Posts: 517
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hai all,

I am using Sybase as my back end for my web application.When i execute some complex quries, the connection will lost or i will not get any responds.I increased the size of the tempdb,then the problem solved.But when the user's start to execute the same query,the same issue will happens.Last I found the reason that the log is writing in every event.So i decided to write a cron job to clear the log frequently.
So please anybody help me to write the cron job to clear the log.

Thanks in advance
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24208
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This has nothing to do with Java, let alone advanced Java; let's move it to Linux/UNIX.
 
Craig Jackson
Ranch Hand
Posts: 405
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
See below:

Write CRON Job
 
Peter Rooke
Ranch Hand
Posts: 847
1
Java Linux Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Been a while since I used Sybase, but I think you should be able to turn the the logging off. I know there is an option when you create a new database.

Something I quickly dug up: sybase loggin
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18020
47
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There's a facility called logrotate that's explicitly designed to keep logfiles under control. It can keep logfiles in aged generations, starting a new logfile at intervals and/or when the logfile reaches a certain size.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic