we have webinterface to manage our different client installations and also copy over whole databases via the dbbackup command.
The serverside is all written in java (And vaadin) Sometimes we have very lengthy backup processes (500MB databases over 20MBit/sec Lines) and wish to show a progres bar.
Is there a way to use dbtools from java to get some sort of progress informations ? (As on the commandline of dbbackup for example)
Or is there another way to make backups across the wire and show some progress?
asked 14 Feb '12, 12:15
As DBTools is a C-based API, I guess a usage from Java will require some kind of JNI interface or the like - can't tell more, haven't done that...
Another approach with a looser coupling might be to make use of the MESSAGE statement to pass messages to other connections. ODBC apps can process such messages by using a particular callback - that works well IMHO. SA 11 JDBC clients seems to be able to read them as well, but I don't have a sample at hands.
The basic idea would be to
So the DBTools DLL could "send" the progress messages of the backup to the JDBC connection.
Apparently, one could also make the DBTools API DLL to write messages to a file or send them via some IPC mechanism, and make the JDBC app read them...
The PROGRESS connection property can give you this information. This property was introduced in version 12.0.0.
FWIW: In order to get such messages, the according progress_messages database option must have been set to Raw or Formatted.