Advantage Database Server


Advantage SQL Engine


Advantage SQL Engine

Previous topic Next topic  


Advantage SQL Engine

Previous topic Next topic  

Returns user information for the specified table and record number.


EXECUTE PROCEDURE sp_mgGetLockOwner( TableName,Character,255;

RecordNumber,Integer )


TableName (I)

Full qualified path to the table.

RecordNumber (I)

Locked Record number.

UserName (O)

Name of the connected user

ConnNumber (O)

NetWare connection number.

DictionaryUser (O)

Name of user that has authenticated to an Advantage Data Dictionary.

Address (O)

IP or IPX address of the connected user.

LockType (O)

Type of lock. The value will be File Lock, Record Lock or No Lock.

OSUserLoginName (O)

Operating system login name of the connected user.

TSAddress (O)

Terminal Server Client IP address if the connection is made from a Terminal Server session.


You must use the fully qualified path and file name for the TableName parameter. The RecordNumber is an integer value representing the locked record number (or 0 if you are checking for a table lock). You can get a list of locked records on a table using the sp_mgGetAllLocks procedure.

Note With the Advantage Local Server, sp_mgGetLockOwner will only return information, if the lock was instantiated by the instance of Advantage Local Server currently loaded into memory. It is not possible to determine the owner of a lock instantiated from other instances of the Advantage Local Server.



EXECUTE PROCEDURE sp_mgGetLockOwner( '\\server\share\data\table.adt', 1 );

See Also