sp_mgKillUser

Advantage SQL Engine

Disconnects the specified user name from the Advantage Database Server.

Syntax

EXECUTE PROCEDURE sp_mgKillUser ( UserName,Character,200 )

Parameters

UserName (I)

Name or NetWare connection number of a connected user to disconnect.

Remarks

The UserName can be the client computer name associated with the connection or a NetWare connection number if running against Advantage Database Server for NetWare.

sp_mgKillUser is a potentially dangerous operation and should be used with extreme caution. sp_mgKillUser will cause the specified user to be abnormally disconnected from the Advantage Database Server. If the user is currently in the midst of an operation, that operation may not be able to run to completion. If the specified user is currently in a transaction, that transaction will be rolled back before the user is disconnected. All records locked by the specified user will be unlocked. All files open by the specified user will be closed. The specified user will then be disconnected. Unpredictable Advantage errors may be received by the Advantage application immediately after it has been "killed".

sp_mgKillUser should NOT be used to disconnect the current application from the Advantage Database Server. The clients normal disconnect method should be used in this instance.

Note sp_mgKillUser has no effect when used with the Advantage Local Server.

Example

EXECUTE PROCEDURE sp_mgKillUser( 'username' );

To retrieve index names using a NetWare connection number, enclose the connection number in quotes:

EXECUTE PROCEDURE sp_mgKillUser( '101' );

See Also

sp_mgGetConnectedUsers