File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

sqlplus and shell script

 
Rahuul Dravid
Ranch Hand
Posts: 42
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Folks,

I have a some issues with calling sqlplus form shell script.
I can run the sqlplus command form the home of the user directory ( i set the alias for sqlplus by editing the .bash_profile of that user ....every thing is fine.
home:> sqlplus
I can connect to db
SQL>

Now when i try to run the same sqlplus from the a shell script like 1.sh with sqlplus command inside the 1.sh

it says command not found .

i tried to edit the even the etc/bashrc file but .... it is same

So how to fix this so that the sh can get the path variable in linux ( red hat AS 5)

Do i need to edit define any variables ???

I think i set the Path correctly , if not it should not work from the home directory i guesss .....correct me if i'm wrong !

Thanks in advance !
 
Tim Holloway
Saloon Keeper
Pie
Posts: 17629
39
Android Eclipse IDE Linux
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Issue the command "which sqlplus". It will display the full pathname of the executable. You should be able to invoke sqlplus from a script if you use the full pathname.
 
Rahuul Dravid
Ranch Hand
Posts: 42
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Thanks for the reply Tim

well i think i figured it out , there is the path issues .....and now it is fixed !

Thanks guys !


 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic