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 REMOTE CONNECTION statement

Drops remote data access connections to a remote server.

Syntax
DROP REMOTE CONNECTION TO server-name
CLOSE { CURRENT | ALL | connection-id }
[ FOR { EFFECTIVE USER | LOGIN USER | USER user-name } ]
Parameters
  • server-name

    The remote data access server that was specified in the CREATE SERVER statement.

  • CLOSE clause

    CLOSE CURRENT drops remote connections for the current local connection.

    CLOSE ALL drops remote connections for all local connections.

    CLOSE connection-id drops remote connections for the local connection with the specified ID.

  • FOR clause

    FOR EFFECTIVE USER drops remote connections that were created with the current effective user's externlogin credentials.

    FOR LOGIN USER drops remote connections that were created with the current login user's externlogin credentials.

    FOR USER user-name drops remote connections that were created with the externlogin credentials for user-name.

    If the FOR clause is omitted, then remote connections for all users are dropped.

Remarks

The DROP REMOTE CONNECTION statement allows you to explicitly close connections to a remote server. You may find this useful when a remote connection becomes inactive or is no longer needed.

Privileges

Side effects

None

Example

Drop all remote connections, whether they are the current connection or not, to the myServer server for the effective user:

DROP REMOTE CONNECTION TO myServer CLOSE ALL FOR EFFECTIVE USER;

Drop the remote connection to the myServer server for the current local connection for user2:

DROP REMOTE CONNECTION TO myServer CLOSE CURRENT FOR USER user2;

Drop all remote connections, whether they are the current connection or not, to the myServer server for user2:

DROP REMOTE CONNECTION TO myServer CLOSE ALL FOR USER user2;

Drop the remote connection to the myServer server for the current local connection with the current connection's login user:

DROP REMOTE CONNECTION TO myServer CLOSE CURRENT FOR LOGIN USER;

Drop the remote connection to the myServer server for the connection with the ID connection-id and the current effective user:

DROP REMOTE CONNECTION TO myServer CLOSE connectionId FOR EFFECTIVE USER;