Unsupported Screen Size: The viewport size is too small for the theme to render properly.

Import From Sql Statement Fails

forums forums SQLyog Using SQLyog Import From Sql Statement Fails

  • This topic is empty.
Viewing 3 reply threads
  • Author
    Posts
    • #9656
      Charlie
      Member

      Hi,

      I've generated SQL statements by using SQLyog Enterprise v5.02 with the wizard:

      Scheduled Backups

      after that I wanted to:

      Import from sql statement

      but I've got that error:

      Query:

      DROP TRIGGER `InsertHAENowDate`

      Error occured at:2006-04-30 18:52:28

      Line no.:8582

      Error Code: 1360 – Trigger does not exist

      and that's right because, when I'm doing an

      Import from sql statement

      the Trigger doesn't exist.

      What can I do, that this script will work?

      Or do I have to make cahnges, when I'm doing the:

      Scheduled Backups

      ?

      br

      Charlie

    • #21482
      peterlaursen
      Participant

      1)

      Well you can open the SQL in a text editor and delete the statement

      *DROP TRIGGER `InsertHAENowDate`*

      Please search if this trigger is reffered to somewhere else in the script too!

      But hold it for 15 minutes. More info coming!

    • #21483
      peterlaursen
      Participant

      1)

      The problem is that there is no 'drop TRIGGER if exists' available with MySQL trigger syntax!

      Please try 5.12 beta3 !

      http://www.webyog.com/betas/SQLyog512Ent.exe

      (be aware that it migrates your 'Personal' folder to a 'favorites' folder if you 'install over'. If you do not want that then just install to another folder).

      The 'export' tool here has implemented an option to select/deselect 'drop trigger' statment. This seems to be forgotten in the 'backup' powertool. See attached pics. 'drop trigger' is written to the file if 'create trigger is' selected.

      To use the 'include drop trigger' with the export tool:

      If you restore to an empty database you must deselect it.

      To restore into a database where that trigger exists you must select it.

      And if situation changed in between you'll have to edit the file! As 'if exists' is not available we have to chance to 'automate' it.

      This should answer what you can do!

      2)

      To understand why this happened we will need more information about the server!

      What server version? Is current version installed over a previous version?

      If yes did you run all update scripts as specifed in the MySQL documentation.

      Now is the database from where you made the backup still available? If yes then what does:

      SELECT * from information_schema.TRIGGERS;

      or

      SELECT * from information_schema.TRIGGERS where TRIGGER_NAME = 'InsertHAENowDate';

      return?

      The backup tool does not 'invent' triggers. There must (have) been some trace of it in the system!

      3)

      I also just reported a bug with backup of triggers here myself:

      http://www.webyog.com/forums/index.php?sho…view=getnewpost

      4)

      You are sure that this trigger was not there when you made the backup ?!

      that would be the simple explanation!


      @Ritesh
      :

      any way to ensure that the execution of the script does not stop here (with error 1360), but goes on with next statement?

    • #21484
      peterlaursen
      Participant
Viewing 3 reply threads
  • You must be logged in to reply to this topic.