Page 1 of 1

MyDump Component problem / question

Posted: Wed 01 Feb 2012 22:46
by lucas.delphi
Hi guys,

I'm having some problem during the backup/restore routine of MyDump component.

The backup process occurs successfully, no errors, progress bar working fine, but during the process of restoring, I'm having the following error:

#42S02Table 'agricola_backup.v_veiculos' doesn't exist.

agricola_backup is my database name and v_veiculos is a view and not a table! Why the restore process sees a view as a table? Am I doing something wrong? What?

Thanks and regards!

Lucas

Posted: Thu 02 Feb 2012 09:24
by Justmade
I think your other views had select from this view v_veiculos and their name in sorting is earlier then v_veiculos (say v_aaa).

When backup, TMyDump backup on sorting order and generate script for v_aaa before v_veiculos.

When restore and restoring v_aaa, the create view statement cannot execute because v_veiculos does not exist, yet.

I had this problem before and as I was in a rush, I just rename my views and get rid of them and forget to report to Devart afterward....

Posted: Thu 02 Feb 2012 09:53
by AndreyZ
To solve this problem, you should set table and view names to the MyDump.TableNames property in correct order, so that table names are placed before view names. Also, in SDAC 5.80.0.47 , we improved work of TMyDump to make it backup tables before backup views. You can try using SDAC 5.80.0.47 or higher to check if the problem persists.

Posted: Thu 02 Feb 2012 10:23
by lucas.delphi
Thanks, I'll try setting table and view names in the component. Will report back as soon as I get a result.

Thanks for now.

Posted: Fri 03 Feb 2012 02:39
by Justmade
AndreyZ wrote:To solve this problem, you should set table and view names to the MyDump.TableNames property in correct order, so that table names are placed before view names. Also, in SDAC 5.80.0.47 , we improved work of TMyDump to make it backup tables before backup views. You can try using SDAC 5.80.0.47 or higher to check if the problem persists.
Actually, table is backup before view so will not create problem. The problem is a view selecting from another view which name is alphabetically larger then the selecting view, which had been backup after that current view and does not exist when restoring.

Specifying tablename is a workaround for smaller database, but not a good solution because when having hundreds of tables and frequent adding new tables, using tablename is very troublesome.

I understand that determine the view dependency before backup is too troublesome (though sqlyog can proceed the backup correctly based on dependency), but at least have a viewname field to let us specify only the views order but no need to care for the tables name is a much better solution.

Thank you.

Posted: Fri 03 Feb 2012 11:11
by lucas.delphi
Hi!

At first, thanks everybody for the answers. I tested the proposed solutions and the restore process worked fine! The problem was exacly what you said: create a view that makes call to another view that was not created yet! I've set the correct sequence in the TableNames property, everything ok!

This fits in the situation mentioned by JustMade. Tables created with names that doen't obey the correct creation sequence, in small programs like mine, this can be solved with no problems, but a bigger program can have a big head ake with this.

Unfortunelly, renaming all my tables, views and procedures now is impossible, I'll have to control this objects in another way, but thanks everybody for helping me with the solution!!

Thanks or "obrigado" from Brazil!

Lucas

Posted: Mon 06 Feb 2012 11:12
by AndreyZ
We have plans to improve the TMyDump component in the future and we will take into account all suggestions from our users about it. You can leave your suggestion at our UserVoice page ( http://devart.uservoice.com/forums/1046 ... components ) . Suggestions with many votes will be implemented faster.

Posted: Mon 06 Feb 2012 11:17
by lucas.delphi
Thanks AndreyZ, I'll leave the sugestion there!

And again thanks to everybody who helped this post! The moderator can leave the topic as closed!