views:

32

answers:

1

I am migrating an existing set of applications from Win XP to Win 7. We have a 3rd party application which is launched by and runs in the user’s session which accesses a local SQL Anywhere 9 database via ODBC (launched on demand using dbeng9). On the same machine we have an ASP.NET website which also accesses the local SQL Anywhere database via ODBC. These two applications play nicely together in Win XP because both processes are running in Session 0.

In Win 7 the ASP.NET site encounters an ODBC error stating that the specified database file is already in use. This is because the 3rd party app starts first and spins up an instance of dbeng9 (via ODBC) in the user’s session (usually Session 1). Then, the ASP.NET spins up and attempts to connect to the same database. The ODBC driver sees that an instance of dbeng9 is not running in the current session (Session 0) and attempts to spin up an instance at which time it is unable to access the database file because it is already in use by the logged on user in Session 1.

Does anyone have any suggestions for solving session isolation issues with local SQL Anywhere databases?

I thought about running dbeng9 as a service rather than allowing ODBC to spin up an instance on demand. However, because SQL Anywhere is bundled with the 3rd party product the PCs do not have dbsrv and I’m not sure how this would impact the licensing.

The ASP.NET site is only accessed from the local PC. Would running the ASP.NET site in a 3rd party web server cause it to execute in the user’s session? (Note: because this runs on 1,000 machines a free or very low cost option is a must.)

  • Is the ASP.NET Development Server that is bundled with Visual Studio redistributable in this manner?
  • Can IIS 7 or IIS 7 Express be configured to run in “local only” mode in which it executes in the user’s session?
+2  A: 

As long as you are running SQL Anywhere version 9.0.2.3420 or later, a database server running as a service should be visible via shared memory from clients running in any session on that machine.

If you are able to create a service using the dbsvc utility or Sybase Central, that would be your best bet. You'd have to talk to the third party vendor to see if this is allowed under your license.

Graeme Perrow