Subject Re: [IBO] Database Login Detail
Author innoy1k
Hi Helen,

Is this what you mean on the IBO's "two-layer" login:

1) the application connects to the database using SYSDBA
2) afterconnect, set FRED1 to IB_Connection.LoginUserName, and so on
for FRED2, FRED3, and create record for each user in a log table.

Questions: Would I able to extract all this user names from the list
of aDatabase.Users without using a database log table? Using a log
table is not reliable to catch current login if the application was
shut down unexpectly.

thanks & regards,

--- In, Helen Borrie <helebor@t...> wrote:
> At 03:55 AM 24/10/2005 +0000, you wrote:
> >Hi there,
> >
> >Our Delphi application uses one login name (e.g.: SYSDBA) and
> >to the Database connection, but this would not tell us who/which
> >computer is running the application when there is more than one
> >
> >Is there a property in IBObject that allows us to keep track
> >the logged in computer name
> No. It's not supported by the database engine.
> >or user name
> Yes, but if everyone logs in as SYSDBA, this isn't any use to you.
> database engine doesn't know about OS usernames.
> >or otherwise provides distinguishing information we may use thus.
> You could set up your own database-level login log and store
whatever you like.
> You could look into IBO's "two-layer" login to help with this.
This allows
> you to prepend a prefix to the user name and role at the client.
If you
> decided to do (1) you could assign each user a "signature" prefix
that you
> would write to your log table at each login. See the IB_Connection
> properties LoginUsername, LoginUsernamePrefix, LoginSQLRole and
> LoginSQLRolePrefix. Use the AfterConnect even to do this logging
and make
> *certain* that you hard-commit immediately after inserting to the
> Helen