Code to load .df/.d

cluc

New Member
Hi All,

This could more be a database question, but it seems to fit in the code section more. Well to me anyways... :)

Now, every time I have a new version of our software, sometimes the progress database requires to be upgraded, in doing so I perform the following steps:

1) Create an Empty DB, load the new .df into the DB via Data Admin
2) Connect to client's existing DB and perform an Incremental dump.
3) Load the incremental dump into the Clients DB, so the schema definitions are the same as the current version of our software.

As we all can see this could be time consuming, opening up the Data Admin, creating and then loading, etc.

Is there a better was in Procedure editor, where I can create a script to run all that?

Sometimes I require to load new records in, so I have to go back into the procedure editor, type in DELETE FROM <TABLENAME>, then go back into data admin, to load the new .d file.


As this is very time consuming and inefficient, I have been trying to ask other developers for some ideas, but none really have any ideas.

If anyone has come across a better idea, please share.

Thanks
Calvin.
 
you can and probably should have an automated install process.

though it will need to handle exceptions, and a backup is a must etc.


just some of the things that can be automated -

silent install client, server etc.

create a new database or update schema

install and compile proc's ( with or without a dev license ) etc.


like everything else start simple

and evolve as you go along. hth
 
cluc said:
Is there a better was in Procedure editor, where I can create a script to run all that?

You can use Progress' own routines (eg. in prodict) to do various admin stuff.

If you are on 9.1<something> (can't remember exact version), you can use SESSION:EXECUTION-LOG parameter to trace the calls made by (say) Appbuilder/DataAdmin during (say) Dump DF.

See ProSPY+ for example usage.

[Top Debug Tool Tip Alert]
If you are on XP also, use the Freeware tool TailXP to see the calls made in real-time.

HTH
 
Hi,

Like joey and Lee already stated: Progress has the utility's to automate this.
You can update schema with a runtime license if you connect the database in single user mode (-1) with the -rx parameter.
(e.g.: prodict/load_df.p(session:parameter) to load df file --> session:parameter).

Remember:
  • Backup the database
  • Turn off AI
  • Rebuild the indexes
  • Use xcoded source to make dynamic progress procedures to delete, update data (you can compile xcoded source code with run time license)
  • Test the procedure(s)
  • Think of good logging/error handling
  • Test the procedures
HTH,

Casper.
 
Cheers everyone.

Just a quick question, where would I be able to find intstructions on how these are used, i.e. prodict/load_df.p.
I was able to load, dump, but to create an incremental... I have no idea. As I have used ProSpy, but there was not much information there as most are through the interface.

Thanks again.
calvin
 
cluc said:
Just a quick question, where would I be able to find intstructions on how these are used, i.e. prodict/load_df.p.
I'm not aware of any documentation apart from a couple of Knowledgebase entries. Your best bet is to follow the code, and experiment on a development database.

When examining Progress own code, I use Chris Peacock's Progress File Manager, which is very useful for pre-V9 stuff.

http://freespace.virgin.net/chris.peacock/software/progressfile.htm

cluc said:
As I have used ProSpy, but there was not much information there as most are through the interface.
Not ProSpy, ProSpy+ which is an enhanced version.

You will need 9.1D05 at a minimum.

If you are on at least 9.1D01, you can use the ClientLog parameter instead.
 
Hi,

I was able to load, dump, but to create an incremental... I have no idea

I assume you have all client versions also in your office. So just make a copy of the client database, make the db changes in that copy and make an incremental df with the data administration. You can only make a incremental df if you're connected to both new and old version database. _dmpincr.p makes the incremental df file, but I never used it. I make incremental df files through the data administration.

HTH,

Casper.
 
Back
Top