"Error updating options: Query error: 400 Bad Request" after upgrade to 8.x

  • What Grafana version and what operating system are you using?
    → Grafana 8.0.1 on Windows Server

  • What are you trying to achieve?
    → Update system from 7.5.4 to 8.0.1

  • How are you trying to achieve it?
    → Update based on Upgrade Grafana | Grafana Labs

  • What happened?
    → MSSQL based Dashboard shows error
    → Dashboard variables can’t be initialized
    ("Error updating options: Query error: 400 Bad Request)
    → variable query looks like "select distinct project from work_items_pr ]

  • What did you expect to happen?
    → no error like in version 7.5.4

  • Can you copy/paste the configuration(s) that you are having problems with?
    ???

  • Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were.
    → yes: “Error updating options: Query error: 400 Bad Request”

  • Did you follow any online instructions? If so, what is the URL?
    ???

I localized the root cause for this behavior with version 8.x:

By setting Min time interval to default value the dashboards are again

1 Like

hi @pecs,

Glad you got this working. There are several patches that were released in 8.0.1 and 8.0.2 that dealt with SQL issues. If this returns, I’d try upgrading and testing again.