Skip to Main Content
IBM Power Ideas Portal


This portal is to open public enhancement requests against IBM Power Systems products, including IBM i. To view all of your ideas submitted to IBM, create and manage groups of Ideas, or create an idea explicitly set to be either visible by all (public) or visible only to you and IBM (private), use the IBM Unified Ideas Portal (https://ideas.ibm.com).


Shape the future of IBM!

We invite you to shape the future of IBM, including product roadmaps, by submitting ideas that matter to you the most. Here's how it works:

Search existing ideas

Start by searching and reviewing ideas and requests to enhance a product or service. Take a look at ideas others have posted, and add a comment, vote, or subscribe to updates on them if they matter to you. If you can't find what you are looking for,

Post your ideas
  1. Post an idea.

  2. Get feedback from the IBM team and other customers to refine your idea.

  3. Follow the idea through the IBM Ideas process.


Specific links you will want to bookmark for future use

Welcome to the IBM Ideas Portal (https://www.ibm.com/ideas) - Use this site to find out additional information and details about the IBM Ideas process and statuses.

IBM Unified Ideas Portal (https://ideas.ibm.com) - Use this site to view all of your ideas, create new ideas for any IBM product, or search for ideas across all of IBM.

ideasibm@us.ibm.com - Use this email to suggest enhancements to the Ideas process or request help from IBM for submitting your Ideas.

Status Delivered
Workspace IBM i
Categories Db2 for i
Created by Guest
Created on Sep 8, 2017

Allow Replace Table functionality for Temporal Tables

It would be really great to be able to use the "Create or Replace Table" with Temporal/History tables. In order to modify these tables once in production, we'll need to maintain a list of alter statements to support any changes to be applied to these table. It would be a great time saver to have IBM figure out the needed alter statements based on changes to the table source member.


Use Case:

We want to begin using temporal/history tables for many of our new tables. This capability is a great addition to Db2 for i. Having to maintain separate source files 1) for initial table layout and 2) for any table changes is messy.


Idea priority High
  • Guest
    Reply
    |
    Sep 19, 2017

    Attachment (Description): Error message received after adding field.

  • Guest
    Reply
    |
    Sep 19, 2017

    Attachment (Description): Temporal table after adding new field

  • Guest
    Reply
    |
    Sep 19, 2017

    I have an sql temporal (TMPTST2) and history table (TMPTST2HST) that I created in library ITGF (see attachments). The source for the temporal table uses "Create or Replace Table". I add a field to TMPTST2 (newfld1). I used the following statement to run sql TMPTST2 (with new field) : RUNSQLSTM SRCFILE(TOTTO/QSQLSRC) SRCMBR(TMPTST2) COMMIT(*NONE) DFTRDBCOL(ITGF). Based on your statements, I would expect the new field to be updated to the temporal and the history table. Instead I get the SQ20525 error with reason code 21 (see attachments). Am I doing this incorrectly? If so, what should I be doing differently? I wasn't able to attach all files. I'll try to add them separately from this update.

  • Guest
    Reply
    |
    Sep 19, 2017

    Attachment (Description): History table sql.

  • Guest
    Reply
    |
    Sep 19, 2017

    Attachment (Description): Temporal table as originally created.

  • Guest
    Reply
    |
    Sep 9, 2017

    Hi, did you know that Db2 for i automatically maintains the history table when you ALTER TABLE ADD COLUMN or ALTER COLUMN (to widen) or ALTER TABLE ADD PARTITION? In fact, you can use CREATE OR REPLACE TABLE as your means of making such changes to the system temporal table. The exception is when you make a change that could involve data loss. In those scenarios, we require that you temporarily drop versioning and make the change(s) to both tables. However, you could still use CREATE OR REPLACE TABLE to make those changes.
    Regards, Scott