# 22. Virtuoso Functions Guide - txn_killall

Chapter Contents | Prev | Next
Keyword Search:
www.openlinksw.com
docs.openlinksw.com
Book Home
Contents
Preface
Virtuoso Functions Guide
Administration
Aggregate Functions
Array Manipulation
BPEL APIs
Backup
Compression
Cursor
Date & Time Manipulation
Debug
Dictionary Manipulation
Encoding & Decoding
File Manipulation
Free Text
Hashing / Cryptographic
LDAP
Locale
Mail
Miscellaneous
Number
Remote SQL Data Source
Replication
SOAP
SQL
String
Transaction
mts_connect
mts_get_timeout
mts_set_timeout
mts_status
txn_error
txn_killall
Type Mapping
UDDI
User Defined Types & The CLR
Virtuoso Java PL API
Virtuoso Server Extension Interface (VSEI)
Web Server & Internet
XML
XPATH & XQUERY
Functions Index

## txn_killall

kill all pending transactions
txn_killall (in code integer);
Description

This function will terminate all pending transactions. This can be used for resetting infinite loops in stored procedures etc.

The code determines the error reported to the client. Number 6 is preferable, corresponding to the 'transaction rolled back due to previous SQL error'.

Once any SQL statement or procedure notices that its transaction is dead, e.g. deadlocked, it signals the error and takes appropriate action, which is typically to signal the error to the caller and ultimately to the client.

Examples

    txn_killall (1);

-- kills all transactions with the S1T00 'timed out' error.