cancel
Showing results for 
Search instead for 
Did you mean: 

Can a service be made to obey the SADIAGDIR setting?

justin_willey
Participant
2,557

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?

Accepted Solutions (0)

Answers (1)

Answers (1)

johnsmirnios
Employee
Employee

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

justin_willey
Participant
0 Kudos

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.

johnsmirnios
Employee
Employee

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.

justin_willey
Participant
0 Kudos

Perfect - I'll check

Thanks

justin_willey
Participant
0 Kudos

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.

justin_willey
Participant
0 Kudos

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.