Shutdown and Shared Memory Files

The method you select to shut down Adaptive Server or Backup Server may affect shared memory segments.

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

If Adaptive Server is configured with a memory size greater than the MAXSHMSEGSIZE parameter in the operating system, 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/$SYBASE_ASE.

When Adaptive Server is shut down in a normal manner, the shared memory files are automatically removed. If Adaptive Server fails 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 failure or a kill -9 command, because Adaptive Server must be able to overwrite the previously created shared memory files.

Killing Adaptive Server or Backup Server abnormally also leaves shared memory segments. Use the ipcs and ipcrm commands to identify and remove these shared memory segments that show a “NATTACH” count of 0.

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