Page 1 of 1

TUniDump: views order creation

Posted: Thu 23 Feb 2017 14:00
by alexdmatveev
Hello collegues,

we have a MySQL database with some views.

I get nice dump after I call:

Code: Select all

FDump.BackupToFile(filename);
Some days before we changed views structure and now I execute the same procedure to create a dump file.

And now I have an interesting problem with views creation order.

We have next views (alphabetical order):

Code: Select all

geraete_full_short
geraete2geraete_view
geraetecounter
grorder
lt32_typen
masteradd
typen_klassen
Problem is geraetecounter view selects some data from geraete_full_short.
So geraetecounter must be create after geraete_full_short.

TUniDump provides me dump file with views creation order as below:

Code: Select all

geraete2geraete_view
geraetecounter
geraete_full_short
grorder
lt32_typen
masteradd
typen_klassen
So we have a problem to load this dump file back to a database.

What should we do?


Thanks.

PS:
mysqldump.exe creates file with correct order.
SQLYog creates file with correct order.

Re: TUniDump: views order creation

Posted: Fri 24 Feb 2017 08:56
by ViktorV
You can use the TUniDump.TableNames property to specify the concrete tables and views for backup. The tables and views will be backup in the order in which they are listed in this property.

Re: TUniDump: views order creation

Posted: Fri 24 Feb 2017 09:26
by alexdmatveev
Hello,

thanks for the answer.

In my case it is so:

we have database administrators and developers. It would be good if developers can be independent from DBA actions.

Why should developers know about dependencies between views?
They ONLY want to make dump of the database with correct documented API provided by Unidac.

It is quite possible with other tools.
Maybe have we any workaround here with perfect Unidac?

Thanks.

Re: TUniDump: views order creation

Posted: Fri 24 Feb 2017 12:05
by ViktorV
UniDAC backups tables and views in the sequence corresponding to their order in the query result to the system tables of MySQL server.
If you want us to change this behavior, please write about it on our User Voice forum: https://devart.uservoice.com/forums/104 ... 939-unidac. If your proposal gains enough votes we will consider a possibility of its change.

Re: TUniDump: views order creation

Posted: Fri 24 Feb 2017 14:23
by alexdmatveev
ok, it is clear.

Thanks a lot for support.

We have realized it using mysqldump.exe and mysql.exe.

Re: TUniDump: views order creation

Posted: Mon 27 Feb 2017 12:12
by ViktorV
Thank you for your interest to our product.
If you have any questions during using our products, please don't hesitate to contact us - and we will try to help you solve them.