Table of Contents

Search

  1. Preface
  2. Part 1: PowerExchange CDC Introduction
  3. Part 2: PowerExchange CDC Components
  4. Part 3: PowerExchange CDC Data Sources
  5. Part 4: Change Data Extraction
  6. Part 5: Monitoring and Tuning
  7. Appendix A: DTL__CAPXTIMESTAMP Time Stamps

CDC Guide for Linux, UNIX, and Windows

CDC Guide for Linux, UNIX, and Windows

Lock Files

Lock Files

During initialization, a PowerExchange Logger process creates lock files to prevent other PowerExchange Logger processes from accessing the same CDCT file and log files concurrently.
As long as the PowerExchange Logger process holds a lock on the lock files, locking is in effect for the resources for which the lock files were created.
PowerExchange Logger locking works on local disks on Linux, UNIX, or Windows systems. It also works on the following shared file systems on Linux or UNIX systems:
  • Veritas Storage Foundation™ Cluster File System by Symantec
  • IBM General Parallel File System
  • EMC Celerra network-attached storage (NAS) with Network File System (NFS) protocol version 3
  • NetApp NAS with NFS version 3
The PowerExchange Logger creates lock files in the following order:
  1. A lock file for the CDCT file for a source instance. The PowerExchange Logger generates the lock file name and location based on the directory that is specified in the CAPT_PATH parameter of the dbmover configuration file.
  2. One of the following lock files:
    • If you use a group definition file, a lock file for each set of the PowerExchange Logger log files that is defined by the GROUP statements in the group definition file. The PowerExchange Logger generates the lock file names and locations based on the external_capture_mask parameter in each GROUP statement. In this case, the PowerExchange Logger ignores the EXT_CAPT_MASK parameter in the pwxccl configuration file when creating lock files and processing log files.
    • If you do not use a group definition file, a lock file for PowerExchange Logger log files. The PowerExchange Logger generates the lock file name and location based the directory and file-name prefix that are specified in the EXT_CAPT_MASK parameter of the pwxccl configuration file.
Lock file names end with _lockfile.lck. For example, a lock file for the CDCT file could have the name CDCT_oracoll1_lockfile.lck.
When the PowerExchange Logger process ends, it unlocks the lock files to enable other PowerExchange Logger processes to access the previously locked resources.
To identify a PowerExchange Logger process that holds a lock, look up the process ID (PID) in the Task Manager on a Windows system or issue the ps command on a UNIX or Linux system.
Also, the PowerExchange Logger writes messages to the PowerExchange message log that indicate the locking status. Look for the following key messages:
  • To verify that lock files are created, look for PWX-25802 messages, such as:
    PWX-25802 Process pwxccl.exe pid 5428 locked file C:\capture\captpath\CDCT_instance_lockfile.lck
  • To verify that lock files are unlocked, look for PWX-25803 messages, such as:
    PWX-25803 Process pwxccl.exe pid 5428 unlocked file C:\capture\extcapt\loggerfiles_lockfile.lck
  • If the PowerExchange Logger process cannot find the lock file that it needs to access some resources, it writes message PWX-25800:
    PWX-25800 Could not find lock file
    file_name
  • If a lock file is locked by another process, the PowerExchange Logger process writes some or all of the following messages, depending on if it can acquire a lock before the maximum retry interval that is specified in PWX-25814 elapses:
    PWX-25804 Error trying to lock PowerExchange Logger files PWX-25811 File
    file_name
    is locked by process
    process_name
    pid
    process_id
    on host
    host_name
    date
    date
    time
    time
    PWX-25812 File
    file_name
    is locked by pid
    process_id
    start
    offset
    length
    bytes
    PWX-25813 No information is available on process which locked file
    file_name
    PWX-25814 Trying to lock file
    file_name
    until
    number
    seconds elapses PWX-25815 File
    file_name
    is locked by another process and no more waiting is allowed.
If a PowerExchange Logger process ends abnormally with message PWX-25815 and return code 25815, try to determine the status of the other PowerExchange Logger process that is holding the lock. This other process is identified in message PWX-25811. For example, the other process might not have completely shut down, or both processes might be trying to use the same files because of an error in their pwxccl configuration files.

Back to Top

0 COMMENTS

We’d like to hear from you!