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

LOCK FEATURE statement

Prevents other concurrent connections from using a database server feature.

Syntax
LOCK FEATURE feature-name { ON | OFF } 
feature-name :
'synchronization schema'
| 'all'
Parameters
  • feature-name

    The name of the feature to be locked or unlocked. Specify all to unlock all the features locked by a connection.

  • ON | OFF

    Specify ON to prevent other connections from using the feature. Specify OFF to allow connections to use the feature.

Remarks

You cannot lock a feature more than once for the same connection. If you attempt to unlock a feature that is not locked by the current connection and you do not specify all as the feature name, an error is returned. When a feature is locked by two or more connections, the feature must be unlocked by all connections before it can be used by other connections. Feature locks created by a connection are removed when the connection is dropped. Feature locks are removed when the database server is shut down.

When the synchronization schema feature is locked, the following statements cannot be executed by other connections:

  • START SYNCHRONIZATION SCHEMA CHANGE
  • CREATE SYNCHRONIZATION SUBSCRIPTION
  • DROP SYNCHRONIZATION SUBSCRIPTION
  • ALTER SYNCHRONIZATION SUBSCRIPTION
  • ALTER PUBLICATION
Privileges

You must have the SYS_REPLICATION_ADMIN_ROLE system role.

Side effects

None

Standards
  • ANSI/ISO SQL Standard

    Not in the standard.

Example

The following statement prevents other connections from using the synchronization schema feature:

LOCK FEATURE 'synchronization schema' ON;