Thursday, June 30, 2011

Applying a delta in Progress

If you want to apply a delta to a Progress database, that is, a file that contains information to update objects of a Progress database in order to be equal to other Progress database's objects (like to a production database from a development one), then you could do this with mpro utility:

RHPRGPR1:/mnt0/new:> mpro /mydatabase/mydb.db









@@@@@@ @@@@@@ @@@@@@@ @@@@@ @@@@@@ @@@@@@@ @@@@@ @@@@@
@ @ @ @ @ @ @ @ @ @ @ @ @ @ @
@ @ @ @ @ @ @ @ @ @ @ @
@@@@@@ @@@@@@ @ @ @ @@@@ @@@@@@ @@@@@ @@@@@ @@@@@
@ @ @ @ @ @ @ @ @ @ @ @
@ @ @ @ @ @ @ @ @ @ @ @ @ @
@ @ @ @@@@@@@ @@@@@ @ @ @@@@@@@ @@@@@ @@@@@

Progress Software Corporation
14 Oak Park
Bedford, Massachusetts 01730
781-280-4000

PROGRESS is a registered trademark of Progress Software Corporation
Copyright 1984-2004
by Progress Software Corporation
All Rights Reserved

After this screen you will be prompted for an user and password; you have to login with an user with enough privileges:

PROGRESS Version 9.1E as of Tue Oct 12 14:40:19 EDT 2004

┌─────────────────── Login ───────────────────┐
│ │
│ Please enter a User Id and Password for │
│ database: mydb │
│ │
│ User Id: DBAUSER │
│ Password: │
│ │
│ (OK) (Cancel) │
└─────────────────────────────────────────────┘












Enter data or press F4 to end.

Then in the next screen you have to press F3 and select the Tools menu, Data Dictionary option:

PROGRESS Version 9.1E as of Tue Oct 12 14:40:19 EDT 2004
File Edit Search Buffer Compile Tools Help
────────────────────────────────┌──────────────────────┐────────────────────────
│ Data Dictionary │
│ OS Shell │
│ Application Compiler │
└──────────────────────┘














─ File: Untitled:1 ─────────────────────────────────────────────────────────────


F1=RUN F3=MENUS F5=OPEN F6=SAVE F8=CLOSE Insert

The next screen will be the Data Dictionary tool:

Database Schema Admin DataServer Utilities PRO/SQL Tools





┌──────────── Welcome to the PROGRESS Data Dictionary ─────────────┐
│ │
│ You may use these facilities to set up or alter the structure of │
│ your database(s) or to perform various administrative functions. │
│ │
└──────────────────────────────────────────────────────────────────┘







Main Menu Data Dictionary
Database: mydb (PROGRESS) Table:

In the Data Dictionary screen you have to select the Admin menu, Load Data and Definitions submenu, Data Definitions (.df file) option:

Database Schema Admin DataServer Utilities PRO/SQL Tools
┌────────────────────────────────────────┐
│ Dump Data and Definitions -> │
│ Load Data and Definitions -> │
│ ┌─────────────────────────────────┐ │
│ │ Data Definitions (.df file)... │ │
┌─────────│ │ Table Contents (.d file)... │ │y ─────────────┐
│ │ │ SQL Views... │... │ │
│ You may └─│ User Table Contents... │────┘e structure of │
│ your datab│ Sequences Current Values... │strative functions. │
│ │ Reconstruct Bad Load Records... │ │
└───────────└─────────────────────────────────┘────────────────────┘







Main Menu Data Dictionary
Database: mydb (PROGRESS) Table:

In order to apply a delta file the database must not be locked by any user, but if so you will get an error message like this:

Database Schema Admin DataServer Utilities PRO/SQL Tools


















Data Definitions (.df file) Data Dictionary
Database: mydb (PROGRESS) Table:


Database in use by SOMEUSER on w1c3xpr3. Wait or press CTRL-C to stop. (388)

If you have to apply this delta and you can safely restart your database or kill the users locking the database then do that, preferably in other terminal; if there are no users locking the database then you will get a screen where you have to select the delta file and a lot of other options that you can keep unchanged.

Finally, after selecting OK, if again there are no users locking the database the delta will be applied very fast and you will go back to the Data Dictionary menu.

No comments:

Post a Comment