DB2 ESE 8.2.3 (FP10) for Linux
Redhat AS 3.0 2.4 kernel
During testing of an HADR pair, we crash the primary server and perform
takeover by force on the standby server. This works fine.
When we bring the original primary server backup, and try to start it as
standby and activate it, we get:
---------------------------------------------------------------
SQL1391N The database is already in use by another instance.
Explanation: The request failed because the database is in use by another
instance of the database manager (a database may only be used by one
instance.) This may be caused by attempting to access a database located on
a mounted file system accessible to another instance located on another
machine. This can also occur if you have an open connection (via SNA) to a
database and the database manager was brought down abnormally.
User Response:
-Validate that you are using the correct database and ensure no other
instance uses this database.
- If the database manager was brought down abnormally, and you have a
command line processor connection to it, perform a db2 terminate to close
the offending open connection before attempting to connect again.
---------------------------------------------------------------
The original connections are java applications from a remote blade tier, so
we cannot terminate them. The solution is to delete file SQLINSLK in the
database directory, which is used to make sure that two instances are not
using the same database. The contents of file SQLINSLK are the instance name
and 5 hex bytes that translate to digits in decimal which I cannot figure
out.
Of course, we are not using a shared disk cluster that allow 2 different
instances to access the same database since HADR databases each have their
own disk mount points (although the mount point "names" known to the DB2 are
the same to ensure proper replication of DDL via HADR).
Our databases and instance directories are mounted on NAS (from NetApps).
Has anyone had this problem before, and is it somehow more likely to occur
on a NAS mounted file system than other mounted file systems?