473,804 Members | 3,399 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Perl calling a Oracle PL/SQL script

2 New Member
I am new to perl and need help with the following. In perl we are calling sqlplus with a PLSQL Script. In order to do this in PERL we had to do a system call. How do we return a error code from the PLSQL script back to the perl script?
Apr 2 '07 #1
5 8661
KevinADC
4,059 Recognized Expert Specialist
You should be using the DBI module to interface with your database.

If you literally mean you are using:

system()

to access the database, there is no way to get back error messages from the database that I know of.
Apr 2 '07 #2
davidr262
2 New Member
Kevin

If we have a PLSQL script how would we rub this script using the DBI module?
Apr 2 '07 #3
KevinADC
4,059 Recognized Expert Specialist
Kevin

If we have a PLSQL script how would we rub this script using the DBI module?

Read the DBI documentation:

http://search.cpan.org/~timb/DBI-1.54/DBI.pm

and you will need the particular driver for PLSQL, you can search for that on CPAN too.

I can't help you with code examples because my experience and knowledge is quite limited in regards to database applications and the DBI module in general.
Apr 2 '07 #4
jonathan184
154 New Member
Well you could use the system call because from what you are saying you are running the sqlplus commands, in the plsql code. define the dbms_output error line as a perl variable and run a perl print statement or print to a log or whatever.
Apr 3 '07 #5
KevinADC
4,059 Recognized Expert Specialist
Well you could use the system call because from what you are saying you are running the sqlplus commands, in the plsql code. define the dbms_output error line as a perl variable and run a perl print statement or print to a log or whatever.
Sounds like a very plausible suggestion.
Apr 3 '07 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

2
5082
by: Sandman | last post by:
The subject says it all. I am doing a: I have a perl script in which I am using a ReadParse routine that parses the $ENV{'QUERY_STRING'} or $ENV{'CONTENT_LENGTH'} which are two variables passed to the script under usual SSI (.shtml) containing form data submitted to the page from which the script is executed from. Well, since switching to PHP, I have moved most of my perl scripts to php equivalents, but there are a few perl scripts...
0
2180
by: Mike Bobbitt | last post by:
I've recently decided to switch from compiled Apache/PHP to RPM's of both and I'm having a problem I can't seem to solve. I have a Perl script called php_include.cgi that parses a PHP file for inclusion. It does this by running "php -f " but unfortunately it no longer works with the RPM: ---------- Security Alert! The PHP CGI cannot be accessed directly. This PHP CGI binary was compiled with force-cgi-redirect enabled. This
4
2418
by: Keith | last post by:
All: What is the difference between Perl (CGI) and PHP (Apache module)? I thought both used servers to direct the user to the appropiate Perl or PHP program in order to execute the program to interpret the user's Perl or PHP script respectively. Keith
3
6559
by: dpackwood | last post by:
Hello, I have two different scripts that do pretty much the same thing. The main perl script is on Windows. It runs and in the middle of it, it then calls out another perl script that then should run on a Unix box I have. Both scripts run ok, except for the part when Windows try's to call out the Unix script. I have it set up where the Unix is mapped through a drive letter and can drop stuff into the Unix box. It is going through another...
2
4823
by: James Hull | last post by:
Hi All: I am new in the Perl world. So far I have installed cygwin and Perl 5.8.0 along with Perl DBI and DBD::Oracle modules. NowI am trying to install Perl Tk on my PC (Windows 2K). I have tried both Tk804.025 and Tk804.025_beta2. However, both versions failed with following errors. It appeared that the command "perl Makefile.PL" ran successfully, but the "make" command failed. I also ran "perl -Mblib demos/widget". It was complaining...
0
4677
by: Piotr B. | last post by:
Hello, I want to make use of a Perl script "ora2pg" (Oracle to PostgreSQL schema converter), which requires the following modules: DBI, DBD::Oracle and DBD::Pg. As I don't use Perl on a regular basis, I've downloaded and installed ActivePerl 5.6.1.638 (Windows). Then, I installed DBI and DBD::Oracle using the PPM utility. But, unfortunately, I couldn't install DBD::Pg:
1
4684
by: newhaven_lad | last post by:
Please could someone help, I have a Perl cgi script which works perfectly when run in a dos prompt, it connects to a database on my laptop and inserts a record. But when I use the internet browser to run the script it doesn't insert the record in the database or display any messages past the following line. $dbh=DBI->connect("DBI:Oracle:testdb",'alan', 'alan'); I have supplied the whole script below As you can see, it takes input...
4
3713
by: billb | last post by:
I installed a perl extension for PHP to use some perl inside my php primarily because I have perl working with oracle and not php and oracle. So I want to use my old perl scripts, and use the functionality of php. The extension uses the '$perl->eval' function. i am kind of stuck with the syntax or how to put the php variable into the perl script. I have a form where the user puts in a grid reference. Then a php script that gets the...
0
1614
by: crawfordr | last post by:
Hello, I have created a perl script that connects to a specific socket (Ip address/port) using protocall of TCP. It is the server socket script. There is also coding to manage multiple handles by usung the select() in the coding. This was needed due to the fact we expect a large volume of transactions at any given time on the client's side. The script's purpose is to connect to the client's port and listen for connections, accept the...
0
9705
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10567
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10323
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9138
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7613
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6847
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5515
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4291
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3809
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.