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
Invoking Oracle stored procedure in unix shell script hidnana Shell Programming and Scripting 1 10-15-2008 07:37 AM
Calling an Oracle Stored Procedure from Unix shell script Leojhose Shell Programming and Scripting 2 08-06-2007 06:00 AM
Shell arrays in oracle stored procedure superprogrammer Shell Programming and Scripting 6 06-09-2005 06:36 PM
Execute an Oracle stored procedure from a shell scrip mh53j_fe Shell Programming and Scripting 1 06-03-2005 03:17 PM
Store return code of shell script in oracle table sveera Shell Programming and Scripting 3 05-04-2005 01:25 PM

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 08-09-2006
arnabb4u arnabb4u is offline
Registered User
  
 

Join Date: May 2006
Posts: 4
run shell script from oracle store procedure

hi,

this is urgent..can i run a shell script from store procedure without using java.
  #2 (permalink)  
Old 08-09-2006
tmarikle tmarikle is offline Forum Advisor  
Registered User
  
 

Join Date: Jan 2005
Posts: 683
You can with external procedure calls but it's not as simple as invoking a built-in system procedure.
  1. Create a shared library with C (.so file)
  2. Create a library in PL/SQL (e.g. CREATE OR REPLACE LIBRARY xyz AS '/path/your.so')
  3. Create a PL/SQL interface that uses the library (e.g. CREATE OR REPLACE FUNCTION ... RETURN ... EXTERNAL LIBRARY xyz NAME "your_c_function" LANGUATE C;
  4. Update your TNSNAMES.ORA to allow external procedure calls
  5. Update your listener.ora to allow for external procedure calls
However, having said that, it's probably easier using Java.

Last edited by tmarikle; 08-09-2006 at 12:16 PM..
  #3 (permalink)  
Old 08-10-2006
arnabb4u arnabb4u is offline
Registered User
  
 

Join Date: May 2006
Posts: 4
can i do this without any lang..
  #4 (permalink)  
Old 08-10-2006
Dhruva's Avatar
Dhruva Dhruva is offline
Registered User
  
 

Join Date: Mar 2006
Location: India
Posts: 255
check out these links....where you will get no of methods...

shell script from oracle
other one
  #5 (permalink)  
Old 08-10-2006
tmarikle tmarikle is offline Forum Advisor  
Registered User
  
 

Join Date: Jan 2005
Posts: 683
The Java solution is simply the best cut it requires specific grants to run various UNIX commands. The first solution using DBMS_PIPE requires that you keep sqlplus resident on a UNIX server for however long that you wish to access UNIX OS commands.
  #6 (permalink)  
Old 08-14-2006
Dhruva's Avatar
Dhruva Dhruva is offline
Registered User
  
 

Join Date: Mar 2006
Location: India
Posts: 255
Yes tmarikle you are right Java solution can be considered as best solution and widely used.
Closed Thread

Bookmarks

Tags
unix commands

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 01:39 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