Take the following steps:
Enable the server to generate a shared memory dump on conditions:
1> sp_configure "dump on conditions", 1 2> go
Specify the dump condition using sp_shmdumpconfig. The syntax for this stored procedure is:
sp_shmdumpconfig "action", type, value, maximum-dumps, dumpdir, dump_file
sp_shmdumpconfig uses positional parameters. When setting a parameter that falls to the right of parameters you do not wish to set, specify null values for the unset parameters.
For example, to request a one-time memory dump on signal 11:
1> sp_shmdumpconfig "add", signal, 11,1,"dump_dir" 2> go
where dump_dir is the directory where you want the dump file deposited; this directory must have sybase read and write permission.
To request a memory dump on the occurrence of a 605 error:
1> sp_shmdumpconfig ’add’, error, 605, null, null, null, include_page 2> go
To request a memory dump for the 8xx range of errors:
1> sp_shmdumpconfig ’add’, module, 800 2> go
After collecting the desired data, you can turn off collection by deleting the dump condition. For example, to drop the condition for error 631 and disable shared memory dumps:
1> sp_shmdumpconfig "drop", "error", 631 2> go 1> sp_configure "dump on conditions", 0 2> go