Dont open connection unless database is enabled