Is there any way to create an incremental df from commandlin

Posted by Admin on 24-Nov-2011 05:28

Hi,

I am looking for a way to automatically update the structure of a DB for an upgrade.

I will have a master copy of the DB. I want to connect to master copy and the upgrade DB, create an incremental df file, upload the increment df to the DB to be upgraded without any user input?

The sticking point is the creation of the incremental df file.

Is there any way this can be done?

thanks,

Craig

All Replies

Posted by asthomas on 24-Nov-2011 05:45

I would take a look at Gilles Queret's PCT Ant extensions for Progress.

http://pct.rssw.eu/

This has a task called "PCTDumpIncremental" which can be used to do what you want.

Regards / Med Venlig Hilsen 

Thomas Hansen

Director

Posted by Admin on 24-Nov-2011 05:48

Thanks. I will take a look at that.

Posted by jmls on 24-Nov-2011 05:50

using standard code (the dictionary) it would be difficult if fields

were removed and added to a table - the incremental .df generator

would not know if a field was added or just renamed. That's why it

asks you.

It would be better for each db to contain a checksum (crc / md5) code,

and have a incremental .df for each master checksum pair

After all, you won't have that many different databases schemas, will you ?

loading a .df automatically is easy - what the difficult part is

working out the delta .df .

Julian

On 24 November 2011 11:29, Craig Roberts

Posted by Admin on 24-Nov-2011 06:14

Hi Julian,

I was thinking more towards inhouse upgrades of test and demo kit. There are a good few demo, testing machines that have different development versions on them. I was just looking for a way of upgrading to a current release version without having to connect to each to create a df .  These machines will alway be out of sync with a live release as people will want to see new developments before a full release is complete.

Live versions will always have a incremental df  master checksum pair.

Craig

Posted by Tim Kuehn on 24-Nov-2011 08:34

Here's something I got from somewhere...

#!/bin/sh
# Environment Variables:
#    DUMP_INC_DFFILE          : name of file to dump to
#    DUMP_INC_CODEPAGE        : output codepage
#    DUMP_INC_INDEXMODE       : index-mode for newly created indexes
#                               allowed values are: "active", "inactive"
#    DUMP_INC_RENAMEFILE      : name of the file with rename definitions
#    DUMP_INC_DEBUG           : debug-level: 0 = debug off (only errors
#                                                and important warnings)
#                                            1 = all the above plus all warnings
#                                            2 = all the above plus config info

BASE_DIR=`pwd`

DUMP_INC_DFFILE=$BASE_DIR/$1-delta.df
DUMP_INC_CODEPAGE=iso8859-1
DUMP_INC_INDEXMODE=active
#DUMP_INC_RENAMEFILE=$BASE_DIR/$1-master.rf
DUMP_INC_RENAMEFILE=""
DUMP_INC_DEBUG=2

export  DUMP_INC_DFFILE         \
        DUMP_INC_CODEPAGE       \
        DUMP_INC_INDEXMODE      \
        DUMP_INC_RENAMEFILE     \
        DUMP_INC_DEBUG

rm -f incrdump.e    2> /dev/null

$DLC/bin/_progres -b    -db /db/$1/$1                               \
                        -db $1 -H iron -S $1 -RO -ld i$1            \
                        -p prodict/dump_inc.p > $BASE_DIR/$1-dump_inc.log

mv incrdump.e $1-incrdump.e 2> /dev/null

Posted by aszameitat on 05-Dec-2011 09:35

I do it using the following code:

rem /*------------------------------------------------------------------------*/
rem /* Abgleich der aktuellen DB mit der leeren DB -> pafix.df                */
rem /*------------------------------------------------------------------------*/

set DUMP_INC_DFFILE=%AnlegePfad%\pafix.df
set DUMP_INC_CODEPAGE=1252
set DUMP_INC_INDEXMODE=active
set DUMP_INC_DEBUG=0

%DLC%\bin\prowin32.exe -b -db %fix-DB-prod% -ld old -db %fix-DB% -1 -ld new -p prodict/dump_inc.p  >> ".\dump_inc.tmp"

This thread is closed