Solved

execute pl/sql block from perl program

Posted on 2014-07-24
3
139 Views
Last Modified: 2015-04-15
can you please provide guidance with code examples on executing a pl/sql block with input values from a perl program?

thanks
0
Comment
Question by:eagle_ea
  • 2
3 Comments
 
LVL 26

Expert Comment

by:wilcoxon
ID: 40217414
You want to look at the DBI and DBD::Oracle modules.
0
 

Author Comment

by:eagle_ea
ID: 40217481
assuming that is already in place, can you post an example of the code?
0
 
LVL 26

Accepted Solution

by:
wilcoxon earned 500 total points
ID: 40217583
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

Active Directory Webinar

We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Perl, group, sort, count question 6 141
Need to install DBD::MySQL on a MAC without a local MySQL server for Perl 4 69
Extract data from span tag 1 95
create a gui in perl 3 98
I've just discovered very important differences between Windows an Unix formats in Perl,at least 5.xx.. MOST IMPORTANT: Use Unix file format while saving Your script. otherwise it will have ^M s or smth likely weird in the EOL, Then DO NOT use m…
In the distant past (last year) I hacked together a little toy that would allow a couple of Manager types to query, preview, and extract data from a number of MongoDB instances, to their tool of choice: Excel (http://dilbert.com/strips/comic/2007-08…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question