ENCINA(8) — Maintenance
NAME
sfsadmin query tranlock - displays information about locks held by a specified transaction
SYNOPSIS
sfsadmin query tranlock -server servername tid
ARGUMENTS
-server servername Specifies the name of the file server. The name must be registered with the DCE Directory Service. If the -server option is not specified, the default is the server defined by the environment variable ENCINA_SFS_SERVER.
tid Specifies the integer (transaction identification number).
DESCRIPTION
The sfsadmin query tranlock command displays information about all locks held by the specified transaction. (The sfsadmin list ofds command displays the transaction identifier of each transactional OFD in the file system.)
EXAMPLE
In the following example, the sfsadmin list ofds command shows that the Accounts file is being accessed using OFD 41. The file is opened in exclusive access mode using transaction 131275. The sfsadmin query tranlock command is used to display locks held by transaction 131275.
% sfsadmin list ofds
Ofd id: 41
File name: Accounts
Owner: (null)
Open time: Mon Oct 18 11:31:33 1993
Transaction id: 0
Number of rpcs: 1
Access mode: exclusive access
Authority:
insert file
inquire file
exclusive file
Consistency: non-transactional
Isolational level: non-tran accumulate
Operation timeout: 20
Auto close: no
Duplicate detection: no detection
Operational force: no
Label: (null)
Open transaction id: 131275
Ofd idle timeout: 60
% sfsadmin query tranlock 131275
Lock 1:
Lock mode: read lock
File name: Accounts.5
Index name: (null)
Key value:
6169 725f 7265 732e 6669 6c65 Accounts
OUTPUT
The following list explains the elements in the output of the sfsadmin query tranlock command:
Lock mode is the type of lock that the transaction holds - for example, read lock or write lock.
File name is the file on which the lock is placed. If the lock is a file lock, the file name may be followed by a period and an integer. The integer represents a file lock space. Multiple locks on the same file do not conflict as long as the locks are in different lock spaces as indicated by different integers in the file name extension.
Index name is the name of the index if this is a record-level lock and null if this is a file-level lock.
Key value is the value that is locked, represented in raw hexadecimal and in ASCII.
In the next example, transaction 131319 holds 5 locks. Note that locks 2 and 4 are record-level locks. The output shows the name of the index (stockNumIndex), and the value that is locked. In this case, the value does not fall within the range of printable ASCII characters. Since the characters cannot be printed, they are displayed as a series of dots.
%sfsadmin query tranlock 131319
Lock 1:
Lock mode: intention write lock
File name: Inventory.3
Index name: (null)
Key value:
656d 706c 6f79 6565 2e66 696c 65 Inventory
Lock 2:
Lock mode: write lock
File name: Inventory
Index name: stockNumIndex
Key value:
0000 0002 0000 0002 ........
Lock 3:
Lock mode: intention read lock
File name: Inventory.3
Index name: (null)
Key value:
656d 706c 6f79 6565 2e66 696c 65 Inventory
Lock 4:
Lock mode: read lock
File name: Inventory
Index name: stockNumIndex
Key value:
0000 0001 0000 0001 ........
Lock 5:
Lock mode: write lock
File name: Accounts.3
Index name: (null)
Key value:
6169 725f 7265 732e 6669 6c65 Accounts
PRIVILEGE REQUIRED
Encina SFS query (Q) permission on the server
RELATED INFORMATION
sfsadmin list ofds
sfsadmin query ofd
sfsadmin terminate ofd
tkadmin abort transaction
tkadmin force transaction
tkadmin list transactions
— March 1997