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 > db2 script not found error

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-12-03, 16:28
mixxalot mixxalot is offline
Registered User
 
Join Date: May 2003
Posts: 369
db2 script not found error

I run a script locally and get the error

ksh: db2search.ksh: not found.

However when I run it this way no errors occur
./db2search.ksh

How do I fix this problem?
We are running DB2 UDB 7.2 on AIX 5.2L

thanks

scott
Reply With Quote
  #2 (permalink)  
Old 11-12-03, 16:32
nagasurir nagasurir is offline
Registered User
 
Join Date: Nov 2003
Location: California,USA
Posts: 71
Re: db2 script not found error

You add the current directory to the $PATH environment variable in the user's ".profile" file.

Hope this solves your problem...

...Ram
Reply With Quote
  #3 (permalink)  
Old 11-12-03, 16:38
sathyaram_s sathyaram_s is offline
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 4,534
Re: db2 script not found error

export PATH=$PATH:.

Cheers
Sathyaram

Quote:
Originally posted by nagasurir
You add the current directory to the $PATH environment variable in the user's ".profile" file.

Hope this solves your problem...

...Ram
__________________
Visit the new-look IDUG Website , register to gain access to the excellent content.
Reply With Quote
  #4 (permalink)  
Old 11-12-03, 19:42
mixxalot mixxalot is offline
Registered User
 
Join Date: May 2003
Posts: 369
thanks !

It worked thanks exactly what I needed somehow our AIX profiles were out of sync after the AIX upgrade.

Scott
Reply With Quote
  #5 (permalink)  
Old 11-13-03, 07:13
jammann jammann is offline
Registered User
 
Join Date: Jul 2003
Location: Switzerland, Basle
Posts: 10
Re: thanks !

Quote:
Originally posted by mixxalot
It worked thanks exactly what I needed somehow our AIX profiles were out of sync after the AIX upgrade.

Scott
there is a security threat with this approach. (adding "current dir" to the search path).

example
- put a malicious program called "ls-l" in the /tmp dir
- wait for a user cd'ing in /tmp and
forgeting the space in the "ls -l" command
- ups

thats the reason why (at least for the root user) "." is not per default in the PATH
Reply With Quote
  #6 (permalink)  
Old 11-13-03, 07:56
sathyaram_s sathyaram_s is offline
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 4,534
Re: thanks !

For root, it is a high security risk to have . in the PATH ..

For other users, it depends on the site's security policies ... Most of the places I have worked, do not restrict adding the current directory to the PATH

HTH

Sathyaram
__________________
Visit the new-look IDUG Website , register to gain access to the excellent content.
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