how can I call a pl/sql funciton in unix script | Unix Linux Forums | Shell Programming and Scripting

  Go Back    


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

how can I call a pl/sql funciton in unix script

Shell Programming and Scripting


Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 11-13-2005
YoYo YoYo is offline
Registered User
 
Join Date: Aug 2005
Last Activity: 30 November 2005, 10:50 PM EST
Posts: 43
Thanks: 0
Thanked 0 Times in 0 Posts
how can I call a pl/sql funciton in unix script

who can show me how to call pl/sql function or precudure in unix script..

cheers,
Sponsored Links
    #2  
Old 11-13-2005
reborg's Avatar
reborg reborg is offline Forum Advisor  
Administrator Emeritus
 
Join Date: Mar 2005
Last Activity: 29 March 2012, 7:00 PM EDT
Location: Ireland
Posts: 4,464
Thanks: 0
Thanked 11 Times in 11 Posts
Quote:
Originally Posted by YoYo
who can show me how to call pl/sql function or precudure in unix script..

cheers,
There are examples of how to do this in several of your previous threads.
Sponsored Links
    #3  
Old 11-13-2005
YoYo YoYo is offline
Registered User
 
Join Date: Aug 2005
Last Activity: 30 November 2005, 10:50 PM EST
Posts: 43
Thanks: 0
Thanked 0 Times in 0 Posts
i wanna

funciton A (p1 number)
{
return v2,
}

MM()
{
somehow call the function A and use the return value;

}
    #4  
Old 11-22-2005
mh53j_fe mh53j_fe is offline
Registered User
 
Join Date: Jun 2005
Last Activity: 17 January 2006, 8:53 AM EST
Location: Detroit
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
The following code snippet runs a SQL file that will execute a stored procedure. The three $DB_* variables are the Oracle ID, password, and server variables. I hope this helps.


sqlplus -s <<EOF > oracle_delete.log
$DB_id/$DB_pswd@$DB_server
start archive_delete.sql
EOF
Sponsored Links
    #5  
Old 11-22-2005
bestbuyernc bestbuyernc is offline
Registered User
 
Join Date: Jul 2005
Last Activity: 22 November 2005, 1:50 PM EST
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Try this...


Code:
vValue=`sqlplus -s <<-EOF                                                                           
$DB_id/$DB_pswd@$DB_server
start archive_delete.sql
exit
EOF`

Sponsored Links
    #6  
Old 11-22-2005
jim mcnamara jim mcnamara is offline Forum Staff  
...@...
 
Join Date: Feb 2004
Last Activity: 24 October 2014, 10:39 PM EDT
Location: NM
Posts: 10,251
Thanks: 283
Thanked 803 Times in 747 Posts
You're actually asking an Oracle question. If you have valid PL/SQL code please post it, and I'll help you.
Sponsored Links
    #7  
Old 11-22-2005
Abhishek Ghose Abhishek Ghose is offline
Registered User
 
Join Date: Sep 2005
Last Activity: 31 October 2012, 6:24 AM EDT
Location: Chennai
Posts: 81
Thanks: 0
Thanked 0 Times in 0 Posts
Not very sure about the requirement but if you are planning to use a return value from a PL/SQL function, in a script you need to either spool the value in file or maybe use Oracles' text IO package (which basically amounts to the same thing). I would be grateful to have some helpful insights here too.
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
how to call unix script in informatoca thrgh cmd task sunilamarnadh Shell Programming and Scripting 0 12-02-2010 06:18 AM
Call and redirect output of Oracle stored procedure from unix script jakSun8 Shell Programming and Scripting 0 03-24-2010 05:21 PM
Need to call stored procedure from unix script mac4rfree Shell Programming and Scripting 1 03-25-2009 02:44 AM
Call unix script through informatica mapping Nishithinfy UNIX for Dummies Questions & Answers 0 09-11-2008 02:34 AM
How to call pl/sql in unix script YoYo Shell Programming and Scripting 6 09-01-2005 04:59 PM



All times are GMT -4. The time now is 02:18 AM.