The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
script execute or no execute Kespinoza97 Shell Programming and Scripting 4 06-23-2007 06:27 AM
run shell script from oracle store procedure arnabb4u Shell Programming and Scripting 8 08-16-2006 09:16 AM
Need to execute 2 scripts, wait, execute 2 more wait, till end of file halo98 Shell Programming and Scripting 1 08-01-2006 01:42 PM
Back-up Procedure daemons_advoc8 SUN Solaris 1 02-08-2006 07:24 AM
Execute an Oracle stored procedure from a shell scrip mh53j_fe Shell Programming and Scripting 1 06-03-2005 12:17 PM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 05-10-2006
Registered User
 

Join Date: May 2006
Posts: 18
execute store procedure

Hi, can someone point out the tutorial or syntax for how to execute store procedure through shell scripting .

thanks.
Reply With Quote
Forum Sponsor
  #2  
Old 05-10-2006
Registered User
 

Join Date: Feb 2006
Location: California
Posts: 45
Quote:
Originally Posted by epall
Hi, can someone point out the tutorial or syntax for how to execute store procedure through shell scripting .

thanks.
You want to execute Database Stored Procedure?
Reply With Quote
  #3  
Old 05-10-2006
Registered User
 

Join Date: May 2006
Posts: 18
Yes

can help .
Reply With Quote
  #4  
Old 05-11-2006
Registered User
 

Join Date: Feb 2006
Location: California
Posts: 45
Quote:
Originally Posted by epall
can help .
There are numerous ways.. you can create a SQL script and call from shell using sqlplus -s user/pwd @sqlscript..

Elaborate your requirement..
Reply With Quote
  #5  
Old 05-11-2006
Registered User
 

Join Date: May 2006
Posts: 18
wondering

Below is my script. I calling PS/SQL named:dummy_select. I dun know what's wrong of it...Getting error : wrong argument type.

function checkFileStatus
{

sqlplus -S $USER/$PASS@$DB << EOF
exec dummy_select('$1');
commit;
quit;
EOF

}


-----dummy PS/SQL--
CREATE OR REPLACE PROCEDURE dummy_select(
v_file_name VARCHAR2,
dummy_select_cv IN OUT Cv_Types.customer_tp)
IS
BEGIN

OPEN dummy_select_cv FOR

SELECT sysdate FROM dual;

END;
/
Reply With Quote
  #6  
Old 05-12-2006
Registered User
 

Join Date: Sep 2005
Location: india
Posts: 78
shell variables wont work inside the DB.
if am i right.
Reply With Quote
  #7  
Old 05-12-2006
Registered User
 

Join Date: Feb 2006
Location: California
Posts: 45
Quote:
Originally Posted by epall
Below is my script. I calling PS/SQL named:dummy_select. I dun know what's wrong of it...Getting error : wrong argument type.

function checkFileStatus
{

sqlplus -S $USER/$PASS@$DB << EOF
exec dummy_select('$1');
commit;
quit;
EOF

}


-----dummy PS/SQL--
CREATE OR REPLACE PROCEDURE dummy_select(
v_file_name VARCHAR2,
dummy_select_cv IN OUT Cv_Types.customer_tp)
IS
BEGIN

OPEN dummy_select_cv FOR

SELECT sysdate FROM dual;

END;
/
Make sure that you can run the SQL statement that you're passing through shell.. as you have an IN OUT parameter in your PL/SQL.. so you need to pass that in the SQL statement as well..
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 03:48 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0