Adding basic support for switching the database into single user mode, while this may not be the most efficient approach it works for the intended purposes