Show TOC

sysadmin purge_first_openLocate this document in the navigation structure

Purges the first open transaction from the inbound queue of a Replication Server.

Syntax
sysadmin purge_first_open, <q_number>, <q_type>
Parameters
q_number, q_type

Identifies the stable queue to be purged. Find these values using admin who, admin who, sqm, and admin who, sqt.

Examples
Example 1

Purges the first open transaction from queue 103:1:

sysadmin purge_first_open, 103, 1
Usage
  • sysadmin purge_first_open removes the first open transaction from a Replication Server’s inbound queue. RepAgent threads transfer transactions from the database log one record at a time. A transaction is open when the RepAgent has forwarded the transaction begin record, and possibly some commands within the transaction, but has not yet forwarded the transaction commit or abort record.

  • sysadmin purge_first_open can be only used with inbound queues.

  • Replication Server needs enough space to purge the first open transaction from a stable queue. If there is not enough disk space, this error message appears:
    This RS is out of Disk Space. Use another session to
    add disk space for this command to proceed.

    If this occurs, start another isql session and add stable storage (disk space) to the Replication Server. sysadmin purge_first_open cannot proceed until sufficient storage is available.

  • To review the contents of the transaction being dropped, execute sysadmin sqt_dump_queue before you use this command.

  • To display information about the first transaction in the inbound queue, use admin who, sqt. If the state of the first transaction is “open” (ST:O), it can be dropped from the queue.

  • The sysadmin purge_first_open command is useful when there is an uncommitted transaction in the Adaptive Server log. The open transaction is delivered by the RepAgent to Replication Server. Because there is an open transaction, Replication Server cannot truncate the inbound queue. If the transaction remains open for a long time, the inbound queue fills and Replication Server may run out of queue space.

  • If the first transaction of the queue is not open, this command leaves the queue unchanged. If the Replication Server is restarted after a transaction is dropped, the transaction may reappear as a result of recovery operations.

Caution

Use sysadmin purge_first_open only when you have determined (by using admin who, sqt and admin who, sqm) that the inbound queue is stuck on an uncommitted transaction.

Permissions

sysadmin purge_first_open requires “sa” permission.