Solved

execute pl/sql block from perl program

Posted on 2014-07-24
3
128 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

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
perl CPAN issue 3 109
Migrate OTRS to newest version. 1 335
Insert Text into odbc.ini file 15 66
perl syntax 3 4
A year or so back I was asked to have a play with MongoDB; within half an hour I had downloaded (http://www.mongodb.org/downloads),  installed and started the daemon, and had a console window open. After an hour or two of playing at the command …
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…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

809 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