MyDump Component problem / question
-
lucas.delphi
- Posts: 10
- Joined: Tue 08 Nov 2011 11:01
MyDump Component problem / question
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
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
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....
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....
-
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.
-
lucas.delphi
- Posts: 10
- Joined: Tue 08 Nov 2011 11:01
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.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.
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.
-
lucas.delphi
- Posts: 10
- Joined: Tue 08 Nov 2011 11:01
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
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
-
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.
-
lucas.delphi
- Posts: 10
- Joined: Tue 08 Nov 2011 11:01