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

  Unix/Linux 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 Linux or Unix Question    
 
Thread Tools Search this Thread Display Modes
    #1  
Old Unix and Linux 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 Unix and Linux 11-13-2005
reborg's Unix or Linux Image
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 Unix and Linux 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 Unix and Linux 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 Unix and Linux 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 Unix and Linux 11-22-2005
jim mcnamara jim mcnamara is online now Forum Staff  
...@...
 
Join Date: Feb 2004
Last Activity: 4 March 2015, 11:27 AM EST
Location: NM
Posts: 10,394
Thanks: 323
Thanked 848 Times in 787 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 Unix and Linux 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 Linux or Unix Question

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Unix or Linux Image 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 07:18 AM
Call and redirect output of Oracle stored procedure from unix script jakSun8 Shell Programming and Scripting 0 03-24-2010 06:21 PM
Need to call stored procedure from unix script mac4rfree Shell Programming and Scripting 1 03-25-2009 03:44 AM
Call unix script through informatica mapping Nishithinfy UNIX for Dummies Questions & Answers 0 09-11-2008 03:34 AM
How to call pl/sql in unix script YoYo Shell Programming and Scripting 6 09-01-2005 05:59 PM



All times are GMT -4. The time now is 12:45 PM.