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 > 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
doubt in awk jisha Shell Programming and Scripting 4 04-16-2008 04:02 AM
AWK doubt Rafael.Buria Shell Programming and Scripting 2 02-06-2008 11:00 AM
doubt about awk soujanya_srk UNIX for Dummies Questions & Answers 2 01-10-2008 05:26 PM
awk doubt.. esham Shell Programming and Scripting 11 10-11-2007 02:24 AM
ftp doubt ranj@chn Shell Programming and Scripting 0 01-04-2006 08:47 AM

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 04-12-2007
ravi.sadani19 ravi.sadani19 is offline
Registered User
  
 

Join Date: Jul 2005
Posts: 42
Pls help for the doubt

Hi All,

I have to queries :
1. Why we always put #!/bin/ksh on the top of any shell script
2. How we can connect to Oracle SQL prompt from UNIX shell and what all parametres need to be set for that.


Thanks,
Ravi
  #2 (permalink)  
Old 04-12-2007
rahulrathod rahulrathod is offline
Registered User
  
 

Join Date: Sep 2004
Location: Mumbai-India
Posts: 158
For the 1st question What does "#! /usr/bin/ksh" mean?

and for the 2nd try the following snippet.

Code:
sqlplus -silent ${DBUSER}/${DBPASS}@${ORACLE_SID} << ENDSQL
      set feedback off serveroutput on size 5000
      execute pkg_1.pr_1;
      commit;
      Delete from table1;
      commit;
ENDSQL
  #3 (permalink)  
Old 04-12-2007
ravi.sadani19 ravi.sadani19 is offline
Registered User
  
 

Join Date: Jul 2005
Posts: 42
Thanks Rahul.
but i want to know that where the parameters for connecting are set.
Like {DBUSER}/${DBPASS}@${ORACLE_SID}
  #4 (permalink)  
Old 04-12-2007
blowtorch's Avatar
blowtorch blowtorch is offline Forum Advisor  
Supporter
  
 

Join Date: Dec 2004
Location: Singapore
Posts: 2,350
They are not 'set' as such anywhere. You have to manually export them into the environment. Such as:
Code:
export ORACLE_SID=<whatever_the_sid_is>
export ORACLE_HOME=<whatever_the_home_is>
export PATH=$ORACLE_HOME/bin:$PATH
sqlplus....
  #5 (permalink)  
Old 04-12-2007
ravi.sadani19 ravi.sadani19 is offline
Registered User
  
 

Join Date: Jul 2005
Posts: 42
Thanks a lot
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 06:43 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