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

    Unanswered: Alter statement on Federated Objects

    Hi,

    I am trying to alter a table on other database by sitting on one database. I am running with SYSADM privilege .I am using some wrappers to connect with other databases.On this scenario I can select , delete .drop etc. But alter is not working. These are the ways which I have tried, can some one let me know what I have to do in this case:

    ALTER TABLE SAMPLE.ORANGE.EMP ADD COLUMN APPLE_ID INTEGER NOT NULL WITH DEFAULT 0 ;

    error:

    The statement or command failed because a federated three-part name is being used in a way that is not supported. Three-part name: "SAMPLE.ORANGE.EMP". Reason code: "3".. SQLCODE=-512, SQLSTATE=56023, DRIVER=3.67.28

    Even I tried by placing some singl

    ALTER TABLE 'SAMPLE.ORANGE.EMP' ADD COLUMN APPLE_ID INTEGER NOT NULL WITH DEFAULT 0 ;

    error:
    An unexpected token "'SAMPLE.ORANGE.EMP'" was found following "ALTER TABLE ". Expected tokens may include: "<table_name>".. SQLCODE=-104, SQLSTATE=42601.


    Thanks

  2. #2
    Join Date
    Apr 2006
    Location
    Belgium
    Posts
    2,514
    Provided Answers: 11
    3 part names are not supported
    which is the nickname - which is the original table
    alter the source table
    alter/recreate the nickname
    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
    Jul 2014
    Posts
    294
    Thanks for the reply,

    ALTER TABLE SAMPLE.ORANGE.EMP ADD COLUMN APPLE_ID INTEGER NOT NULL WITH DEFAULT 0 ;

    original name : EMP

    Till now, I have created a wrapper & one server for one database to access them. I haven't created any nick names.Not met with such situation to create nicknames .

    My requirement is how can i alter a table on other database by sitting on one database? If 3 part names are restricted to ALTER , how can i do this?
    please let me know

  4. #4
    Join Date
    Apr 2006
    Location
    Belgium
    Posts
    2,514
    Provided Answers: 11
    no it can not be done
    have a look at infocenter and look for create nickname
    the answer is still no
    why creating wrapper if no nicknames used ??
    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

  5. #5
    Join Date
    Jul 2014
    Posts
    294
    really so thank full for your patience
    I am learning all these concepts now. Just to access tables from other databases I am creating one wrapper & corresponding servers for all those databases.
    K I ll learn those nick names too.
    Can u kindly confirm me using nicknames can i able to alter the remote(own server) database tables?

  6. #6
    Join Date
    Apr 2006
    Location
    Belgium
    Posts
    2,514
    Provided Answers: 11
    I understand you are trying to learn, but before that : READ THE MANUALS
    http://www-01.ibm.com/support/knowle.../rlsbrs25.html
    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

  7. #7
    Join Date
    Jul 2014
    Posts
    294
    Thanks.

    Is there any way so that I can alter my remote database tables? I got my full privileges. I am trying to alter the remote database(same server) tables.

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
  •