cancel
Showing results for 
Search instead for 
Did you mean: 

Is is possible to change a console log file without restarting engine?

Former Member
2,724

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

Accepted Solutions (2)

Accepted Solutions (2)

MarkCulp
Participant

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:

call sa_server_option( 'ConsoleLogFile', 'new-file-name.txt' );

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.

Former Member

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.

MarkCulp
Participant
0 Kudos

@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.

Former Member
0 Kudos

@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.

Former Member
0 Kudos

@Mark... sorry, I had to uncheck your answer as the 'accepted' answer. Looks like I SQLA can only accept one as 'the' accepted answer.

MarkCulp
Participant
0 Kudos

@Ron: no problem 🙂

VolkerBarth
Contributor
0 Kudos

Another new feature I wasn't aware of though I'm long using V10/11...

Former Member

use -os option

See more in SA help at

ASA Database Administration Guide  
  The Database Server  
    The database server  
      Database server options
Former Member
0 Kudos

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.

Breck_Carter
Participant

No, it renames the current file and starts a new one. The old files remain until you delete them.

Former Member
0 Kudos

Ok.. cool. I can live with that, even if I cant control the file names.

Answers (0)