Base sql configs are in main
Set dbc and env to NULL to avoid double free