HeidiSQL / HeidiSQL

A lightweight client for managing MariaDB, MySQL, SQL Server, PostgreSQL, SQLite, Interbase and Firebird, written in Delphi
https://www.heidisql.com/
GNU General Public License v2.0
4.81k stars 458 forks source link

Make Maintenance dialog compatible to MSSQL #18

Open JasonUnger opened 6 years ago

JasonUnger commented 6 years ago

Expected behavior

Successful maintenance

Current behavior

Errors marked in Maintenance window, and in log.

Failure information (for bugs)

Steps to reproduce

  1. Right click database
  2. Click Maintenance
  3. Select anything from drop down
  4. Click Execute

Context

Failure Logs

CHECK TABLE "DiasetTags"."dbo"."Histories"; / SQL Error (156): Incorrect syntax near the keyword 'CHECK'. / CHECK TABLE "DiasetTags"."dbo"."Parts"; / SQL Error (156): Incorrect syntax near the keyword 'CHECK'. / CHECK TABLE "DiasetTags"."dbo"."Settings"; / SQL Error (156): Incorrect syntax near the keyword 'CHECK'. / CHECK TABLE "DiasetTags"."dbo"."MigrationHistory"; / SQL Error (156): Incorrect syntax near the keyword 'CHECK'. / ANALYZE TABLE "DiasetTags"."dbo"."Histories"; / SQL Error (156): Incorrect syntax near the keyword 'TABLE'. / ANALYZE TABLE "DiasetTags"."dbo"."Parts"; / SQL Error (156): Incorrect syntax near the keyword 'TABLE'. / ANALYZE TABLE "DiasetTags"."dbo"."Settings"; / SQL Error (156): Incorrect syntax near the keyword 'TABLE'. / ANALYZE TABLE "DiasetTags"."dbo"."MigrationHistory"; / SQL Error (156): Incorrect syntax near the keyword 'TABLE'. / REPAIR TABLE "DiasetTags"."dbo"."Histories"; / SQL Error (156): Incorrect syntax near the keyword 'TABLE'. / REPAIR TABLE "DiasetTags"."dbo"."Parts"; / SQL Error (156): Incorrect syntax near the keyword 'TABLE'. / REPAIR TABLE "DiasetTags"."dbo"."Settings"; / SQL Error (156): Incorrect syntax near the keyword 'TABLE'. / REPAIR TABLE "DiasetTags"."dbo"."__MigrationHistory"; / SQL Error (156): Incorrect syntax near the keyword 'TABLE'. /

ansgarbecker commented 6 years ago

Similar to issue #17.

Are there even some equivalent commands to MySQL/MariaDB's CHECK and/or OPTIMIZE syntax?

A (probably too) simple solution is to disable the maintenance dialog for MSSQL (and PostgreSQL).

ansgarbecker commented 6 years ago

Is there anything like that check, analyze or repair command in MSSQL? The dialog is one of the places which has pure MySQL compatibility only.