When trying to start sp_cop after a previous shutdown, the following errors are observed in the event log:
EVENT_LOG:
02/16/11 01:41 Notice: Result (12) Not enough space calling shmat to attach to shared memory segment (3002) [sp_ordr(shs)/4107]
02/16/11 01:41 Error: que_init: Cannot attach to shared memory [sp_ordr(que)/4107]
02/16/11 01:41 Notice: Error opening output queue que_SHMERR: Shared memory error que_open(-,FHexpQueue+X,0x70406754+PR+o.ssordprd+sp_ordr+o.ssordprd) [sp_ordr(rim)/4107]
02/16/11 01:41 Notice: data route to 70406754.1.bf failed err=100 [sp_ordr/4107]
02/16/11 01:41 Error: 11004 - sp_ordr failure writing to queue(s) [sp_ordr/4107]
02/16/11 01:41 Notice: Exit sp_ordr to retry rim-write. [sp_ordr/4107]
02/16/11 01:41 Process exited sp_ordr (for o.ssordprd) [pid = 4107] - exit(1)
02/16/11 01:41 Process launched: sp_ordr (for o.ssordprd) [pid = 9695]
02/16/11 01:41 Notice: Oracle env - ssordprd:/apps/opt/oracle/product/10.2.0 [sp_ordr(pdb)/9695]
Also:
11/24/08 13:26 Notice: Result (12) Not enough space calling shmat to attach to shared memory segment (3002) [sp_cop(shs)/27943]
11/24/08 13:26 Error: que_init: Cannot attach to shared memory [sp_cop(que)/27943]
11/24/08 13:26 Error: queue initialization failed - exiting [sp_cop/27943]
Here the messages when sp_cop is failing to start:
$./sp_cop -u2200 &
queue initialization failed - exiting
que_SHMERR: Shared memory error
This was due to spike of high volume on the source ( or target) database during the time frame. Also too many named queues along with a high value for the queue parameter SP_QUE_POST_SHMSIZE or SP_QUE_Q_SHMSIZE cause the error.
Source Resolution:
If this instance of Shareplex had a number of named export queues and/or a high setting of the queue parameter SP_QUE_Q_SHMSIZE , then Shareplex may have run out of physical memory during restart. Try the following workaround to have it running:
a. Go to the $SP_SYS_VARDIR/data directory and edit the file paramdb to reduce the value of the parameter SP_QUE_Q_SHMSIZE from its current setting to half, one-quarter and so on. Do this on a trial and error basis. The default is 8388608 bytes
b. Each time attempt to start sp_cop.
Note: This solution only applies to the situation described here. Trying the workaround will not do any harm and a copy of the original paramdb can be made prior to changing it, just in case.
Target Resolution:
If this instance of Shareplex had a number of named Post queues and/or a high setting of the queue parameter SP_QUE_POST_SHMSIZE (say 128M, 256M, 512M or higher), then Shareplex may have run out of physical memory during restart. Try the following workaround to have it running:
a. Go to the $SP_SYS_VARDIR/data directory and edit the file paramdb to reduce the value of the parameter SP_QUE_POST_SHMSIZE from its current setting to half, one-quarter and so on. Do this on a trial and error basis. The default is 33554432 (32M).
b. Each time attempt to start sp_cop.
Note: This solution only applies to the situation described here. Trying the workaround will not do any harm and a copy of the original paramdb can be made prior to changing it, just in case.
Additional Information:
Here is the description of the parameters as taken from Shareplex Reference Guide:
SP_QUE_Q_SHMSIZE
This parameter determines the specific shared-memory size for the capture and export
queues.
Default: 8388608 bytes
Range of valid values: 8388608 to no maximum
Takes effect: Whensp_copis restarted
SP_QUE_POST_SHMSIZE
This parameter determines the specific shared-memory size for the post queue. The SP_QUE_POST_SHMSIZE parameter is one of two parameters that have replaced the SP_QUE_SHMSIZE parameter, which has been retired in SharePlex version 5.0. Note that the default value for SP_QUE_SHMSIZE was 33554432, and since that was the amount of shared memory shared by all of the queues and each queue now has its own shared-memory segment, overall shared memory usage might increase. In addition, the queue code takes the existing value of SP_QUE_SHMSIZE and converts it to appropriate
values for SP_QUE_POST_SHMSIZE and SP_QUE_Q_SHMSIZE.
Warning! Increasing this parameter might require an increase in the maximum shared memory segment size in your system settings.
User configurable
Introduced in version 5.0
Default: 33554432 bytes
Range of valid values: greater than 8388607
Takes effect: When sp_cop is restarted