Only copy the session if the db is alive.