The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Running UNIX commands remotely in Windows box from Unix box – avoid entering password D.kalpana UNIX for Dummies Questions & Answers 1 04-20-2007 06:24 AM
How to use unix commands in awk jerome Sukumar Shell Programming and Scripting 7 12-26-2006 08:15 AM
Need help on Unix commands. adngu3 High Level Programming 1 03-09-2005 10:21 AM
Maingrame to UNIX sending UNIX commands skammer UNIX for Dummies Questions & Answers 2 06-27-2002 01:19 PM
Unix Commands smdakram UNIX for Dummies Questions & Answers 2 01-13-2002 08:12 PM

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

Join Date: May 2006
Posts: 16
SQL Commands in Unix

Hi gurus,

Being a newbie not sure whether iam asking the right question?

can we use oracle commands in unix for ex: to read a count on a table.

if so, what needs to be configured and etc..

any kind of help is appreciated.

Thanks
sish
  #2 (permalink)  
Old 05-19-2006
jim mcnamara jim mcnamara is offline Forum Staff  
...@...
  
 

Join Date: Feb 2004
Location: NM
Posts: 5,807

Code:
sqlplus -s <<EOF
$user/$passwd@oracle_instance
select count(*) from mytable;
exit
EOF

sqlplus has to be in your PATH.
  #3 (permalink)  
Old 05-19-2006
sish78 sish78 is offline
Registered User
  
 

Join Date: May 2006
Posts: 16
Hi Jim

That works perfectly.

Thanks for the earliest reply.

sish
  #4 (permalink)  
Old 05-25-2006
sish78 sish78 is offline
Registered User
  
 

Join Date: May 2006
Posts: 16
It worked well before

but when i try to execute the above shell script(as given by jim) it encounters the following error as 'sqlplus not found'

may be some one removed the path of sqlplus.

how should i configure the path and in which file should i configure the path

the shell type is : ksh

any mind of help is appreciated

regards
sish
  #5 (permalink)  
Old 05-25-2006
tmarikle tmarikle is offline Forum Advisor  
Registered User
  
 

Join Date: Jan 2005
Posts: 683
set up your Oracle environment first:

. /usr/local/bin/oraenv
  #6 (permalink)  
Old 05-25-2006
sish78 sish78 is offline
Registered User
  
 

Join Date: May 2006
Posts: 16
hey

Thanks for the earliest reply

do i need to setup it in .cshrc file?
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 05:38 PM.


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