Incorrect Syntax Near AT While Running Insights Admin Tool 

How to handle when there is incorrect syntax near 'AT' while running Insights admin tool ?

While running Insights admin tool, it was giving "Error Failed to setup RobotLogs table" error.

If fiddler is enabled, "it is giving incorrect syntax 'AT'" SQL error in the RobotLogs query. This error appears for Insights version 2019 & 2020.4 version with SQL version 2012 as it does not recognize "At Timezone" syntax. This syntax is not supported with the specific version of SQL.

  • This issue can be fixed by copying the SQL query(RobotLogsImportQuerySql2014, JobsImportQuerySql2014, QueueItemsImportQuerySql2014 ) from the Insightsadmintool.exe.config file of the latest version of Insights and replacing them in Insights admin tool.exe.config of older version of Insights.
  • Once the changes are saved, it shall be possible to run Insights admin tool to enable Insights at tenant level.