How many users 'Username' are logged into the database?

Abstract: How many users 'Username' are logged into the database?

How to know how many users with the name 'Username'�are logged into the database?

From IBConsole | ISQL, type the following command:

SELECT COUNT(DISTINCT TMP$USER_HOST) AS USER_NUMBER FROM TMP$ATTACHMENTS WHERE TMP$USER = 'Username'

Where 'Username' should be replaced with the name of the User.