solidDB Help : Replication : Advanced Replication : Maintaining a distributed system : Upgrading schemas in a distributed system by using Maintenance Mode features : Table-level locking
  
Table-level locking
You can lock (and unlock) an entire table explicitly by using table-level locking functionality. For example, you might lock a table for the duration of critical schema upgrade operations to ensure that the schema upgrade operations are not affected by other operations on the table.
You can lock a table in EXCLUSIVE or SHARED mode. If you plan to change the schema of a table, you will probably want to lock the table in EXCLUSIVE mode. You cannot acquire an exclusive table lock if any other user has locked the table and, when you have the exclusive lock, other users are preventing from using that table until you unlock it.
In most situations, locks are released at the end of a transaction. The LOCK TABLE statement, however, gives you the option of holding a lock past the end of a transaction. If you do hold a lock past the end of a transaction, then you must explicitly UNLOCK the table to release that lock. Otherwise, the lock will persist until the client application who has obtained the lock, disconnects.
Although table locking is used primarily to make it easier and safer to upgrade schemas, you might use it for other purposes as well. You can use table locks at any time, not just when the catalog sync mode is set to Maintenance mode.
For more details, including the syntax to use to get an EXCLUSIVE lock, or to get a long lock that lasts past the end of the current transaction, see LOCK TABLE and UNLOCK TABLE.
Go up to
Upgrading schemas in a distributed system by using Maintenance Mode features