Begin Transaction
The Begin Transaction message starts a read or write transaction, which is required for all data-related
commands (to create, update, delete, or retrieve subscriptions). A client connection can only have one
transaction open at a time. The begin_txncommand defines the Begin Transaction message.
The following commands are not required to be issued from within a transaction: switchover,
status, dump_conn.
Begin Transaction Request
By opening a read transaction, the client indicates to the PDBA that only data querying requests are
sent; no database-changing requests (create, update, or delete) are sent. Any database-changing requests
sent in a read transaction return a failure. Multiple client applications can have read transactions open
at the same time. Responses from querying requests are sent back to the client immediately. There is
no need to end the read transaction until you are through sending requests. Read transactions can be
sent to either the Active or Standby PDBAs.
Take care when opening a read transaction on the standby PDBA. While two PDBAs are communicating
normally, the data on the standby is valid. However, if the connection between the two PDBAs is
broken and they cannot communicate, the information contained on the standby PDBA does not
contain the new updates written to the active PDBA while the connection was broken. Thus in this
case, data obtained from a read transaction on the standby PDBA would not be current and accurate
information.
When the connection is re-established, the standby PDB is automatically re-synched to the current
level of the active PDB. It is possible to achieve greater performance by sending read transactions to
the standby PDB and write transactions to the active PDB. However, the precautions noted above
should be considered.
By opening a write transaction, the client informs the PDBA that the database is updated in some way.
After opening a write transaction, the client can send database-changing requests. Each command is
evaluated for validity and cached locally.
Note:
The commands are not saved in the database or sent to the RTDB until the write transaction is ended.
The commands within the transaction can also be aborted (or rolled back) with an abort_txn command
any time before the transaction is ended with the end_txn command. Only one client is allowed to
open a write transaction at a time. Write transactions can be opened only on the Active PDBA. Attempts
to open a write transaction on the Standby PDBA result in an error response.
It is possible for a client to make querying requests inside a write transaction. In this case, it is important
for the client to remember that the data returned can reflect any updates that the write transaction
has made so far but not yet committed. If the write transaction is aborted, the data retrieved from the
query might no longer be valid.
The begin_txn command defines the Begin Transaction request message.
Parameters :
(Mandatory) Type of transaction to open.
type
read or write
Values:
57
910-6022-001 Revision A, March 2011
PDBI Request/Response MessagesProvisioning Database Interface Manual