Shutdown and shared memory files

When Adaptive Server starts, it creates SERVER_NAME.krg file in $SYBASE to store information about shared memory segments that it uses.

If Adaptive Server is configured with a memory size that is greater than the MAXSHMSEGSIZE parameter in the operating system then Adaptive Server may create additional shared memory segments and for every additional shared memory segment that it creates, an additional file with SERVER_NAME.srg[N] (where N ranges from 0 – N), is created under $SYBASE.

When Adaptive Server is shut down in a normal manner, the shared memory files are automatically removed. If Adaptive Server crashes or is stopped with the kill -9 command, these files are not deleted. You need read and write permissions on these files to restart Adaptive Server after a crash or a kill -9 command, because Adaptive Server must be able to overwrite the previously created shared memory files.

If Adaptive Server or Backup Server is killed abnormally it also leaves shared memory segments. Use the ipcs and ipcrm commands to identify and remove these shared memory segments that have “NATTACH” count as “0”.

See the UNIX man pages for more information about ipcs and ipcrm.