Enabling Logging and Recovery for existing Datacom application database tables
book
Article ID: 18741
calendar_today
Updated On:
Products
DatacomDatacom/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.
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 /*
Take a preliminary DBUTLTY BACKUP of the entire database so that you can fallback if needed.
Use DBUTLTY to EXTRACT all tables that need to be changed.
Use DBUTLTY to BACKUP the rest of the database without these tables:
If all areas are single-table areas, use BACKUP at the database level and exclude the tables extracted in Step 3, above.
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.
If in doubt, you can EXTRACT every table in the database and then MASSADD them all later.
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:
When done with all table changes, catalog the PROD version database to the CXX.
Init the index (IXX) and any data areas with changed tables.
Use DBUTLTY to LOAD the database backup(s) taken in step 4, above, using FORMAT=BACKUP.
Use DBUTLTY to load the data back into the tables that were altered:
If single-table areas, then LOAD the data for each table using FORMAT=EXTRACT, using the files created with EXTRACT in step 3, above.
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.
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.