select values from db1 table and insert into table of DB2


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting select values from db1 table and insert into table of DB2
# 1  
Old 02-10-2010
select values from db1 table and insert into table of DB2

Hi

I am having three oracle databases running in three different machine. their ip address is different. from one of the DB am able to access both the databases.(means am able to select values and insert values in to tables individually.)

I need to fetch some data from DB1 table(say DB1 ip is 10.10.10.10 and user is DB1user and table is DB1user_table) and insert the values in to DB2 table (say DB2 ip is 11.11.11.11 and user is DB2user and table is DB2user_table) from DB3 which is having access to both the DB IPs.

how do i achieve this in a script.
# 2  
Old 02-10-2010
Create a database link between the two DBs, and do an
Code:
INSERT INTO xxx SELECT aaa FROM bbb@DB2

# 3  
Old 02-10-2010
hi

i have followed this link and finished it...thanks for the help

SQL*Plus COPY Command
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Programming

DB2 z/os How to Track table delete Activities

Dear Team I am using DB2 v10 z/os database . Need expert guidance to figure out best way to track table activities ( Ex Delete, Insert,Update ) Scenario We have a table which is critical and many developer/testing team access on daily basis . We had instance where some deleted entire table .... (1 Reply)
Discussion started by: Perlbaby
1 Replies

2. Programming

How to track table status delete/update/insert status in DB2 V10 z/os?

Dear Team I am using DB2 v10 z/os database . Need expert guidance to figure out best way to track table activities ( Ex Delete, Insert,Update ) Scenario We have a table which is critical and many developer/testing team access on daily basis . We had instance where some deleted... (1 Reply)
Discussion started by: Perlbaby
1 Replies

3. Shell Programming and Scripting

Python Script to take file count and insert into DB2 table

Team I have files in different directories . How can i take the count of latest file and insert into Db2 table . I am using awk 'END{print NR+1-ARGC}' (File name) to get the counts. How can i take 1.The count of latest file 2.Insert into Db2 table( File Name and Counts) . cd... (4 Replies)
Discussion started by: Perlbaby
4 Replies

4. Programming

DB2 - Tracking Table history

HI team Is it possible to track DB2 table on the data insertion,deletion and updates on daily basis . Do we have any inbuilt feature to handle audit analysis ? Any help appreciated (1 Reply)
Discussion started by: Perlbaby
1 Replies

5. Programming

DB2 Query to check table counts,start end time

Dear team I am using DB2 and wish to capture the ETL status on daily basis so that i can run the query and share the details in xls format to respective mail ids . Currently i am using below query but this displays table name and counts for latest run. select name ,CARD from... (0 Replies)
Discussion started by: Perlbaby
0 Replies

6. Shell Programming and Scripting

awk file to read values from Db2 table replacing hard coded values

Hi, I want to replace a chain of if-else statement in an old AWK file with values from Db2 table or CSV file. The part of code is below... if (start_new_rec=="true"){ exclude_user="false"; user=toupper($6); match(user, "XXXXX."); if (RSTART ==2 ) { ... (9 Replies)
Discussion started by: asandy1234
9 Replies

7. Shell Programming and Scripting

Insert bulk values in DB table using isql

Hello, Objective is to insert bulk values in DB table using isql. Following code tried: isql -SServer_name -Ddb_name -Uuser_name -Ppassword < file.txt cat file.txt for i in `cat data_value_file.txt` do insert into tempdb..temp_table11 values ('$i') go done cat... (3 Replies)
Discussion started by: manishdivs
3 Replies

8. Shell Programming and Scripting

Select table name from file

i have a file tabel.out which contain table name in this format. xyz abc qwe Plz help me writing one script which actually takes tablename from file table.out file one by one and then select count (*) from $tablename limit 10; and print error in output file if any tabel is not... (4 Replies)
Discussion started by: netdbaind
4 Replies

9. Shell Programming and Scripting

Connect to DB2 table using Shell scripts

Can anyone please help me with an unix shell script to connect a DB2 database. My requirement is just to display the no of records present in a table of a DB2 database through Unix Shell script. Thx - Ram (1 Reply)
Discussion started by: onlyraja
1 Replies

10. Shell Programming and Scripting

How to connect DB2 table using shell script

Hi All, I want to connect two tables in DB2 using shell script and then compare the contents of two tables field by field. Could any one please help me in connecting database tables using Unix and retriving data from the same. Thanks, Durwas (0 Replies)
Discussion started by: dtidke
0 Replies
Login or Register to Ask a Question