Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_components thread: SQL Server database access through Java COM


Message #1 by =?iso-8859-1?Q?Fl=E1vio_Rodrigues_Maciel?= <flaviorm@p...> on Mon, 9 Sep 2002 18:51:19 -0300
Hi all,

I got a COM component developed in Java that access via JDBC a database. I
use it in an ASP application running on IIS/Windows 2000. The database
that's is accessed is configurable through the application.
The component connects to the SQL Server database, but when it tries to
retrieve data, an error is raised in the ASP page:

java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Error
setting up static cursor cache.

I found out that JDBC drivers create temporary files in the current dir.
However the current dir is always the system32 directory, probably because
the process which is actually executing is the dllhost.exe wich resides in
the system32.
If I give iusr_machinename write permission in system32, it works, but
that's unacceptable.
I tried in a second environment and everything worked fine. The temporary
file was created, even if the user doesn't have rights to write in the
system32. It seems that in this case the process that manages the connection
isn't running in the role of the web user who invoked it.

I can't understand why it works for the second case. Maybe there's some
configuration somewhere which says that "database data retrieval through COM
components should run with Administrator privileges", and that's set in the
second case and unset in the first. That's just to show the difference.
Maybe the second environment wasn't configured right, but I'm almost sure
it's.

The first environment is where the application should run and giving write
rights to the system32 folder even for an authenticated user isn't good.

Does anyone know how to workaround this, or have some tips?

PS: gee, I wrote too much

.
. Flávio Rodrigues Maciel
. flavio@i...
. +xx xxxx.5664
.
. Idea Tecnologia da Informação
. www.ideati.com.br
. +xx xxxx.4824
.
. Porto Alegre, RS
....


  Return to Index