Results 1 to 7 of 7
  1. #1
    Join Date
    Jul 2014
    Posts
    294

    Unanswered: Problem with wrapper & server

    Hi,

    I have a problem with my wrapper & servers.
    On my server (db210.5 c express on windows) having 3 databases(d1,d2,d3). I have created one more database as d4. By keeping the d4 as base, I created one wrapper & 3 servers for (d1,d2,d3) databases. I can able to access data, update & all other operations on all the tables under d1,d2,d3 databases. I am having the SYSADM privilege too.

    All these things are happened fine till yesterday. But today, when my wrappers & servers are working fine. But I am facing some problem : as
    I have a table called t1 on d1 database. From d4 i altered the table , added 2 more columns . On IBM data studio from d1 tab I can view the newly added columns on table t1. If I query the same table from d4 tab, i can't able to find the newly added columns.

    I don't have any problem with my wrappers & servers because I am altering the federated tables from d4 database itself. I can find the newly added columns from d1, I can find the same table from d4 but without the newly added columns.

    I don't know what might be the reason for this. As I haven't changed any server settings too.

    Can someone kindly let me know, what might be the reason under this.

  2. #2
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    How did you alter the d1.t1 table from d4? Please post the commands.

    Andy

  3. #3
    Join Date
    Jul 2014
    Posts
    294
    Thanks For the reply

    Set PASSTHRU d1

    ALTER TABLE d1.s1.t1 ADD COLUMN id1 INTEGER NOT NULL WITH DEFAULT 0

    ALTER TABLE d1.s1.t1 ALTER id1 DROP DEFAULT

    ALTER TABLE d1.s1.t1 ALTER id1 SET GENERATED BY DEFAULT AS IDENTITY

    ALTER TABLE d1.s1.t1 ADD COLUMN ID2 INTEGER

    Set passthru reset
    Last edited by HABBIE; 01-08-15 at 05:51.

  4. #4
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    Just as I suspected. You essentially just did the same as altering the table directly on d1. What you need to do after this is to drop and recreate the nickname for d1.t1 on d4. This will force d4 to recreate the definition for the table in its own catalog.

    Andy

  5. #5
    Join Date
    Jul 2014
    Posts
    294
    Thanks Andy,

    I will try this.

  6. #6
    Join Date
    Jul 2014
    Posts
    294
    I am trying a basic thing. Andy Kindly correct me.
    I have created a nickname on table d1.s1.t1 as s1.t1.
    Now I am trying to alter the d1.s1.t1 table from d4 using its nickname. I am getting the below error.

    These are my statement. which I am trying alone( I mean as a statements not embedded in any procedures)

    CREATE NICKNAME s1.t1 FOR d1.s1.t1 ;

    ALTER TABLE s1.t1 ADD COLUMN id1 INTEGER NOT NULL WITH DEFAULT 0 ;

    Error:
    The statement references "t1" which identifies a(n) "NICKNAME" rather than a(n) "TABLE".. SQLCODE=-159, SQLSTATE=42809

    According to this error :The above statement is expecting for a table name where it is occupied with nickname.
    Can you please correct the syntax. And kindly excuse me If I am wrong.

    Even I tried with different nickname (not as a part of original table name) it is still throwing the same error.

    Can you tell me what are all the possible ways to alter a federated table programmatically.
    Last edited by HABBIE; 01-09-15 at 03:39.

  7. #7
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    You cannot change the Nickname directly. You need to change it like you were (using set passthru, etc), then when that is complete, you have to drop and recreate the nickname.

    Andy

Tags for this Thread

Posting Permissions

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