473,750 Members | 2,571 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Perl script that cannot receive respond from Oracle stored procedure

6 New Member
I had a Perl script that called a sql file calling the stored procedure in Oracle database. The stored procedure ran for a long time (more than 1.5 hrs) and did not return the result code to the perl script. (I could see from the job log of the stored procedure that the stored procedure was successfully completed)
Expand|Select|Wrap|Line Numbers
  1. my $sql = "sqlplus -s userid/password $jobId";
  2. $rtnCode = system($sql);
  3.  
I had other similar jobs that ran shorter time (e.g. 10 mins). That job could successfully got the result code.

Is the connection lost between the database server and the application server ?Is there any parameter that can control the timeout ?

Please help.
Feb 11 '10 #1
7 2690
chaarmann
785 Recognized Expert Contributor
I am pretty sure the connection timeout was hit.
And it's not a good idea to stay connected that long. A connection should be returned as fast as possible to the connection pool for usage of other processes.
So instead of fiddling with the timeout-parameters of your computer, your firewall and your oracle server, you could approach the problem another way:
make a temporary table "temp" with columns for your expected result and execute "insert into temp select my_stored_proce dure(...) from dual" with autocommit. Don't wait for results, just close the connection.
Then you can poll the table after an hour to see if the result is already arrived. if yes, then just make a small sql on this temp table to grab it.
Feb 12 '10 #2
sammak168
6 New Member
Dear chaarmann,

I searched the internet and found that a setting of "KeepAliveT ime" under "\\HKEY_LOCAL_M ACHINE\SYSTEM\C urrentControlSe t\Services\Tcpi p\Parameters" in the windows registry may help the issue.

But it may require the application program to use this setting. May I have more information how to use this setting in batch file (.bat) or the Perl program (.pl) ?
Feb 24 '10 #3
sammak168
6 New Member
If I set the value of "KeepAliveT ime" to 300000, do I need to specify in my Perl code to use this feature ? Or I can leave it to the OS to handle ?
Feb 25 '10 #4
sammak168
6 New Member
Does anyone have any idea if I set the value of "KeepAliveT ime" to 300000 in the windows registry "\\HKEY_LOCAL_M ACHINE\SYSTEM\C urrentControlSe t\Services\Tcpi p\Parameters", do I need to specify in my Perl code/bat file to use this feature ? Or I can leave it to the OS to handle ?
Feb 26 '10 #5
sammak168
6 New Member
Would anyone please give me some idea if I set the value of "KeepAliveT ime" to 300000 in the windows registry "\\HKEY_LOCAL_M ACHINE\SYSTEM\C urrentControlSe t\Ser vices\Tcpip\Par ameters", do I need to specify in my Perl code/bat file to use this feature ? Or I can leave it to the OS to handle ?

I tried to search for the information in the internet, but could not find any information.

Thanks in advanced.
Mar 1 '10 #6
sammak168
6 New Member
I tried to set the value of KeepAliveTime in the windows registry and not changed anything in the Perl code/batch file, but it still did not get the return code.

The system was just transferred to our site. The program logic and system settings were new to us. We tried to keep the changes minimal to the system. And the database server and the application server was in trusted zone and DMZ respectively.

Is there any other ways to tackle the problem ?
Mar 2 '10 #7
RonB
589 Recognized Expert Moderator Contributor
Have you tried using Perl's DBI module instead of shelling out to sqlplus?

DBI - Database independent interface for Perl
http://search.cpan.org/~timb/DBI-1.609/DBI.pm

DBD::Oracle - Oracle database driver for the DBI module
http://search.cpan.org/~pythian/DBD-....24a/Oracle.pm
Mar 2 '10 #8

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

Similar topics

7
9006
by: Jeff Lambert | last post by:
We have a Windows client application written in delphi that connects to Oracle 8i w/ ADO. We accumulate a lot of SQL statements in a loop and finally send the strings list to be executed. What I really need help with are the first three and the last three statements. How would I rewrite those under Oracle to make sure they have the same behaviour? BTW I know this isn't the best way to learn Oracle PLSQL but I am under time constraints,...
6
15900
by: Richard Trahan | last post by:
I want a js function to call a Perl script residing on a server. The Perl script will return a string, to be used by the js. Pseudo code: <script> stringvar = perlfunc_on_server(stringarg) document.write(stringvar) </script> Can stringvar above be a url?
8
7745
by: Wonderinguy | last post by:
Hi everybody , I have been trying to execute a simple DB2 stored Procedure from perl. But it doesn't work. Could anybody please help me find out why this is happening : here is my perl script that execute the SP : <snip> my $dbh = DBI->connect( "dbi:DB2:$database","user1","passwd1") || die "cannot connect to db2"; my $callstmt = "CALL SPACESP('DB','TEXAS')"; my $sth = $dbh->prepare($callstmt) || die "can't do
3
4610
by: Samarth | last post by:
Folks, I am calling a DB2 stored procedure through Perl using the DBI:ODBC module. I am not sure if I can do this or not because I have been able to connect to and also issue select statements using DBI:ODBC and also have them run successfully. When it comes to stored procedures, I am not sure whether I can do this through DBI::ODBC or not because the many postings that I have read on calling DB2 stored procedures they have all been...
1
4679
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...
21
34432
KevinADC
by: KevinADC | last post by:
Note: You may skip to the end of the article if all you want is the perl code. Introduction Uploading files from a local computer to a remote web server has many useful purposes, the most obvious of which is the sharing of files. For example, you upload images to a server to share them with other people over the Internet. Perl comes ready equipped for uploading files via the CGI.pm module, which has long been a core module and allows users...
0
1611
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...
3
4172
by: andrewkl | last post by:
hi, I have the following Perl code that inserts a string to an Oracle DB via a stored procedure: #!/usr/local/bin/perl ## Perl v5.8.6 built for sun4-solaris use strict; BEGIN { $ENV{'TNS_ADMIN'} = '/auto/engweb/oracle/sqlnet'; $ENV{'ORACLE_HOME'} = '/usr/packages/dbdoracle/9.2.0'; }
10
6975
by: happyse27 | last post by:
Hi All, I got this apache errors(see section A1 and A2 below) when I used a html(see section b below) to activate acctman.pl(see section c below). Section D below is part of the configuration of section c. Not sure where went wrong as the web page displayed internal server error. Also, what is the error 543? and error 2114. Where to find the list of errors in websites as it is not the standard apache error. I could not find...
0
2611
Saii
by: Saii | last post by:
How can we pass a perl array to stored procedure in Oracle. The parameter I am using in Oracle is type of table of varchar(500). I am using the system command in perl to execute the procedure Sample: system("sqlplus -S $user_det_orcl <<EOF \n "."whenever sqlerror exit failure; \n"."exec p_test('\@array\');\n"."exit;\n"."EOF\n" ); When I use the above notation, Oracle gives an error about the parameter that parameters types dont match....
0
9001
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
9583
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...
1
9342
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8263
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...
0
6081
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
4716
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...
0
4888
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3323
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
3
2226
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.