Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the DBD-Oracle CPAN distribution.

Report information
The Basics
Id: 76269
Status: resolved
Priority: 0/
Queue: DBD-Oracle

People
Owner: Nobody in particular
Requestors: norbert.debes [...] oradbpro.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 1.45_00



Subject: TAF with DBD:Oracle - no way to stop retrying reconnects?
Date: Tue, 03 Apr 2012 12:50:08 +0200
To: "DBD:" [...] relay01.alfahosting-server.de:Oracle Bug <bug-DBD-Oracle [...] rt.cpan.org>
From: Norbert Debes <norbert.debes [...] oradbpro.com>
Hi DBD:Oracle team, I have run some tests with TAF in DBD::Oracle with a TAF callback handler. What I'm missing is some feature to limit the number of reconnection retries. The program retries forever, no matter what the return code of the TAF callback is. It looks like there should be an additional parameter*taf_retries* that limits the number of reconnect attempts. According to Oracle® Database PL/SQL Packages and Types Reference 11g Release 2 (11.2) E10577-05 December 2009: If a TAF callback has been registered, then the failover retries and failover delay are ignored. If an error occurs, TAF will continue to re-attempt the connect and authentication as long as the callback returns a value of OCI_FO_RETRY. Any delay should be coded into the callback logic. So the RETRIES set for the service on the server-side using DBMS_SERVICE are ignored. Another problem: the value 15 that I passed for taf_sleep is ignored. Instead a 5 second sleep is always used. By the way the example TAF handler provided in the DBD::Oracle doc did not work for me. I had to change ora_taf_function=>'handle_taf' to ora_taf_function=>'main::handle_taf' Does this reproduce in other environments? Could it be that the return value from the TAF handler is ignored? It should be possible to return a value that stops any further reconnect attempts. Unfortunately even the Oracle® Call Interface Programmer's Guide 11g Release 2 (11.2) E10646-04 does not say what value to return in order to stop reconnect attempts (or I could not find the information). I'll attach the source file that I used. I tested with this service that has server-side TAF settings (such that EZConnect can be used on the client-side): begin dbms_service.create_service( SERVICE_NAME => 'PLMON', NETWORK_NAME => 'PLMON', FAILOVER_METHOD => 'BASIC', FAILOVER_TYPE => 'SESSION', FAILOVER_RETRIES => 1440, FAILOVER_DELAY => 60 ); end; / exec dbms_service.start_service('PLMON', dbms_service.all_instances); begin dbms_service.modify_service( SERVICE_NAME => 'PLMON', FAILOVER_METHOD => 'BASIC', FAILOVER_TYPE => 'SESSION', FAILOVER_RETRIES => 4, FAILOVER_DELAY => 15 ); end; / -- this triggers failover: exec dbms_service.stop_service('PLMON', dbms_service.all_instances); exec dbms_service.disconnect_session('PLMON', dbms_service.immediate); PS: E:\home\ndebes\it\perl>perl taf.pl audsid=1162169 update and commit complete audsid=1162169 update and commit complete Instance Unavailable Please stand by!! Your TAF type is SESSION 3.4.2012 12:27:20 Failover error - sleeping ... Failover aborted. Failover will not take place. DBD::Oracle::db prepare failed: ORA-03113: end-of-file on communication channel Process ID: 22192 Session ID: 72 Serial number: 63 (DBD ERROR: OCIStmtExecute/Describe) [for Statement "SELECT userenv('sessionid') FROM dual"] at taf.pl line 108. ORA-03113: end-of-file on communication channel Process ID: 22192 Session ID: 72 Serial number: 63 (DBD ERROR: OCIStmtExecute/Describe) audsid=1162170 update and commit complete audsid=1162170 update and commit complete

Message body is not shown because sender requested not to inline it.

Message body is not shown because sender requested not to inline it.

From: byterock [...] hotmail.com
Just some quick notes on this. I will look into in more detail later. I did notice you have an 'update' in your .pl code. It is my understanding that TAF will only work with selects. Inset delete and updates cannot cannot failover and restart, perhaps that is what is causing your greif. A max attepmts looks like a good idea. But you could just set this up in perl as well and exit out of the callback?? Any way will get some time tonight. Cheers John
Subject: Re: [rt.cpan.org #76269] TAF with DBD:Oracle - no way to stop retrying reconnects?
Date: Tue, 03 Apr 2012 14:35:58 +0200
To: bug-DBD-Oracle [...] rt.cpan.org
From: Norbert Debes <norbert.debes [...] oradbpro.com>
Hi John, TAF can - under certain circumstances and without guarantee - replay SELECT statements. I did not even configure that since I used FAILOVER_TYPE => 'SESSION'. All I set up with DBMS_SERVICE was to reestablish the connection. The problem is that the callback function runs indefinitely as long as the reconnect fails. It never returns control to the main program. Testcase: Show quoted text
SQL> create and start a TAF enabled service using SQL*Plus and user with
role DBA: begin dbms_service.create_service( SERVICE_NAME => 'PLMON', NETWORK_NAME => 'PLMON', FAILOVER_METHOD => 'BASIC', FAILOVER_TYPE => 'SESSION', FAILOVER_RETRIES => 1440, FAILOVER_DELAY => 60 ); end; / Show quoted text
SQL> exec dbms_service.start_service('PLMON', dbms_service.all_instances);
Run taf.pl: E:\home\ndebes\it\perl>perl taf.pl audsid=1162204 update and commit complete audsid=1162204 update and commit complete audsid=1162204 update and commit complete audsid=1162204 update and commit complete audsid=1162204 update and commit complete audsid=1162204 update and commit complete audsid=1162204 update and commit complete audsid=1162204 update and commit complete audsid=1162204 update and commit complete audsid=1162204 update and commit complete audsid=1162204 update and commit complete audsid=1162204 update and commit complete audsid=1162204 update and commit complete audsid=1162204 update and commit complete audsid=1162204 update and commit complete shut down the service and disconnect all sessions that use it: Show quoted text
SQL> exec dbms_service.stop_service('PLMON', dbms_service.all_instances); SQL> exec dbms_service.disconnect_session('PLMON', dbms_service.immediate);
At this point the TAF handler retries forever as long as I don't restart the service. That's a problem, since my program needs to return to the main code within 60 seconds - with or without a valid connection. Instance Unavailable Please stand by!! Your TAF type is SESSION 3.4.2012 14:25:47 Failover error - sleeping ... 3.4.2012 14:25:52 Failover error - sleeping ... 3.4.2012 14:25:58 Failover error - sleeping ... 3.4.2012 14:26:03 Failover error - sleeping ... 3.4.2012 14:26:08 Failover error - sleeping ... 3.4.2012 14:26:13 Failover error - sleeping ... 3.4.2012 14:26:18 Failover error - sleeping ... 3.4.2012 14:26:23 Failover error - sleeping ... 3.4.2012 14:26:28 Failover error - sleeping ... 3.4.2012 14:26:33 Failover error - sleeping ... 3.4.2012 14:26:38 Failover error - sleeping ... 3.4.2012 14:26:43 Failover error - sleeping ... 3.4.2012 14:26:49 Failover error - sleeping ... 3.4.2012 14:26:54 Failover error - sleeping ... 3.4.2012 14:26:59 Failover error - sleeping ... 3.4.2012 14:27:04 Failover error - sleeping ... 3.4.2012 14:27:09 Failover error - sleeping ... 3.4.2012 14:27:14 Failover error - sleeping ... 3.4.2012 14:27:19 Failover error - sleeping ... 3.4.2012 14:27:24 Failover error - sleeping ... 3.4.2012 14:27:29 Failover error - sleeping ... 3.4.2012 14:27:34 Failover error - sleeping ... 3.4.2012 14:27:39 Failover error - sleeping ... 3.4.2012 14:27:44 Failover error - sleeping ... 3.4.2012 14:27:49 Failover error - sleeping ... 3.4.2012 14:27:55 Failover error - sleeping ... 3.4.2012 14:28:00 Failover error - sleeping ... 3.4.2012 14:28:05 Failover error - sleeping ... 3.4.2012 14:28:10 Failover error - sleeping ... 3.4.2012 14:28:15 Failover error - sleeping ... 3.4.2012 14:28:20 Failover error - sleeping ... 3.4.2012 14:28:25 Failover error - sleeping ... 3.4.2012 14:28:30 Failover error - sleeping ... 3.4.2012 14:28:35 Failover error - sleeping ... 3.4.2012 14:28:40 Failover error - sleeping ... 3.4.2012 14:28:45 Failover error - sleeping ... 3.4.2012 14:28:50 Failover error - sleeping ... 3.4.2012 14:28:56 Failover error - sleeping ... 3.4.2012 14:29:01 Failover error - sleeping ... 3.4.2012 14:29:06 Failover error - sleeping ... 3.4.2012 14:29:11 Failover error - sleeping ... 3.4.2012 14:29:16 Failover error - sleeping ... 3.4.2012 14:29:21 Failover error - sleeping ... 3.4.2012 14:29:26 Failover error - sleeping ... 3.4.2012 14:29:31 Failover error - sleeping ... 3.4.2012 14:29:36 Failover error - sleeping ... 3.4.2012 14:29:41 As you can see from the console output control never returned from the TAF handler. If it had either "user error handler" would have been printed or some other message from within the for loop. If you know of a way to stop the TAF handler from looping then please let me know what exactly it is. Also please check whether the return code of the TAF handler can be used to stop reconnect attempts - as Oracle designed it to be. I doubt that this is the case. If you use Skype I could demo the process to you but I suppose it is clear. Mit freundlichen Grüßen/Kind regards Norbert Debes Hinweis: Kontaktdaten s. angehängte vcard/Note: contact information in attached vcard On 4/3/2012 13:57, John Scoles via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=76269> > > Just some quick notes on this. I will look into in more detail later. > > I did notice you have an 'update' in your .pl code. It is my > understanding that TAF will only work with selects. Inset delete and > updates cannot cannot failover and restart, perhaps that is what is > causing your greif. > > A max attepmts looks like a good idea. But you could just set this up > in perl as well and exit out of the callback?? > > Any way will get some time tonight. > > Cheers > John > > > > >

Message body is not shown because sender requested not to inline it.

RT-Send-CC: byterock [...] hotmail.com
Hi, Bear in mind I don't use TAF and never have so what follows could be nonesense but I think John was saying it is up to you what happens after the handler is called (BUT see below). DBD::Oracle registers an internal function with Oracle to be called for the callback and in that it calls your registered function. The DBD::Oracle wrapper is as follows: /* TAF or Transparent Application Failoever callback Works like this. The fuction below is registered on the server, when the server is set up to use it, when an exe is called (not sure about other server round trips) and the server fails tt should get into this cbk error below. It will wait X seconds and then try to reconnect (up to n times if that is the users choice) That is how I see it working */ sb4 taf_cbk(dvoid *svchp, dvoid *envhp, dvoid *fo_ctx,ub4 fo_type, ub4 fo_event ) { dTHX; taf_callback_t *cb =(taf_callback_t*)fo_ctx; dSP; PUSHMARK(SP); XPUSHs(sv_2mortal(newSViv(fo_event))); XPUSHs(sv_2mortal(newSViv(fo_type))); PUTBACK; call_pv(cb->function, G_DISCARD); switch (fo_event){ case OCI_FO_BEGIN: case OCI_FO_ABORT: case OCI_FO_END: case OCI_FO_REAUTH: { break; } case OCI_FO_ERROR: { sleep(cb->sleep); return OCI_FO_RETRY; break; } default: { break; } } return 0; } As far as I can tell from reading http://www.csee.umbc.edu/portal/help/oracle8/server.815/a67846/new_adva.htm if you get an OCI_FO_ERROR you return OCI_FO_RETRY to retry which the code above always seems to do. I presume if you return 0 it stops retrying (could not specifically find that in the above link). There does not seem to be a way for the users registered handler to say to DBD::Oracle, I don't want to retry. I think it would be fairly simple to add this functonality so suggestions welcome. Martin -- Martin J. Evans Wetherby, UK
Subject: Re: [rt.cpan.org #76269] TAF with DBD:Oracle - no way to stop retrying reconnects?
Date: Sun, 22 Apr 2012 16:38:07 +0200
To: bug-DBD-Oracle [...] rt.cpan.org
From: Norbert Debes <norbert.debes [...] oradbpro.com>
Hi Martin, the TAF handler definitely needs to give the Perl programmer a chance to stop retrying. In my view the decision whether to retry or not should be made in the Perl TAF handler and not hard coded in Perl C code. So the return code of the Perl TAF handler should be taken into account. According to my tests it is ignored. I would expect a Perl TAF handler to have the same choices as a C TAF handler that is used directly with OCI. Can you fix this? Mit freundlichen Grüßen/Kind regards Norbert Debes Hinweis: Kontaktdaten s. angehängte vcard/Note: contact information in attached vcard On 4/22/2012 11:32, Martin J Evans via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=76269> > > Hi, > > Bear in mind I don't use TAF and never have so what follows could be > nonesense but I think John was saying it is up to you what happens after > the handler is called (BUT see below). DBD::Oracle registers an internal > function with Oracle to be called for the callback and in that it calls > your registered function. The DBD::Oracle wrapper is as follows: > > /* TAF or Transparent Application Failoever callback > Works like this. The fuction below is registered on the server, > when the server is set up to use it, when an exe is called (not sure > about other server round trips) > and the server fails tt should get into this cbk error below. > It will wait X seconds and then try to reconnect (up to n times if > that is the users choice) > That is how I see it working */ > > sb4 > taf_cbk(dvoid *svchp, dvoid *envhp, dvoid *fo_ctx,ub4 fo_type, ub4 > fo_event ) > { > dTHX; > taf_callback_t *cb =(taf_callback_t*)fo_ctx; > > dSP; > PUSHMARK(SP); > XPUSHs(sv_2mortal(newSViv(fo_event))); > XPUSHs(sv_2mortal(newSViv(fo_type))); > PUTBACK; > call_pv(cb->function, G_DISCARD); > > switch (fo_event){ > > case OCI_FO_BEGIN: > case OCI_FO_ABORT: > case OCI_FO_END: > case OCI_FO_REAUTH: > { > break; > } > case OCI_FO_ERROR: > { > sleep(cb->sleep); > return OCI_FO_RETRY; > break; > } > > default: > { > break; > } > } > return 0; > } > > As far as I can tell from reading > http://www.csee.umbc.edu/portal/help/oracle8/server.815/a67846/new_adva.htm > if you get an OCI_FO_ERROR you return OCI_FO_RETRY to retry which the > code above always seems to do. I presume if you return 0 it stops > retrying (could not specifically find that in the above link). There > does not seem to be a way for the users registered handler to say to > DBD::Oracle, I don't want to retry. > > I think it would be fairly simple to add this functonality so > suggestions welcome. > > Martin

Message body is not shown because sender requested not to inline it.

On Sun Apr 22 10:38:25 2012, norbert.debes@oradbpro.com wrote: Show quoted text
> Hi Martin, > > the TAF handler definitely needs to give the Perl programmer a chance > to > stop retrying. In my view the decision whether to retry or not should > be > made in the Perl TAF handler and not hard coded in Perl C code. So the > return code of the Perl TAF handler should be taken into account. > According to my tests it is ignored.
It is ignored - that is the code I showed you. Show quoted text
> I would expect a Perl TAF handler > to have the same choices as a C TAF handler that is used directly with > OCI. > > Can you fix this?
Yes assuming we decide what the fix is. I could change it to work based on what the your perl taf handler returns but I cannot test it so you'd have to do that. Can you install DBD::Oracle from source? Is so, I'll have a go later today/tomorrow. If you cannot test it I'm loathe to change it as I cannot test it. Martin -- Martin J. Evans Wetherby, UK
On Sun Apr 22 10:46:24 2012, MJEVANS wrote: Show quoted text
> On Sun Apr 22 10:38:25 2012, norbert.debes@oradbpro.com wrote:
> > Hi Martin, > > > > the TAF handler definitely needs to give the Perl programmer a chance > > to > > stop retrying. In my view the decision whether to retry or not should > > be > > made in the Perl TAF handler and not hard coded in Perl C code. So the > > return code of the Perl TAF handler should be taken into account. > > According to my tests it is ignored.
> > It is ignored - that is the code I showed you. >
> > I would expect a Perl TAF handler > > to have the same choices as a C TAF handler that is used directly with > > OCI. > > > > Can you fix this?
> > Yes assuming we decide what the fix is. I could change it to work based > on what the your perl taf handler returns but I cannot test it so you'd > have to do that. Can you install DBD::Oracle from source? Is so, I'll > have a go later today/tomorrow. If you cannot test it I'm loathe to > change it as I cannot test it. > > Martin
Get the version of DBD::Oracle from subversion trunk - see the pod for how to do this. Try applying the following patch and then return OCI_FO_RETRY ONLY when you want to retry. Index: oci8.c =================================================================== --- oci8.c (revision 15285) +++ oci8.c (working copy) @@ -1308,6 +1308,8 @@ taf_cbk(dvoid *svchp, dvoid *envhp, dvoid *fo_ctx,ub4 fo_type, ub4 fo_event ) { dTHX; + int return_count; + int ret; taf_callback_t *cb =(taf_callback_t*)fo_ctx; dSP; @@ -1315,8 +1317,15 @@ XPUSHs(sv_2mortal(newSViv(fo_event))); XPUSHs(sv_2mortal(newSViv(fo_type))); PUTBACK; - call_pv(cb->function, G_DISCARD); + return_count = call_pv(cb->function, G_SCALAR); + SPAGAIN; + + if (return_count != 1) + croak("Expected one scalar back from taf handler"); + + ret = POPi; + switch (fo_event){ case OCI_FO_BEGIN: @@ -1328,8 +1337,10 @@ } case OCI_FO_ERROR: { - sleep(cb->sleep); - return OCI_FO_RETRY; + if (ret == OCI_FO_RETRY) { + sleep(cb->sleep); + return OCI_FO_RETRY; + } break; } @@ -1338,6 +1349,8 @@ break; } } + PUTBACK; + return 0; } Martin -- Martin J. Evans Wetherby, UK
Forgot to say. If the patch does not work you can find me on irc.perl.org in #dbi, nick mje (or mje_ or mje__) and I'll try and work through it with you. Best I can do since I don't have TAF support. Martin -- Martin J. Evans Wetherby, UK
On Tue Apr 03 06:51:12 2012, norbert.debes@oradbpro.com wrote: Show quoted text
> Hi DBD:Oracle team,
Show quoted text
> Another problem: the value 15 that I passed for taf_sleep is ignored. > Instead a 5 second sleep is always used.
I cannot see how this is happening. The code looks correct. Here is a slightly different patch which also logs the taf_sleep value when tracing is enabled e.g., set ora_verbose = 6: Martin -- Martin J. Evans Wetherby, UK
Subject: x.patch
Index: oci8.c =================================================================== --- oci8.c (revision 15285) +++ oci8.c (working copy) @@ -1308,6 +1308,8 @@ taf_cbk(dvoid *svchp, dvoid *envhp, dvoid *fo_ctx,ub4 fo_type, ub4 fo_event ) { dTHX; + int return_count; + int ret; taf_callback_t *cb =(taf_callback_t*)fo_ctx; dSP; @@ -1315,8 +1317,15 @@ XPUSHs(sv_2mortal(newSViv(fo_event))); XPUSHs(sv_2mortal(newSViv(fo_type))); PUTBACK; - call_pv(cb->function, G_DISCARD); + return_count = call_pv(cb->function, G_SCALAR); + SPAGAIN; + + if (return_count != 1) + croak("Expected one scalar back from taf handler"); + + ret = POPi; + switch (fo_event){ case OCI_FO_BEGIN: @@ -1328,8 +1337,10 @@ } case OCI_FO_ERROR: { - sleep(cb->sleep); - return OCI_FO_RETRY; + if (ret == OCI_FO_RETRY) { + sleep(cb->sleep); + return OCI_FO_RETRY; + } break; } @@ -1338,6 +1349,8 @@ break; } } + PUTBACK; + return 0; } Index: lib/DBD/Oracle.pm =================================================================== --- lib/DBD/Oracle.pm (revision 15283) +++ lib/DBD/Oracle.pm (working copy) @@ -1413,6 +1413,8 @@ #import the ora fail over constants #set up TAF on the connection + # NOTE since DBD::Oracle uses call_pv you may need to pass a full + # name space as the function e.g., 'main::handle_taf' my $dbh = DBI->connect('dbi:Oracle:XE','hr','hr',{ora_taf=>1,taf_sleep=>5,ora_taf_function=>'handle_taf'}); #create the perl TAF event function Index: dbdimp.c =================================================================== --- dbdimp.c (revision 15283) +++ dbdimp.c (working copy) @@ -487,7 +487,6 @@ imp_dbh->taf_sleep = 5; /* 5 second default */ DBD_ATTRIB_GET_IV( attr, "ora_taf_sleep", 13, svp, imp_dbh->taf_sleep); - if ((svp=DBD_ATTRIB_GET_SVP(attr, "ora_taf_function", 16)) && SvOK(*svp)) { STRLEN svp_len; if (!SvPOK(*svp)) @@ -495,6 +494,11 @@ imp_dbh->taf_function = (char *) SvPV (*svp, svp_len ); } + if (DBIc_DBISTATE(imp_dbh)->debug || dbd_verbose >= 3) + PerlIO_printf( + DBIc_LOGPIO(imp_dbh), + "taf sleep = %d, taf_function = %s\n", + imp_dbh->taf_sleep, imp_dbh->taf_function ? imp_dbh->taf_function : ""); } imp_dbh->server_version = 0;
Subject: Re: [rt.cpan.org #76269] TAF with DBD:Oracle - no way to stop retrying reconnects?
Date: Mon, 23 Apr 2012 15:18:35 +0200
To: bug-DBD-Oracle [...] rt.cpan.org
From: Norbert Debes <norbert.debes [...] oradbpro.com>
Hi Martin, no, I can't build Perl and DBD::Oracle. Currently at least. But I guess I could give you access to an Oracle Instance on my Laptop for testing. Of course I may fail opening the Windows firewall for you. Never tried something like that. On the other hand it should not be hard to do. Mit freundlichen Grüßen/Kind regards Norbert Debes Hinweis: Kontaktdaten s. angehängte vcard/Note: contact information in attached vcard On 4/22/2012 16:46, Martin J Evans via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=76269> > > On Sun Apr 22 10:38:25 2012, norbert.debes@oradbpro.com wrote:
>> Hi Martin, >> >> the TAF handler definitely needs to give the Perl programmer a chance >> to >> stop retrying. In my view the decision whether to retry or not should >> be >> made in the Perl TAF handler and not hard coded in Perl C code. So the >> return code of the Perl TAF handler should be taken into account. >> According to my tests it is ignored.
> It is ignored - that is the code I showed you. >
>> I would expect a Perl TAF handler >> to have the same choices as a C TAF handler that is used directly with >> OCI. >> >> Can you fix this?
> Yes assuming we decide what the fix is. I could change it to work based > on what the your perl taf handler returns but I cannot test it so you'd > have to do that. Can you install DBD::Oracle from source? Is so, I'll > have a go later today/tomorrow. If you cannot test it I'm loathe to > change it as I cannot test it. > > Martin

Message body is not shown because sender requested not to inline it.

Subject: Re: [rt.cpan.org #76269] TAF with DBD:Oracle - no way to stop retrying reconnects?
Date: Mon, 23 Apr 2012 15:23:40 +0200
To: bug-DBD-Oracle [...] rt.cpan.org
From: Norbert Debes <norbert.debes [...] oradbpro.com>
Hi Martin, if you have an installation with Oracle Personal Edition or Enterprise Edition then TAF will be usable. Contrary to what some believe you don't need RAC to use TAF. This PL/SQL Code creates a TAF-enabled service in Oracle EE: begin dbms_service.create_service( SERVICE_NAME => 'PLMON', NETWORK_NAME => 'PLMON', FAILOVER_METHOD => 'BASIC', FAILOVER_TYPE => 'SESSION', FAILOVER_RETRIES => 1440, FAILOVER_DELAY => 60 ); end; / exec dbms_service.start_service('PLMON', dbms_service.all_instances); You can then connect with service_name=plmon.<db_domain> where db_domain is the value of the Oracle initialization parameter db_domain (omit angle brackets of course). Mit freundlichen Grüßen/Kind regards Norbert Debes Hinweis: Kontaktdaten s. angehängte vcard/Note: contact information in attached vcard On 4/22/2012 17:24, Martin J Evans via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=76269> > > Forgot to say. If the patch does not work you can find me on > irc.perl.org in #dbi, nick mje (or mje_ or mje__) and I'll try and work > through it with you. Best I can do since I don't have TAF support. > > Martin

Message body is not shown because sender requested not to inline it.

On Mon Apr 23 09:19:52 2012, norbert.debes@oradbpro.com wrote: Show quoted text
> Hi Martin, > > no, I can't build Perl and DBD::Oracle. Currently at least. But I > guess > I could give you access to an Oracle Instance on my Laptop for > testing. > Of course I may fail opening the Windows firewall for you. Never tried > something like that. On the other hand it should not be hard to do.
You don't need to build Perl. How did you install DBD::Oracle? Martin -- Martin J. Evans Wetherby, UK
Subject: Re: [rt.cpan.org #76269] TAF with DBD:Oracle - no way to stop retrying reconnects?
Date: Mon, 23 Apr 2012 17:48:30 +0200
To: bug-DBD-Oracle [...] rt.cpan.org
From: Norbert Debes <norbert.debes [...] oradbpro.com>
ActiveState Perl for Windows Mit freundlichen Grüßen/Kind regards Norbert Debes Hinweis: Kontaktdaten s. angehängte vcard/Note: contact information in attached vcard On 4/23/2012 17:14, Martin J Evans via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=76269> > > On Mon Apr 23 09:19:52 2012, norbert.debes@oradbpro.com wrote:
>> Hi Martin, >> >> no, I can't build Perl and DBD::Oracle. Currently at least. But I >> guess >> I could give you access to an Oracle Instance on my Laptop for >> testing. >> Of course I may fail opening the Windows firewall for you. Never tried >> something like that. On the other hand it should not be hard to do.
> You don't need to build Perl. > > How did you install DBD::Oracle? > > Martin

Message body is not shown because sender requested not to inline it.

On Mon Apr 23 11:52:05 2012, norbert.debes@oradbpro.com wrote: Show quoted text
> ActiveState Perl for Windows >
Then you can use MinGW which you can install from ActiveState - to build a local DBD::Oracle but not install it. I could send you a complete zip file of the distribution with changes. Martin -- Martin J. Evans Wetherby, UK
On Sun Apr 22 11:41:45 2012, MJEVANS wrote: Show quoted text
> On Tue Apr 03 06:51:12 2012, norbert.debes@oradbpro.com wrote:
> > Hi DBD:Oracle team,
>
> > Another problem: the value 15 that I passed for taf_sleep is
ignored. Show quoted text
> > Instead a 5 second sleep is always used.
> > I cannot see how this is happening. The code looks correct. Here is a > slightly different patch which also logs the taf_sleep value when > tracing is enabled e.g., set ora_verbose = 6: > > Martin
The attribute is ora_taf_sleep not taf_sleep. I have fixed the example. Martin -- Martin J. Evans Wetherby, UK
This is now fixed in subversion trunk. There were 2 problems. 1) example used taf_sleep and it should have been ora_taf_sleep. 2) there was no way to stop retrying the TAF event. Now, if you want to retry you need to return OCI_FO_RETRY from your handler. I can package this up into a zip for you. You CAN install it with ActiveState because ActiveState comes with the MinGW package which allows you to build a Perl module. ppm install MinGW unzip DBD::Oracle (which I'll send you on request) cd DBD-Oracle-1.44 (or whatever it is when I send you it) cpan . Thanks for the report and bearing with me whilst I tried to get my head around it. Martin -- Martin J. Evans Wetherby, UK