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 > insert data to another machine

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-30-10, 08:10
mann madhan mann madhan is offline
Registered User
 
Join Date: Mar 2010
Posts: 15
insert data to another machine

Hai all,
i want to retrive a data from local machine and insert the data's into another machine help meeeeeeeeee
Reply With Quote
  #2 (permalink)  
Old 03-30-10, 08:11
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
Try export and import.

Andy
Reply With Quote
  #3 (permalink)  
Old 03-30-10, 08:13
mann madhan mann madhan is offline
Registered User
 
Join Date: Mar 2010
Posts: 15
sorry, i want to do it in query itself. In ms sql we can do that in query
Reply With Quote
  #4 (permalink)  
Old 03-30-10, 08:16
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
How about supplying more information. What DB2 version and OS are you using?

Andy
Reply With Quote
  #5 (permalink)  
Old 03-30-10, 08:19
mann madhan mann madhan is offline
Registered User
 
Join Date: Mar 2010
Posts: 15
i am using v9.5 in windows 2003. i have to retrive the data from local machine and insert the data's into another machine.i have use only query, help me it is very urgent
Reply With Quote
  #6 (permalink)  
Old 03-30-10, 08:21
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
Look in the manuals for "Federation".

Andy
Reply With Quote
  #7 (permalink)  
Old 03-30-10, 08:25
mann madhan mann madhan is offline
Registered User
 
Join Date: Mar 2010
Posts: 15
thanks for the help. i will check it out....
Reply With Quote
  #8 (permalink)  
Old 03-30-10, 08:55
mann madhan mann madhan is offline
Registered User
 
Join Date: Mar 2010
Posts: 15
i tried. i cann't understand. can you help me...
server A
os : windows 2003
database : db2
version : 9.5
ip : 192.168.1.31
Table : TableA
username :clientusername1
password :clientpassword1
server B
os : windows 2003
database : db2
version : 9.5
ip : 192.168.1.32
Table :TableB
username :clientusername1
password :clientpassword1

i want to insert the data from serverA.tableA to serverB.tableB.. kindly help

Last edited by mann madhan; 03-31-10 at 00:22.
Reply With Quote
  #9 (permalink)  
Old 03-30-10, 09:18
sathyaram_s sathyaram_s is offline
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 4,534
__________________
Visit the new-look IDUG Website , register to gain access to the excellent content.
Reply With Quote
  #10 (permalink)  
Old 03-30-10, 09:38
mdx34 mdx34 is offline
Registered User
 
Join Date: Oct 2004
Posts: 238
You can not do that in SQL Server's Query Analyzer unless you add a Linked server. Either use export/Import or do what sathyaram suggesting you.

Here is a simple syntax for export/import

db2 "export to tableA.ixf of ixf messages msgs.txt select * from tableA"

Copy the files created from above statement to serverB and run below statement.

db2 "import from tableA.ixf of ixf insert into tableB"
Reply With Quote
  #11 (permalink)  
Old 03-31-10, 00:56
mann madhan mann madhan is offline
Registered User
 
Join Date: Mar 2010
Posts: 15
Quote:
Originally Posted by sathyaram_s View Post
i tried sathyaram suggestion but the warrper is not creating. :-(
Reply With Quote
  #12 (permalink)  
Old 03-31-10, 03:57
dr_te_z dr_te_z is offline
Registered User
 
Join Date: Jan 2009
Location: Zoetermeer, Holland
Posts: 555
Quote:
Originally Posted by ARWinner View Post
Look in the manuals for "Federation".Andy
Yes. This in combination with "load from cursor" gives the best results. Believe me: "been there".
Not for you topicstarter (you're on windows) but when you're on unix/linux you can export/load thru a named-pipe. Also very fast!

and topicstarter: go thru the history of this forum. Bella (db2girl) and me have posted a few times on this "federated" subject.

Last edited by dr_te_z; 03-31-10 at 04:01.
Reply With Quote
  #13 (permalink)  
Old 03-31-10, 04:38
mann madhan mann madhan is offline
Registered User
 
Join Date: Mar 2010
Posts: 15
i am new to db2. some one guide me to solve this problem
Reply With Quote
  #14 (permalink)  
Old 03-31-10, 05:24
stolze stolze is offline
Registered User
 
Join Date: Jan 2007
Location: Jena, Germany
Posts: 2,662
Seriously: the referenced documents describe rather detailed how to set up federation and how to use it. I guess we cannot really help you any further if you don't provide more detailed information like what exactly you tried, which error messages are returned, and so on.
__________________
Knut Stolze
IBM DB2 Analytics Accelerator
IBM Germany Research & Development
Reply With Quote
  #15 (permalink)  
Old 03-31-10, 06:28
dr_te_z dr_te_z is offline
Registered User
 
Join Date: Jan 2009
Location: Zoetermeer, Holland
Posts: 555
Quote:
Originally Posted by mann madhan View Post
i am new to db2. some one guide me to solve this problem
IF you are located in the Netherlands
THEN hire me for a day or 2
ELSE hire one of my collegues
END-IF

In my earlier post I referenced to this: Federation between two DB2 databases running on AIX
Reply With Quote
Reply

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