Skip to main content

Database is in use error installing a Service Pack or Fix Pack


QAID # 20229 Published

Question / Problem:

What can cause following error when attempting to install a Service Pack or Fix Pack on the Kofax Capture server?

[4058] KdoLib: The database is in use. Please close the following applications or
services: Kofax.KfxDb.Dbms.MsSql.MsSqlException
at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo)
at System.Environment.get_StackTrace()
at NetInstallUtil.NetInstUtil.PrintExceptionToLog(String strType, Exception&
at NetInstallUtil.NetInstUtil.TryExclusiveDatabaseConnection()
at NetInstallUtil.NetInstUtil.Main()

How can I resolve this issue?

Answer / Solution:

This error can be caused by existing connections to the Kofax Capture database from Kofax Capture modules or services. Please note that installing a service pack or fix pack on the Kofax Capture server requires an exclusive connection to the Kofax Capture database.

To resolve this issue:

  1. Run the following SQL query to identify the machines and programs that currently have a connection to the Kofax Capture database:
    SELECT DISTINCT p.hostname, p.program_name
    FROM master.dbo.sysprocesses p
    JOIN master.dbo.sysdatabases d
        ON p.dbid = d.dbid
    WHERE = '<DB_NAME>' AND p.spid <> @@SPID
    ORDER BY p.hostname
  2. Go to those machines with database connection(s) listed from Step 1 and stop the service(s) or exit the program(s).
  3. Try installing Service Pack 1 again. If this error still occurs, proceed to Step 4.
  4. Back up the Kofax Capture database.
  5. Take the Kofax Capture database offline and bring it back online using SQL Management Studio.
  6. Install Service Pack 1.

Note: If the Standard database is used, please contact Kofax Technical Support.

Applies to: 

Product Version