We are having a great deal of trouble de-bugging a problem where a busy production server (100+GB DB - 300+ users, 24/7 operation) is regularly crashing, after having been quite stable for more than a year.

Support are keen to get hold of a full crash dump and we have set the necessary command line settings. The crashes only happen when a large cache is in use (29GB), so the dump is big and will need a location with lots of space - much more than is available on the c: drive. Accordingly we set the SADIAGDIR environment variable, but it seems to be ignored entirely, with the dump been saved to %ALLUSERSPROFILE%\Application Data\SQL Anywhere 11\diagnostics (on c:) whatever we do. This simply saves the dump until disk space is exhausted and the server crashes.

Our support contact feels this may be related to the service running as a service - but it is not realistic to run a production system of this size as a standard application - if the user is logged off the (remote) server for any reason, the database will of course be stopped without warning.

Does anyone have experience of using the SADIAGDIR environment variable successfully?

asked 05 Jul '11, 14:15

Justin%20Willey's gravatar image

Justin Willey
7.6k137179249
accept rate: 20%

edited 05 Jul '11, 17:29


Are you certain you are setting the variable in the system variables rather than the per-user variables? You will need to restart the service after changing the variable.

If all else fails and depending on the OS version, you could try using an NTFS symlink or, for older systems, junction point (akin to a directory symlink) to force the diagnostics directory onto another drive.

NTFS Symbolic Link on Wikipedia

NTFS Junction Point on Wikipedia

permanent link

answered 05 Jul '11, 14:33

John%20Smirnios's gravatar image

John Smirnios
11.9k396165
accept rate: 37%

edited 05 Jul '11, 14:38

Thanks John for the quick response, I'm quite sure about the environment variable, we've had the chance to check it a few times :(

  • I'm trying the redirect option now. It's Windows Server 2008 so I'll try the symlink option.

Do you know a way to force a crash that will generate a dump (so I can test that I've done it right)? Just killing the process of course doesn't give it a chance to save anything.

(05 Jul '11, 14:48) Justin Willey
Replies hidden
1

Sadiags.xml is located in the same directory and I think it is updated every time you shut down (or start?) the server. You could delete sadiags.xml and watch for it to reappear or just check the timestamp on it.

(05 Jul '11, 14:52) John Smirnios

Perfect - I'll check

Thanks

(05 Jul '11, 14:56) Justin Willey
Replies hidden

That works - many thanks. It is in fact Server 2003, so the Junction Point method applies:

linkd "%allusersprofile%\application data\sql anywhere 10\diagnostics" "e:\diagnostics"

when you START the service, the sadiags.xml file appears on the e: drive - so pesumably this is entirely transparent to the db process so the dump will do the same.

(05 Jul '11, 15:21) Justin Willey

Successfully got a dump this time!!! Whether it tells anyone anything is the next stage.

It does seem that there is an issue with SADIAGDIR on 10.0.1 (at least on Windows), I've just done another test in XP with the same result.

(06 Jul '11, 11:55) Justin Willey
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:

×119
×13

question asked: 05 Jul '11, 14:15

question was seen: 2,255 times

last updated: 06 Jul '11, 11:55