Exiting the VM isn't really an option for me anyway, this is just when
someone is closing the database, potentially planning to open another
one.
Another question along the same lines then - if I kick off the
shutdown in another thread, what happens if the same database is then
reopened while the shutdown is still occurring?
It sounds like users are routinely arriving, doing work,
and disconnecting, causing the database to be opened and closed.
Have you considered using a connection pool in between your
application layer and the database, so that the connections
are retained and re-used, rather than being fully reclaimed
and fully reopened?
thanks,
bryan