Enabling Logging and Recovery for existing Datacom application database tables
search cancel

Enabling Logging and Recovery for existing Datacom application database tables

book

Article ID: 18741

calendar_today

Updated On:

Products

Datacom Datacom/DB

Issue/Introduction

What are the steps to enable logging and recovery functions for existing tables that have never used them?

Environment

 

 

Resolution

To turn on logging and recovery for application database tables, there are several steps involved. The process is complicated somewhat by having multi-table areas versus single table areas. Both will be covered in this document.

  1. Close all URTs in CICS or other applications, close the database in the Multi-User Facility (called MUF), and turn off ACCESS, so that you have exclusive control. Here is a sample of the DBUTLTY input:
    //SYSIN DD * 
    ACCESS DBID=143,STATUS=OFF,USERS=FAIL
    CLOSE DBID=143
    /*
  2. Take a preliminary DBUTLTY BACKUP of the entire database so that you can fallback if needed.
  3. Use DBUTLTY to EXTRACT all tables that need to be changed.
  4. Use DBUTLTY to BACKUP the rest of the database without these tables:
    1. If all areas are single-table areas, use BACKUP at the database level and exclude the tables extracted in Step 3, above.
    2. If any tables to be changed are in a multi-table area, it would be better to use BACKUP for each area, and then exclude the tables extracted in Step 3, above.
    3. If in doubt, you can EXTRACT every table in the database and then MASSADD them all later.
  5. Using DDUPDATE, change the logging/recovery attribute of the PROD version tables you want to change. Also note that any test version tables will need to be RESTORED or changed as well. Here is a sample of the DDUPDATE input for each table:
    //SYSIN DD * 
    +USR DATACOM-INSTALL,NEWUSER
    -UPD TABLE,xxxxxxx(PROD)
    1500 LOGGING,Y
    1500 RECOVERY,Y
    -END
    /*
  6. When done with all table changes, catalog the PROD version database to the CXX.
  7. Init the index (IXX) and any data areas with changed tables.
  8. Use DBUTLTY to LOAD the database backup(s) taken in step 4, above, using FORMAT=BACKUP.
  9. Use DBUTLTY to load the data back into the tables that were altered:
    1. If single-table areas, then LOAD the data for each table using FORMAT=EXTRACT, using the files created with EXTRACT in step 3, above.
    2. If multi-table areas, then first turn on access to the database using DBUTLTY:
      //SYSIN DD * 
      ACCESS DBID=143,STATUS=WRITE
      /*
      Then use MASSADD to reload the data for each of the tables in these areas using the files created with EXTRACT in step 3, above.
  10. If you have not already done so, turn on access to the database again using input like that in Step 9b, above.

Additional Information

For more information about the DBUTLTY ACCESS, CLOSE, BACKUP, EXTRACT, LOAD, MASSADD commands, please refer to the respective topic in the Datacom Utility Function Summary documentation. 

For more information about using DDUPDATE, please refer to the topic DDUPDATE - Updating Datadictionary in the documentation. 

As always, please contact Broadcom support for Datacom if you have further questions.