From oracle-l-bounce@freelists.org Mon Sep 20 12:04:04 2004 Return-Path: Received: from air189.startdedicated.com (root@localhost) by orafaq.com (8.11.6/8.11.6) with ESMTP id i8KH43W28209 for ; Mon, 20 Sep 2004 12:04:03 -0500 X-ClientAddr: 206.53.239.180 Received: from turing.freelists.org (freelists-180.iquest.net [206.53.239.180]) by air189.startdedicated.com (8.11.6/8.11.6) with ESMTP id i8KH43I28204 for ; Mon, 20 Sep 2004 12:04:03 -0500 Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id A279072C891; Mon, 20 Sep 2004 12:10:03 -0500 (EST) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 25850-20; Mon, 20 Sep 2004 12:10:03 -0500 (EST) Received: from turing (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 157D972C4DF; Mon, 20 Sep 2004 12:10:03 -0500 (EST) Message-ID: Date: Mon, 20 Sep 2004 10:08:30 -0700 From: Jared Still To: mark.bobak@il.proquest.com Subject: Re: FW: Db ping function Cc: oracle-l@freelists.org In-Reply-To: <4C9B6FDA0B06FE4DAF5918BBF0AD82CF09660E89@bosmail00.bos.il.pqe> Mime-Version: 1.0 Content-type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 8bit References: <4C9B6FDA0B06FE4DAF5918BBF0AD82CF09660E89@bosmail00.bos.il.pqe> X-archive-position: 9778 X-ecartis-version: Ecartis v1.0.0 Sender: oracle-l-bounce@freelists.org Errors-To: oracle-l-bounce@freelists.org X-original-sender: jkstill@gmail.com Precedence: normal Reply-To: jkstill@gmail.com X-list: oracle-l X-Virus-Scanned: by amavisd-new at freelists.org > > FYI: select SYSDATE from DUAL /* ping */ is the method by which the > DBD::Oracle perl module checks to make sure it has a connection to the > database. It's not in our code -- it's in the perl DBI/DBD code! There > has > to be some way to disable it, because I'm pretty sure it's not > necessary. On Mon, 20 Sep 2004 12:31:31 -0400, Bobak, Mark wrote: > Ok, Perl experts....any thoughts/comments/suggestions on this one? > Any way to disable this? > The ping method is part of the DBI module, and does nothing. The driver method is used to over-ride it. Here is ping from DBD::Oracle: sub ping { my($dbh) = @_; my $ok = 0; eval { local $SIG{__DIE__}; local $SIG{__WARN__}; # we know that Oracle 7 prepare does a describe so this will # actually talk to the server and is this a valid and cheap test. my $sth = $dbh->prepare("select SYSDATE from DUAL /* ping */"); # But Oracle 8+ doesn't talk to server unless we describe the query $ok = $sth && $sth->FETCH('NUM_OF_FIELDS'); }; return ($@) ? 0 : $ok; } Obviously it does a select from dual. It is not called implicitly by the DBD::Oracle module though, so it *is* in their code, somewhere. Jared -- http://www.freelists.org/webpage/oracle-l