473,397 Members | 2,099 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

How to establish a DB2 connection in while loop using Shell script

Hi ,
I have to create a db2 connection for the while loop in shell scripting.

Below is the while loop.
while read TABLE; do
db2 LOAD CLIENT FROM
$DIRECTORY/$TABLE.ixf OF ixf INSERT INTO TABLENAME NONRECOVERABLE INDEXING MODE REBUILD ALLOW NO ACCESS;
done < $input_file


how to create connection for the above while loop..please help me
Apr 8 '12 #1
1 3731
Hi,
To make db2 connect in a sub shell, set the following shell environment variable :
export DB2DBDFT=yourdatabasename

(if you had a previous failed attempt to connect to the db you may need to do a "db2 terminate" first )
May 18 '12 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Hari | last post by:
Hi all, I need to get a part of string which follows a pattern 'addr=' For example: a)test="192.168.1.17:/home/ankur/nios_fson/mnt/tmptype nfs(rw,addr=192.168.1.17)"
0
by: Aashif | last post by:
I want to call Unix Shell script which is available in other Server (Unix server) from windows application using C#. Currently the shell script runs the C program but the GUI is not good, So I want...
3
by: normadiah | last post by:
Dear all, I'm really appreciated if anyone can help me. I would like to ask regarding the following code... B]System.out.println("Enter Pre_condition or q to quit):"); ...
1
by: pssraju | last post by:
Hi, I am not sure whether I am posting it in right location as i cant see any shell scripting forum here. Below script works perfectly fine from command line, but when I run through browser I am...
1
by: iamforsecurity | last post by:
Hi, I am a newbie in Shell Script. I am trying to open 10 new sessions,each session running on a separate thread. For each session, I open a new xterm, go to a particular directory and run a...
9
by: madhu3437 | last post by:
help ,please using shell script i want know the all process are running or not in a particular path. the result will shown in web page (html). process name = running ( server is running)...
8
by: gupta24 | last post by:
i am in critical position please help we have machines a,b,c,d in each machine application servers are running but each machine have 40 application server are running result of 40 application...
3
by: gupta24 | last post by:
How can create web page using shell script....... Like web page like winner of the month(given the input) = john type of the prize(given the input)= gold the given page like
1
by: srikanths2008 | last post by:
Hi, I'm trying to retrieve a record from DB2 without using DBI package like this. system("db2 select \* from customer where cname=\'steve\' "); but it fails everytime with the error. this...
14
by: kadeous | last post by:
Greetings, Currently my code is arranged in this nature, and please excuse me for being so new, I'm learning! :) So no laughing at my echo's as I don't know much about tables yet. The issue I...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.