Is there a way to track the execution of an ALTER DATABASE SCHEMA FROM FILE command?
We were wondering if we could follow the progress of a database schema update, to alert the user about how much he should wait until the execution is completed.
Ps: We are targeting the iPhone and Android devices.
asked 31 Jan '12, 11:19
I'm afraid the answer is currently no. And it is true that altering columns or creating indexes can take some time when there are a lot of rows.
I suggest you synchronize any pending changes first, then request users patiently wait for the update to complete (possibly ensuring there is enough power available). Unlike a synchronization/network operation, while the alter-database request is active, you can be sure that work is progressing. Given that, it seems appropriate that the UI thread display some kind of "yes, I'm still alive and working" indication.
answered 31 Jan '12, 18:01
Create a stand-in screen or page (depending on whether the system is client-server or http-saas) which tells the user how long the system will be down. In our c-s systems we swap the real main executable with a stand-in executable that displays, for instance, "System down for maintenance and will return at 1200 Pacific." The stand-in executable reads a text file which we can edit to change the time and certain other information. In one of our systems, the database update DDL is contained in a text file. In another system, the DDL is in-line, with product code. I'm not sure how you might give the user an actual real-time, accurate status on the update. The database update process might maintain a field in the database which would contain a progress number and would be read periodically by the stand-in page or executable. I've found that users are satisfied just knowing approximately when their system will be available again.
answered 04 Feb '12, 10:06