Quickly close database connections on the command line