Results 1 to 5 of 5
  1. #1
    Join Date
    Sep 2012
    Posts
    4

    Unanswered: Alter table vs Alter column, leaves the table in reorg pending?

    Hello:
    We are running DB2 V9.7.5 Unix AIX64.
    An alter table add column...... does not leave the table in reorg pending?.
    Is that correct?
    An Alter table.... alter column DOES leave the table in reorg pending.
    Correct?
    Questions.
    1.-Adding a new column to a table does not cripple the table availability and leaves it accessible and updateable right?.
    2.-Altering an existing column in a table it cripples the table and leaves it in reorg pending right?.
    3.- Why a major change to a table (Column add) does not have such an impact like Altering an existing column?.

    4.-Last question. Is there a DB2 command to search for a cripple table?, in this case "reorg pending", because it is accessible (select) but at update command, it gives error messages like: SQL0668N Operation not allowed for reason code "7" on table.
    Somewhat new to DB2 LUW....
    Thank you for your help.....

  2. #2
    Join Date
    Apr 2006
    Location
    Belgium
    Posts
    2,514
    Provided Answers: 11
    q4: ADMINTABINFO administrative view
    Best Regards, Guy Przytula
    Database Software Consultant
    Good DBAs are not formed in a week or a month. They are created little by little, day by day. Protracted and patient effort is needed to develop good DBAs.
    Spoon feeding : To treat (another) in a way that discourages independent thought or action, as by overindulgence.
    DB2 UDB LUW Certified V7-V8-V9-V9.7-V10.1-V10.5 DB Admin - Advanced DBA -Dprop..
    Information Server Datastage Certified
    http://www.infocura.be

  3. #3
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    Q1: correct
    Q2: Not necessarily. Some Alter Column commands do not need reorg
    Q3 ask IBM

    Andy

  4. #4
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    3. When a new column is added to a table (assuming the new column allows null values) then the only thing DB2 has to do is make some changes to the DB2 catalog tables. No changes are made to the existing data itself, and DB2 does not have to read the table data to check anything. This can be done almost instantaneously.

    When an existing column is changed, DB2 may have to examine the existing data in the table to see if it is compatible with the new column definition. This can take a long time, and is not always considered to be an "on-line" change.
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

  5. #5
    Join Date
    Sep 2012
    Posts
    4

    Thank you!!!

    Hello everybody:

    Thank you for your help, these forums are awesome, to be able to find people that can help you.
    Appreciate it.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •