Skip to Main Content
IBM Data and AI Ideas Portal for Customers


This portal is to open public enhancement requests against products and services offered by the IBM Data & AI organization. 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

Post ideas and requests to enhance a product or service. Take a look at ideas others have posted and upvote them if they matter to you,

  1. Post an idea

  2. Upvote ideas that matter most to you

  3. Get feedback from the IBM team to refine your idea


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.

IBM Employees should enter Ideas at https://ideas.ibm.com


Status Not under consideration
Workspace Db2
Created by Guest
Created on Nov 24, 2017

Truncate incompatible with online backup command

Db2 online backup for warehouse environments running longer depending on database size, online backup command have a lock incompatibility with Truncate table command which is says backup is not fully online. This should be one essential feature that we need to have for next releases of Db2
  • Admin
    Michael Roecken
    Reply
    |
    Jan 10, 2022

    Hi. From TRUNCATE statement (https://www.ibm.com/docs/en/db2/11.5?topic=statements-truncate):

    DROP STORAGE
    All storage allocated for the table is released and made available. If this option is specified (implicitly or explicitly), an online backup would be blocked.


    So are the TRUNCATEs you doing specifying DROP STORAGE explicitly or you getting this behaviour implicitly because it is the default? Have you considered using REUSE STORAGE?

    Also, have you looked at the registry variable
    DB2_TRUNCATE_REUSESTORAGE?

    Thanks.

  • Guest
    Reply
    |
    Oct 13, 2021

    Hi Michael,

    The link already provided, contains this paragraph, which suggests to me that Backup should not have an issue when TRUNCATE affects DMS tablespace only. But to TRUNCATE has an issue with OLB lock and doesn't give ANY indication, that it simply waiting for backup to complete:


    TRUNCATE TABLE

    For SMS (System Managed Space), the TRUNCATE statement is not compatible with online backup because it gets a Z lock on the table and prevents an online backup from running concurrently.

    TRUNCATE will not progress if an online backup is active, as the online backup utility will hold an online back up (OLB) lock which is not compatible with TRUNCATE. In this case, the TRUNCATE will not timeout, regardless of the system defined timeout value. TRUNCATE will wait until the online backup is completed and before starting.


    In Datawarehouse/Datamart DBs, we often use TRUNCATE as part of the ETL processing, and yes, normally backup should NOT run while ETL processing is done. But if backup somehow runs much longer than expected, ETL processing simply 'hangs', which is not that smart. It better should provide a message telling that TRUNCATE can't continue while BACKUP is still running.

    Regards Torsten

  • Guest
    Reply
    |
    Oct 13, 2021

    At this point, the facts are described in the current documentation

    https://www.ibm.com/docs/en/db2/11.5?topic=backup-compatibility-online-other-utilities

  • Admin
    Michael Roecken
    Reply
    |
    Oct 13, 2021
    According to documentation, backup has a LOCK incompatibility with truncate only, when truncate affects a table residing in SMS tablespace.

    Can you please provide the link to the documentation you are referring too? Thanks.

  • Guest
    Reply
    |
    Oct 11, 2021

    According to documentation, backup has a LOCK incompatibility with truncate only, when truncate affects a table residing in SMS tablespace. Thus TRUNCATE of data in DMS or AS Tablespaces should NOT wait until backup completes, at least it should not do so w/o giving an notification that truncate waits for backup to complete!