Option control and sql updates

Added opt-out option for error reports and further updates to make the
sql switch complete