Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2015
    Posts
    36
    Provided Answers: 2

    Answered: federation db doesn't recognize newly added column

    Hi,

    I have this scenario which is very strange: I create table in DB x, select from DB y using fedaration DB, I alter the table and adding new column in x, select from y and see the old structure without the new column.

    Should I refresh something? I didn't see it in the docs

    Code:
    db2inst1@db2-srv:~> db2_APPUSER CR13NIK
    
       Database Connection Information
    
     Database server        = DB2/LINUXX8664 10.1.0
     SQL authorization ID   = APPUSER
     Local database alias   = CR13NIK
    
    db2inst1@db2-srv:~> db2 "create table test(name varchar(100))"
    DB20000I  The SQL command completed successfully.
    db2inst1@db2-srv:~> db2 "grant select on test to ro_user"
    DB20000I  The SQL command completed successfully.
    db2inst1@db2-srv:~> db2_APPUSER CR13NIKA
    
       Database Connection Information
    
     Database server        = DB2/LINUXX8664 10.1.0
     SQL authorization ID   = APPUSER
     Local database alias   = CR13NIKA
    
    db2inst1@db2-srv:~> db2 "select * from fedoltp.APPUSER.test"
    
    NAME
    ----------------------------------------------------------------------------------------------------
    
      0 record(s) selected.
    
    db2inst1@db2-srv:~> db2_APPUSER CR13NIK
    
       Database Connection Information
    
     Database server        = DB2/LINUXX8664 10.1.0
     SQL authorization ID   = APPUSER
     Local database alias   = CR13NIK
    
    db2inst1@db2-srv:~> db2 "alter table test add last_name varchar(10)"
    DB20000I  The SQL command completed successfully.
    db2inst1@db2-srv:~> db2 "select * from test"
    
    NAME                                                                                                 LAST_NAME
    ---------------------------------------------------------------------------------------------------- ----------
    
      0 record(s) selected.
    
    db2inst1@db2-srv:~> db2_APPUSER CR13NIKA
    
       Database Connection Information
    
     Database server        = DB2/LINUXX8664 10.1.0
     SQL authorization ID   = APPUSER
     Local database alias   = CR13NIKA
    
    db2inst1@db2-srv:~> db2 "select * from fedoltp.APPUSER.test"
    
    NAME
    ----------------------------------------------------------------------------------------------------
    
      0 record(s) selected.

  2. Best Answer
    Posted by mark.b


  3. #2
    Join Date
    Jul 2013
    Location
    Moscow, Russia
    Posts
    666
    Provided Answers: 55
    Regards,
    Mark.

  4. #3
    Join Date
    Nov 2015
    Posts
    36
    Provided Answers: 2
    thank you!

Posting Permissions

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