Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 17 » SQL Anywhere Server - SQL Reference » SQL statements » Alphabetical list of SQL statements

DROP MUTEX statement

Drops the specified mutex.

DROP MUTEX [ IF EXISTS ] [ owner.]mutex-name
  • owner

    The owner of the mutex. owner can also be specified using an indirect identifier (for example, `[@variable-name]`).

  • mutex-name

    The name of the mutex. mutex-name can also be specified using an indirect identifier (for example, `[@variable-name]`).

  • IF EXISTS clause

    Use this clause to drop a mutex only if it exists. If a mutex does not exist and this clause is specified, then nothing happens and no error is returned.


If the mutex is locked by another connection, the drop operation proceeds without blocking but the mutex will persist in the namespace until the mutex is released. Connections waiting on the mutex receive an error immediately indicating that the object has been dropped.


You must have the DROP ANY MUTEX SEMAPHORE or DROP ANY OBJECT system privilege, or be the owner of the permanent mutex. For a temporary mutex, you must be the connection that created the mutex.

Side effects

Automatic commit, but only for permanent mutexes.

  • ANSI/ISO SQL Standard

    Not in the standard.


The following statement drops the protect_my_cr_section mutex:

DROP MUTEX protect_my_cr_section;