Question
· Nov 11, 2017

The COS command to control the locks and the transactions

I would like to remove all the active locks and roll back all the on-going transactions.

Is there any COS command I could use?

By the way, any command I could see the current on-going locks and transactions?

Thanks.

Discussion (1)0
Log in or sign up to continue

To release all LOCK's for your current process, you can use argumentless LOCK command.

To rollback all transactions in the current process, you can use TROLLBACK also without any arguments.

If you want to control locks outside, you can look at class SYS.Lock in %SYS namespace.

To find active locks, you can use either special global ^$LOCK or queries in the class %SYS.LockQuery

You can get transaction level with special variable $tlevel. For other processes, you can use class %SYS.ProcessQuery. To check if the process in a transaction or not. But you can't just rollback transaction inside another process, you can terminate it and transaction will be automatically rollbacked.