Results 1 to 7 of 7
  1. #1
    Join Date
    Jul 2010
    Posts
    3

    Unanswered: Nightmare with a DB2 client

    Hi,
    I'm not sure whether this is the most common question on the planet to a seasoned DB2 admin, but for me it's pure exasperation and disbelief and how difficult such a simple thing (for any other DB) can be....

    Somebody please tell me... how on earth do I get a DB2 client to update the server it's connected to ???

    here's the detail...
    I have a DB2 server on one machine and I've installed a DB2 client (v 9.*) on another machine.
    On the client machine I've catalogued the node and I've catalogued the databases.
    On the client machine, after cataloguing I can select data from the tables that have been defined on the server
    However, when I issue a create table statement and insert data into this new table, I can see the new table on the client but for the life of me (and I've been googling this for hours) I cannot get that new table to appear on the server.

    I'm sure there is a very simple answer to this and that I'm just googling the wrong question but ........ Someone help me before I go insane please

  2. #2
    Join Date
    Aug 2008
    Location
    Toronto, Canada
    Posts
    2,367
    I've just tried creating a table from the client machine and can see it from the client and server using "db2 list tables for schema <schame name>":


    From client:


    D:\Program Files\IBM\SQLLIB\BIN>db2 connect to test user xxxxx
    Enter current password for xxxxx:

    Database Connection Information

    Database server = DB2/AIX64 9.5.5
    SQL authorization ID = xxxxx
    Local database alias = TEST


    D:\Program Files\IBM\SQLLIB\BIN>db2 "create table client (c1 int)"
    DB20000I The SQL command completed successfully.

    D:\Program Files\IBM\SQLLIB\BIN>db2 list tables for schema xxxxx

    Table/View Schema Type Creation time

    ------------------------------- --------------- ----- --------------------------

    CLIENT xxxxx T 2010-07-13-19.36.26.941734


    1 record(s) selected.




    From server:

    xxxxx@p6db2serv /home/xxxxx > db2 list tables for schema xxxxx

    Table/View Schema Type Creation time
    ------------------------------- --------------- ----- --------------------------
    CLIENT xxxxx T 2010-07-13-19.36.26.941734

    1 record(s) selected.

  3. #3
    Join Date
    Jul 2010
    Posts
    3
    Hi db2girl
    Thanks for responding so quickly.... you're getting different behaviour than me, when I do the same thing as you've just done I don't see anything on the server. The only difference is I'm using the default schema so the command i use to list is just "db2 list tables" at both ends.

    I'm thinking maybe there's some config setting somewhere that I need to change (no idea where to start though, complete novice)

  4. #4
    Join Date
    Aug 2008
    Location
    Toronto, Canada
    Posts
    2,367
    Are you sure you're connected to the db on the server and not some local db on the client? Please include what you've tried.

  5. #5
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    Quote Originally Posted by clarkeb View Post
    when I issue a create table statement and insert data into this new table, I can see the new table on the client but [...] I cannot get that new table to appear on the server.
    Please explain how you determine that you "can see the new table on the client" and "cannot get that new table to appear on the server". The best way to do it would be to copy and paste the entire session, including catalog information.

  6. #6
    Join Date
    Jul 2010
    Posts
    3
    I think I just found the error, I was using the default schema when listing tables. I assumed the schema name would default to the user ID I was connected as but ..... ah, it just hit me, I'm logged in to the server as a different user.. DOH !!!!!
    Now when I list the tables for the right schema I can see my new table created from the client

    Thanks for the help

    Next step is to find out how to truncate tables from the client

    Bob

  7. #7
    Join Date
    Apr 2006
    Location
    Belgium
    Posts
    2,514
    Provided Answers: 11
    with delete command - import from empty file - or with latest release truncate table
    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

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
  •