Question & Answer
Question
Why do the replication programs create files in the /tmp directory? How much space is required for these files?
Cause
The replication programs create empty files in the /tmp directory to identify IPC message queues and shared memory. The only space required for these empty files is the space that is used for their directory entries. The command programs (asnccmd, asnacmd, asnmcmd) use the message queues to communicate with the Capture program, the Apply program, and the Replication Alert Monitor. DB2 Data Propagator programs use the shared memory to hold program trace flow information.
- Each instance of a Capture, Apply, or Replication Alert Monitor program creates one IPC message queue file that identifies the message queue that it uses to receive commands from a command program.
- Each instance of a command program creates an IPC message queue file that identifies the message queue that it uses to receive responses from a Capture, Apply, or the Replication Alert Monitor program.
- The asntrc program creates an empty file that is used to identify shared memory that will hold program (Capture, Apply, Monitor) trace flow information. The asntrc command input parameters specify a qualifier or schema and a database that match the corresponding Capture, Apply, Monitor program input parameters.
The following example illustrates how the replication programs use the empty files that they create in the /tmp directory.
1. Start the Capture program:
asncap capture_server=DSN1 capture_schema=ASN startmode=cold
The Capture program creates the file /tmp/DSN1.ASN.CAP.IPC to identify its command message queue. The /tmp/DSN1.ASN.CAP.IPC file and its associated command message queue are removed when the Capture program ends.
2. Use the asnccmd program to display the state of each Capture thread:
asnccmd capture_server=DSN1 capture_schema=ASN status
The asnccmd capture_server parameter must match the asncap capture_server parameter. The asnccmd capture_schema parameter must match the asncap capture_schema parameter. The asnccmd command sends a status command to the capture program message queue that is identified by the /tmp/DSN1.ASN.CAP.IPC file.
3. Start the trace facility to trace the running Capture program:
asntrc on -db DSN1 -cap -schema ASN
The trace facility creates the /tmp/DSN1.ASN.CAP.TRC file to identify its trace shared memory. The asntrc -db parameter must match the asncap capture_server parameter. The asntrc -schema parameter must match the asncap capture_schema parameter. The Capture program writes its program flow information to the shared memory that is identified by the /tmp/DSN1.ASN.CAP.TRC file. The /tmp/DSN1.ASN.CAP.TRC file and its associated shared memory are removed by an asntrc off command:
asntrc off -db DSN1 -cap -schema ASN
Answer
The user ID that is used to run the replication programs must be defined to use z/OS® UNIX or OS/390® UNIX. The user ID must have an OMVS segment and must have read and write access permission to the /tmp directory. An OMVS segment is the portion of a RACF profile that contains OMVS logon information.
In DB2 UDB Version 8 Fix Pack 4, support is added for the TMPDIR environment variable. The TMPDIR environment variable can be set to identify the directory pathname for the Version 8 program temporary files. Set the TMPDIR environment variable by adding it to the .profile file in the home directory of all user IDs that run the Version 8 programs. If the TMPDIR environment variable is not set, the replication Version 8 programs will create their temporary files in the /tmp directory. The user ID that is used to run the replication Version 8 programs must have read and write access permission to either the /tmp directory or the directory specified by the TMPDIR environment variable.
Was this topic helpful?
Document Information
Modified date:
16 June 2018
UID
swg21109847