Subject | Re: [IBO] list of users |
---|---|
Author | Peter Lee |
Post date | 2005-08-27T06:44:25Z |
Ok... thanks for the info. The reason for the question is that we have
a little server setup utility, that adds a single user that is used on
all clients for our application (so we're not using sysdba etc).
We add the user using the TIB_Connection.alterUser procedure, and I'd
just like to make it a little more intelligent, so that it could check
to see if the user already exists on the server before attempting to
create it again (sometimes people run our utility multiple times...)
People do run the utility on the server itself.
How do applications such as IBExpert get their list of users for a given
server? Do they use the services API or somehow connect to the security
db remotely without having to know its location?
Regards,
Peter Lee
Helen Borrie wrote:
Peter Lee ptle@...
-----------------------------------------------------------------------
Rising Software Australia Pty. Ltd. http://www.risingsoftware.com/
Publishers of 'Auralia' - Ear Training and 'Musition' - Theory Training
Ph: +61 3 9481 3320 FAX: +61 3 9481 3380 USA Freecall: 1 888 667 7839
a little server setup utility, that adds a single user that is used on
all clients for our application (so we're not using sysdba etc).
We add the user using the TIB_Connection.alterUser procedure, and I'd
just like to make it a little more intelligent, so that it could check
to see if the user already exists on the server before attempting to
create it again (sometimes people run our utility multiple times...)
People do run the utility on the server itself.
How do applications such as IBExpert get their list of users for a given
server? Do they use the services API or somehow connect to the security
db remotely without having to know its location?
Regards,
Peter Lee
Helen Borrie wrote:
>At 01:37 PM 27/08/2005 +1000, you wrote:--
>
>
>>Hello,
>>
>>As I understand the TIB_Connection.Users property tells us who is logged
>>into the current database... just wondering if it is possible to get a
>>list of users that are present on the server that you are connected to,
>>
>>
>
>No. Only the SYSDBA, in server-wide context, would be privy to enough
>information to retrieve that.
>
>
>
>>without connecting to the security database?
>>
>>
>
>The connected users are not stored in the security database, which is used
>only for authentication. It is the server that stores the info about
>current connections, and it uses privileged structures in server memory to
>do so.
>
>You could write a two-step app for the SYSDBA, using a
>TIBOServerProperties, that first iterates through all of the databases on
>the server and then connects to each database in turn, reads the
>IB_Connection.Users property of that databases, and builds a list the users
>as it goes.
>
>For the list-building operation, which doesn't use the Services API, only a
>local connection at the server would return all of the attached users. A
>remote connection can only see the users logged on from its own node. I
>think this would rule out being able to get the full list for a Windows
>server that is running Classic, since you can't make a local connection to it.
>
>Helen
>
>
>
>
>
>___________________________________________________________________________
>IB Objects - direct, complete, custom connectivity to Firebird or InterBase
> without the need for BDE, ODBC or any other layer.
>___________________________________________________________________________
>http://www.ibobjects.com - your IBO community resource for Tech Info papers,
>keyword-searchable FAQ, community code contributions and more !
>Yahoo! Groups Links
>
>
>
>
>
>
>
>
>
>
Peter Lee ptle@...
-----------------------------------------------------------------------
Rising Software Australia Pty. Ltd. http://www.risingsoftware.com/
Publishers of 'Auralia' - Ear Training and 'Musition' - Theory Training
Ph: +61 3 9481 3320 FAX: +61 3 9481 3380 USA Freecall: 1 888 667 7839