Subject | Re: [firebird-support] Re: How can I get a list of firebird db users? |
---|---|
Author | Trond |
Post date | 2012-01-12T10:15:56Z |
If you use Firebird version >= 2.1 you can use something like this:
SELECT ma.MON$USER, ma.MON$REMOTE_ADDRESS,ma.MON$TIMESTAMP,
ma.MON$REMOTE_PROCESS,
ma.mon$attachment_id, ma.mon$attachment_name, ma.mon$role,
ma.mon$state,
ma.mon$stat_id, ma.mon$server_pid,ma.mon$remote_pid
FROM MON$ATTACHMENTS MA
WHERE ma.MON$ATTACHMENT_ID <> CURRENT_CONNECTION
Mvh
Trond Dammen
SELECT ma.MON$USER, ma.MON$REMOTE_ADDRESS,ma.MON$TIMESTAMP,
ma.MON$REMOTE_PROCESS,
ma.mon$attachment_id, ma.mon$attachment_name, ma.mon$role,
ma.mon$state,
ma.mon$stat_id, ma.mon$server_pid,ma.mon$remote_pid
FROM MON$ATTACHMENTS MA
WHERE ma.MON$ATTACHMENT_ID <> CURRENT_CONNECTION
> At 03:52 AM 12/01/2012, Ahmet Nuri D wrote:--
>> I find one solition for that
>>
>> SELECT RDB$USER
>> FROM RDB$USER_PRIVILEGES
>> group by
>> 1
>
> If it was that easy, someone would have told you about it. ;-)
>
> All this gives you is a list of users (that may or may not exist) which
> have SQL privileges assigned to them *in that database*. The security
> database (where user accounts live) is not linked to user databases in
> any way.
>
> ./heLen
>
Mvh
Trond Dammen