sp_mgGetUserIndexes

Advantage SQL Engine

  Previous topic Next topic  

Returns a result set containing all open index files for the specified user.

Syntax

EXECUTE PROCEDURE sp_mgGetUserIndexes( UserName,Character,200 )

Parameters

UserName (I)

Name of the connected user or a NetWare connection number.

IndexName (O)

Fully qualified path to the index file.

Remarks

The user name can be the Advantage client’s computer name or a NetWare connection number if running against the Advantage Database Server for NetWare. If using a connection number, it must be enclosed in quotes. The index names returned are the fully qualified paths to the index files on the server. To be more specific with the user name parameter, the user name (client computer name) and the operating system user login name can be specified together (computer name first), separated by a backslash '\'.

Note With Advantage Local Server, sp_mgGetUserIndexes will only return indexes open by this user in the instance of Advantage Local Server currently loaded into memory. Information about tables the user has opened in other instances of the Advantage Local Server will not be returned.

Example

EXECUTE PROCEDURE sp_mgGetUserIndexes( 'username');

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

EXECUTE PROCEDURE sp_mgGetUserIndexes( '37' );

To retrieve index names using a computername and username combo, separate them with a backslash:

EXECUTE PROCEDURE sp_mgGetUserIndexes( 'workstation\username' )

 

Trailing backslash characters after the computer name are ignored:

EXECUTE PROCEDURE sp_mgGetUserIndexes( 'workstation\' )

 

See Also

sp_mgGetAllIndexes

sp_mgGetIndexUsers

sp_mgGetConnectedUsers