The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Command Prompt popo123456789 Windows & DOS: Issues & Discussions 1 08-07-2008 06:29 AM
inconsistent ls command display at the command prompt & running as a cron job rajranibl SuSE 5 07-30-2007 08:26 AM
Command prompt argument giridher2000 Shell Programming and Scripting 2 10-27-2005 01:36 AM
Unable to get password prompt owls IP Networking 2 11-12-2003 02:17 AM
Changing the UNIX command prompt WERUreo UNIX for Dummies Questions & Answers 2 04-22-2002 11:45 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 11-19-2008
ragavhere ragavhere is offline
Registered User
  
 

Join Date: Apr 2008
Location: Chennai,India
Posts: 79
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 (permalink)  
Old 11-19-2008
csorhand csorhand is offline
Registered User
  
 

Join Date: Oct 2008
Posts: 81
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 (permalink)  
Old 11-19-2008
ragavhere ragavhere is offline
Registered User
  
 

Join Date: Apr 2008
Location: Chennai,India
Posts: 79
Hi csorhand,

I think DB2 instance is not set.
  #4 (permalink)  
Old 11-26-2008
ragavhere ragavhere is offline
Registered User
  
 

Join Date: Apr 2008
Location: Chennai,India
Posts: 79
Unhappy 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 (permalink)  
Old 11-26-2008
ragavhere ragavhere is offline
Registered User
  
 

Join Date: Apr 2008
Location: Chennai,India
Posts: 79
Hi,

Is the way i am connecting to DB2 right?

Quote:
Originally Posted by ragavhere View Post
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
Sponsored Links
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 04:37 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0