Unable to get the db2 command prompt in unix


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Unable to get the db2 command prompt in unix
# 1  
Old 11-19-2008
Unable to get the db2 command prompt in unix

Hi,

When i try to connect to the db2 database from unix solaris 5.8 version by typing "db2" from the .../sqllib/bin/ folder, i am not getting the db2 command prompt. Could anyone help me resolve this? Here the db2 is executable only. But still iam not getting the db2 prompt.
The error i get is
$ db2
ksh: db2: not found
# 2  
Old 11-19-2008
ragavhere,

did you set your DB2 instance to that user?It should be in the users PATH so that you can execute the db2 command.
# 3  
Old 11-19-2008
Hi csorhand,

I think DB2 instance is not set.
# 4  
Old 11-26-2008
Data Is the script right?

Hi,

Is the way i am connecting to DB2 right?

if [ $ERROR_CD = 01 ]; then
db2output=`DB2 <<EOD
connect to <DB name> user <username> using <password>
insert into <schema.tablename> (Col1,Col2,Col3,Col4,Col5,Col6) values('Val1','Val2','Val3','Val4','Val5','Val6');
terminate
EOD`
else
exit
fi
# 5  
Old 11-26-2008
Hi,

Is the way i am connecting to DB2 right?

Quote:
Originally Posted by ragavhere
if [ $ERROR_CD = 01 ]; then
db2output=`DB2 <<EOD
connect to <DB name> user <username> using <password>
insert into <schema.tablename> (Col1,Col2,Col3,Col4,Col5,Col6) values('Val1','Val2','Val3','Val4','Val5','Val6');
terminate
EOD`
else
exit
fi
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Unable to move from rsc prompt to ok prompt

Hi, on sunfire v890 unable to move from rsc prompt to ok prompt, i have executed the command break. (9 Replies)
Discussion started by: manoj.solaris
9 Replies

2. Shell Programming and Scripting

DB2: load command in unix

I am currently trying to load data from e.txt into tablea. I am getting error. db2 connect to qw01p user wcs using abc db2 "LOAD CLIENT FROM /dswork/ECONT/output/interface/e.txt OF DEL MODIFIED BY coldel| SAVECOUNT 0 ROWCOUNT 0 WARNINGCOUNT 0 MESSAGES XTMPRTI1.txt REPLACE into WCSADM.TABLEA... (1 Reply)
Discussion started by: skatpally
1 Replies

3. UNIX Desktop Questions & Answers

Can Unix access Windows' File through Command Prompt in Unix

Hi all, I wish to know whether Unix can access window's file in Unix's terminal? Apart from that, how to copy files or share files between Window and Unix? I get to know of secure copy, however, my company's Unix does not support the feature of secure copy? Any other method for me to share/... (5 Replies)
Discussion started by: jessy83
5 Replies

4. HP-UX

Unable to Set Prompt to current working DIR

HPUX does not recognise \h,\w,\u to display the hostname,working directory and username respectively. So how do i set the PS1 variable to display my current working Directory as my prompt? I also tried PS1=$PWD, But it keeps showing the same directory path as prompt which PWD was holding at... (3 Replies)
Discussion started by: Amit Kulkarni
3 Replies

5. Shell Programming and Scripting

Use Unix shell script to open Windows command prompt (cmd)

Hello, I work on Windows and I use Putty to access a remote UNIX server. I am trying to build a shell script that will have as main task to open the Windows command prompt (cmd) and run some Windows commands thereafter. The commands are actually file transfer commands that will download a file... (14 Replies)
Discussion started by: rookie2785
14 Replies

6. UNIX for Advanced & Expert Users

Entire Input command not visible in Unix prompt

Hi, While typing the Unix command, entire command is not visible.When the input command is long, it is not visible. I want the entire command to be displayed when i type it. Please help to resolve this issue. Thanks Sampath (7 Replies)
Discussion started by: sampath.giri
7 Replies

7. UNIX for Dummies Questions & Answers

FTP that works correctly in command prompt and shows issue in UNIX server

Hi All, FTP ports opens with the given user name and password and allows to download file through COMMAND PROMPT. Code as below: H:\>ftp ftpxxxxx Connected to entvc2ft07-pub.xxxxx.com. 220 Microsoft FTP Service User (entvc2ft07-pub.xxxxx.com:(none)): userxxxxx 331 User name okay, need... (1 Reply)
Discussion started by: vijayalakshmi.r
1 Replies

8. Shell Programming and Scripting

how do i access db2 instance via telnet command prompt

Hi I have a perl script code in which connecting with db2 database and doing some process. My perl script code and db2 database server present in the same unix server. I am connecting and executing perl script code via windows telnet. Now my question is i could not able to connect db2 server... (4 Replies)
Discussion started by: solo123
4 Replies

9. IP Networking

Unable to get password prompt

Hi I am using a Solaris 2.5.1 and i am unable to logon on the console. When i key in say, root on the login prompt, it does not prompt me for password but instead return to the login prompt again. Please help. thanks (2 Replies)
Discussion started by: owls
2 Replies

10. UNIX for Dummies Questions & Answers

Changing the UNIX command prompt

I am having a hard time figuring out how to change the command prompt in my UNIX shell. I am using the bash shell, and I would like to set the prompt to show me the full path of the current working directory along with my username, I suppose... The main thing I want is the full path of the... (2 Replies)
Discussion started by: WERUreo
2 Replies
Login or Register to Ask a Question