Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Calling O/S Scripts From PL/SQL

RE: Calling O/S Scripts From PL/SQL

From: Baumgartel, Paul <paul.baumgartel_at_credit-suisse.com>
Date: Mon, 14 Aug 2006 17:21:19 +0100
Message-ID: <D97D1FAE0521BD44820B920EDAB3BBAC0F40E767@ENYC11P32005.corpny.csfb.com>


Using "execute immediate" is the right way to go--what you need to do is figure out why the triggers are invalid. Have you queried USER_ERRORS after creation to find the problem? Can you post an example "execute immediate" call so we can take a look at it?  

Paul Baumgartel
CREDIT SUISSE
Information Technology
DBA & Admin - NY, KIGA 1
11 Madison Avenue
New York, NY 10010
USA
Phone 212.538.1143
paul.baumgartel_at_credit-suisse.com
www.credit-suisse.com

-----Original Message-----
From: oracle-l-bounce_at_freelists.org [mailto:oracle-l-bounce_at_freelists.org]On Behalf Of Scott Canaan Sent: Monday, August 14, 2006 12:02 PM
To: oracle-l_at_freelists.org
Subject: Calling O/S Scripts From PL/SQL

   We have an issue where we need to drop and recreate tables, indexes, triggers, stored procedures, etc. The programmer involved has contacted me because they have to do this via a stored procedure. The reason is that the tool they are using (Synopsis) isn't easily able to call O/S scripts. The problem they are having is in creating the triggers. The triggers get created (via an "execute immediate" statement), but are invalid and the stored procedure returns an error (ora-24344 success with compilation error).

   My suggestion was to keep the original SQL*Plus scripts and call them from the stored procedure. The problem is, I can't figure out how to do that. I've found documentation on how to call C and JAVA external programs, but not SQL*Plus scripts. I'm sure it can be done, even if there's a way to call an O/S program (sqlplus) from the stored procedure, but I can't figure it out and time is running out.  

Here are the specifics:

Oracle 10.2.0.2

Sun Solaris 10  

Thank you,  

Scott Canaan '88 (Scott.Canaan_at_rit.edu)

(585) 475-7886

"Life is like a sewer, what you get out of it depends on what you put into it." - Tom Lehrer.  



Please access the attached hyperlink for an important electronic communications disclaimer:

http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html


--
http://www.freelists.org/webpage/oracle-l
Received on Mon Aug 14 2006 - 11:21:19 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US