1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

converting unix DB to windows DB

Discussion in 'Database Admin' started by selasi, Dec 28, 2010.

  1. selasi

    selasi New Member

    good day all.

    i would like to know how i can convert a progress database that was running o unix to windows. this has been caused by change of servers so initially it was running on unix server and now i want to put it on a windows platform, are there any special procedures hat i need to take

    and what is the best network emulation software that i can use for the purpose of networking?


  3. RealHeavyDude

    RealHeavyDude Well-Known Member

    The only supported way to move a Progress/OpenEdge database between operating systems is via dump & load. Dump & load works ascii as well as binary ( binary dump files are platform independent ). Simply copying the database to another machine with a different OS might seem to work ( for example Progress V9 from Windows to Linux ) as you might be able to start the database. But as the database is internally corrupted for the target OS you will suffer serious problems. Backups are not platform independent too ...

    Can't give you any advice on emulators though.

    Heavy Regards, RealHeavyDude.
  4. mjpowellesq

    mjpowellesq New Member

    Thats the joy of using Progress / OpenEdge - platform independant
    No problems at all, it is a simple process.
    The process is called dump & reload.
    Simply dump data & definitions from 1 format, and reload on the other.
    good look. BFN
  5. vikaetta

    vikaetta New Member

    The Dump/Load provided by progress works, but what happens when the dump/load facility does not work due to the usage of pointers on a no. of tables. As such, dump/load procedures need to be written to cater for these tables.

    Anyone with procedure to do this process.
  6. TomBascom

    TomBascom Curmudgeon

    Are you saying that the application uses RECIDs as fields in db records?

    That is a very bad idea.

    The best cure is to fix the code to no linger do that.

    Otherwise you need to write a program which will re-create the RECIDs using some other key. There is no generic way to do that -- it is specific to the application in question.
  7. vikaetta

    vikaetta New Member

    yes they do have RECIDs, its on some old application and we need to move database from UNIX to Windows.

    Have been advised earlier that dump/load procedures need to be written to cater for these tables ( those with RECID's)

    but have no clue how the procedure woule be like for dump/load as am used to the default Progress gives.
  8. RealHeavyDude

    RealHeavyDude Well-Known Member

    The RECID is the physical position of the record - it contains the physical address of the database block in which the record is stored and the position within that database block. There is no way a program could control the RECID a record that is newly created will get in the database. That means that, when loaded into another database, each record will get a new - different - RECID rendering the dumped RECIDs useless.

    In order to have the correct RECID stored you need to identify the new RECID of the record to which the RECID pointed in the old database. You could do something like this:

    Scenario: The RECIDs stored in one database field of one table A point to a record in database table B, table B has a unique key.

    • You need to create an export of table B that contains the pair of the unique key and the RECID for each record.
    • After the load you need to find the RECID that is stored in table A in the manually created file, get the unique key, and, with that unique key find the record in table B in the new database - there you have the correct RECID. All you have to do is to store that RECID in table A.
    Heavy Regards, RealHeavyDude.
  9. vinod_home

    vinod_home Member

    Or in the current database, add a tmp_recid field to all tables and store the recid within it. Once you dump/load, use that field to fix all the links and remove the field.

  10. vikaetta

    vikaetta New Member

    Seems possible but easier for a small database.

    anyone who can assist with code i can use to run for all tables at once? teh database has got more than 200 tables.

    would appreciate the help
  11. TomBascom

    TomBascom Curmudgeon

    You cannot generically code the suggestion above.

    At the very least it requires a new field to be added to every table that might be impacted.

    To determine what tables and fields you need to worry about run this:

    Code (progress):
    2. for each _field no-lock where _field._data-type = "recid":
    3.   find _file no-lock of _field.
    4.   if _file._hidden then next.  /* skip schema tables... */
    5.   display _file-name _field-name.
    6. end.
    For every field that the report identifies you will need to figure out how you plan to reconstruct the recid relationship.

    If you are lucky there aren't very many and there will be obvious alternative keys.

    An example of an obvious alternative key would be if the ORDER table has both a CUST-RECID and a CUST-NUM field. In a case like that you would:

    1) perform the dump & load normally

    2) repair the recids with something like this:

    Code (progress):
    2. for each order exclusive-lock:
    3.   find customer no-lock where customer.cust-num = order.cust-num no-error.
    4.   if available( customer ) then
    5.     order.cust-recid = recid( customer ).
    6. end.
    (The code above is light on error handling and is not terribly efficient for large tables... it is just an example.)

    More complex scenarios would require more complex solutions.
  12. vinod_home

    vinod_home Member

    Always backup your source database before you start changing anything.


Share This Page