Security context used for DBPROP_MULTIPLECONNECTIONS sessions

From: Laszlo Szentendrei (laszlos_at_netpro.com)
Date: 12/20/04


Date: 20 Dec 2004 12:16:19 -0800

We had tried to open a second rowset while an existing rowset was open
and had a problem (which is the subject of this message) which we
solved by closing the first before opening the second.

Still, we're perplexed about the original problem.

When DBPROP_MULTIPLECONNECTIONS was set to FALSE, the second would fail
as documented. This is understood.

When set to TRUE, we would get a database logon failure. It seems that
the session created for us did not use the credentials of the session
we had provided.

Our code does a LogonUser, impersonates the user using the token, then
opens the datasource under that security context. After reverting to
the original security context, all sessions we open through that
datasource successfully authenticate to the database. Implicit
connections fail. The security context under which the process is
running does not have rights to the database, so we're assuming that
the implicit connection is not using the credentials from the session.

Is this the correct behavior?

Note: When we run the process under a user that DOES have rights to
the database, the implicit connections succeed. Makes sense if the
session is being ignored and the current security context is being
used.

Thanks,
Laszlo



Relevant Pages


Loading