Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Start a program from wthin Oracle
rs_arwar_at_hotmail.com (Rauf Sarwar) writes:
> "Moritz Klein" <mklein_at_students.uni-mainz.de> wrote in message news:<auljlm$4jj$1_at_bambi.zdv.Uni-Mainz.DE>...
> > Hello NG,
> > first of all the general information.
> > I am using Windows 2000 Server and Oracle 9.2.
> > I am wondering if it is possible in PL/SQL to start programs (like
> > batch-scripts, perl-scripts an so on). I am designing an usermanagement with
> > Oracle and DHCP/DNS. Our administrators use a webinterface to enter the
> > user-information into the Oracle-DB. First we scheduled our scripts to run
> > every hour but this brought some problems and i want the scripts to be run
> > after every insert, update, or delete. If anyone does have a better solution
> > i would be very thankful if told here.
> >
> > Thanks in advance
> > Moritz Klein
>
>
> To answer first part of your question...You can run external programs
> from PLSQL *BUT* it's not as easy as you may think it is. There are
> couple of ways that I can come up with.
>
> 1) Use external procedure call to interact with the OS. This basically
> means that you can use a Dll (Dynamic Link Library) to create and
> register a library in Oracle and use functions in that Dll which may
> run your scripts. If you do not already have a Dll that can do this
> then you may have to write one in C. Knowledge of C, Dll's and C
> compiler required. Furthermore, before running an external procedure,
> you would have to make some initial entries in tnsnames.ora and
> listener.ora files. Consult your 9i docs for this.
>
> 2) Use Oracle's java cartridge to interact with the OS. Create a java
> stored procedure and call it from PLSQL. You would need to have
> knowledge of java and JNI (Java Native Interface) for this.
I have done this with a java stored procedure. You don't need JNI. All you need to do is use the java runtime object. Just create the java stored procedure and call it as you would call any stored procedure. You can find details about this at Tom Kytes site (or in his book Expert one-on-one Oracle I think). Check out
Tim
-- Tim Cross The e-mail address on this message is FALSE (obviously!). My real e-mail is to a company in Australia called rapttech and my login is tcross - if you really need to send mail, you should be able to work it out!Received on Sun Dec 29 2002 - 05:04:45 CST
![]() |
![]() |