I have a -o parameter on dbsrv9.exe.. that spins the console log to a text file. The file gets pretty big over time, and I'd like to start a new log file every couple days or so. Is there a way to do that? I'm running 9.0.2.3850 Ron asked 10 Jun '10, 18:11 Ron Hiner |
If you simply want to keep the console log file at a reasonable size and have the server automatically start a new file when it reaches a certain size then using the -os command line option is a solution (as pointed out by Zote). This is the only solution available in SA 9 if the server is not to be restarted. Starting in SQL Anywhere 10, you can also change the console log file by using the SQL statement:
This statement starts a new console log file named 'new-file-name.txt'. Setting the value to '' (empty string) turns off recording the console messages to file. A similar option - 'ConsoleLogMaxSize' - may be used (starting in v10) to set the size at which a new log file is automatically started. answered 10 Jun '10, 21:49 Mark Culp 1
this looks like a great solution...I can program this to set a new file name via a scheduled event. Every time a new file name comes along, the file will be restarted.... if I understand this correctly. @Ron: Correct. But note that the ConsoleLogFile server option is not available in 9.0.2. If you are going to stay at 9.0.2 (which has been EOLed since January 2010) you will need to use the -os command line option to have the console log file automatically start a new file as a preset fixed size. @Mark... oooh. I missed that little detail when I first read your answer. yet another reason to upgrade. I'm running out of excuses.. the big one was solved a couple weeks ago here at SQLA. @Mark... sorry, I had to uncheck your answer as the 'accepted' answer. Looks like I SQLA can only accept one as 'the' accepted answer. @Ron: no problem :-) Another new feature I wasn't aware of though I'm long using V10/11... More comments hidden
|
use -os option See more in SA help at
answered 10 Jun '10, 20:13 Zote Thanks Zote... I checked out the the doc. That just sets a limit on the size. The doc doesnt say what happens when the threshold is reached. I can only assume old data is dropped. 2
No, it renames the current file and starts a new one. The old files remain until you delete them. Ok.. cool. I can live with that, even if I cant control the file names. |