Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 188
  • Last Modified:

execute pl/sql block from perl program

can you please provide guidance with code examples on executing a pl/sql block with input values from a perl program?

thanks
0
eagle_ea
Asked:
eagle_ea
  • 2
1 Solution
 
wilcoxonCommented:
You want to look at the DBI and DBD::Oracle modules.
0
 
eagle_eaAuthor Commented:
assuming that is already in place, can you post an example of the code?
0
 
wilcoxonCommented:
I don't personally use Oracle and don't have time to post multiple detailed examples but this is the basic flow.  What sorts of PL/SQL blocks do you want to execute (it's very hard to come up with examples without more details).
use strict;
use warnings;
use DBI;
my $dbh = DBI->connect('oracle...');
$dbh->do("some PL/SQL block that does not return values");
my $ret = $dbh->selectall_arrayref("some PL/SQL block that does return values");

Open in new window

For more complicated things, you can also look at statement handles.
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now