Solved

execute pl/sql block from perl program

Posted on 2014-07-24
3
159 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

On Microsoft Windows, if  when you click or type the name of a .pl file, you get an error "is not recognized as an internal or external command, operable program or batch file", then this means you do not have the .pl file extension associated with …
Many time we need to work with multiple files all together. If its windows system then we can use some GUI based editor to accomplish our task. But what if you are on putty or have only CLI(Command Line Interface) as an option to  edit your files. I…
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…
Six Sigma Control Plans

630 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