hanhn
asked on
How to make Oracle call external program
Is there anyway for Oracle to call external program whenever a certain data is inserted to the table with the data as parameter to the program? Can Oracle Stored Procedure triggers this kind of call?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
schwertner's post should work,
it's effectively the same thing I posted except it forces cmd/sh use (depending on the operating system) and it doesn't capture any of the output from those commands.
however, most dba's wouldn't allow it (or at least, they shouldn't)
if you can run cmd/sh then you can run anything that the oracle process owner can run.
it's more secure to grant exactly the access you need to the programs you want to run.
and most dba's will (hopefully) grant only what you need and not a "run anything" set of privileges.
if you are the dba and will be granting this to yourself, then make sure you keep the procedure locked down so nobody else can use it.
it's effectively the same thing I posted except it forces cmd/sh use (depending on the operating system) and it doesn't capture any of the output from those commands.
however, most dba's wouldn't allow it (or at least, they shouldn't)
if you can run cmd/sh then you can run anything that the oracle process owner can run.
it's more secure to grant exactly the access you need to the programs you want to run.
and most dba's will (hopefully) grant only what you need and not a "run anything" set of privileges.
if you are the dba and will be granting this to yourself, then make sure you keep the procedure locked down so nobody else can use it.
I recommend a split with schwertner and myself (sdstuber)
schwertner posted basically the same thing I posted earlier
but with a few minor differences
schwertner's version makes command line access easier but has weak security. So, good and bad.
mine is more secure but less convenient since you have to have expicit access granted for each program.
I also gave 2 other suggestions
schwertner posted basically the same thing I posted earlier
but with a few minor differences
schwertner's version makes command line access easier but has weak security. So, good and bad.
mine is more secure but less convenient since you have to have expicit access granted for each program.
I also gave 2 other suggestions
no problem, glad I could help!
usage: Host <external program> <params>
Check SQLPlus documentation for longer description or
read this adticle
HTH
i