If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Nightmare with a DB2 client

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-13-10, 19:25
clarkeb clarkeb is offline
Registered User
 
Join Date: Jul 2010
Posts: 3
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
Reply With Quote
  #2 (permalink)  
Old 07-13-10, 19:39
db2girl db2girl is offline
∞∞∞∞∞∞
 
Join Date: Aug 2008
Location: Toronto, Canada
Posts: 1,816
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.
Reply With Quote
  #3 (permalink)  
Old 07-13-10, 19:45
clarkeb clarkeb is offline
Registered User
 
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)
Reply With Quote
  #4 (permalink)  
Old 07-13-10, 19:48
db2girl db2girl is offline
∞∞∞∞∞∞
 
Join Date: Aug 2008
Location: Toronto, Canada
Posts: 1,816
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.
Reply With Quote
  #5 (permalink)  
Old 07-13-10, 23:16
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
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.
Reply With Quote
  #6 (permalink)  
Old 07-14-10, 04:36
clarkeb clarkeb is offline
Registered User
 
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
Reply With Quote
  #7 (permalink)  
Old 07-14-10, 05:18
przytula_guy przytula_guy is offline
Registered User
 
Join Date: Apr 2006
Location: Belgium
Posts: 1,159
with delete command - import from empty file - or with latest release truncate table
__________________
Best Regards, Guy Przytula
Database Software Consultant
DB2 UDB LUW Certified V7-V8-V9-V9.7 DB Admin - Dprop..
Information Server Datastage Certified
http://www.infocura.be
Reply With Quote
Reply

Tags
client

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On