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%20Hiner's gravatar image

Ron Hiner
880202427
accept rate: 9%


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.

permanent link

answered 10 Jun '10, 21:49

Mark%20Culp's gravatar image

Mark Culp
22.6k9129265
accept rate: 40%

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.

(11 Jun '10, 03:10) Ron Hiner

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

(11 Jun '10, 12:17) Mark Culp

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

(11 Jun '10, 22:29) Ron Hiner

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

(11 Jun '10, 22:31) Ron Hiner

@Ron: no problem :-)

(12 Jun '10, 01:37) Mark Culp

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

(14 Jun '10, 08:17) Volker Barth
More comments hidden
showing 5 of 6 show all flat view

use -os option

See more in SA help at

ASA Database Administration Guide  
  The Database Server  
    The database server  
      Database server options
permanent link

answered 10 Jun '10, 20:13

Zote's gravatar image

Zote
1.7k364050
accept rate: 43%

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.

(11 Jun '10, 03:08) Ron Hiner
2

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

(11 Jun '10, 09:09) Breck Carter

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

(11 Jun '10, 22:32) Ron Hiner
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×37
×10

question asked: 10 Jun '10, 18:11

question was seen: 1,000 times

last updated: 10 Jun '10, 21:49