http://www.perlmonks.org?node_id=220994


in reply to DBI and getting trigger info

$dbh = DBI->connect ( $dbname, $dbuser, $dbpass, $dbd);
I would connect with RaiseError set, then you wouldn't have to check every dbi call you make. (Sure, errors usually seem to happen on the connect's and prepare's, but you never know what might happen on execute or fetches also). Using RaiseError would mean that you can't use the above deprecated form of connect, and it should instead look like so:
$dbh = DBI->connect ( "dbi:$dbd:$dbname", $dbuser, $dbpass, {RaiseErro +r => 1});
Also I'd make sure the trigger is really there by executing the same SQL statement in sqlplus (but you knew that already, right?).

Update: And make sure that your connecting as the same user in both sqlplus and this perl script.

Replies are listed 'Best First'.
Re: DBI and getting trigger info
by rbc (Curate) on Dec 19, 2002 at 00:00 UTC

        The trigger text is longer than the default read buffer size. Add this before your prepare to get the entire trigger text.

        $dbh->{LongReadLen} = 65500;
        --- print map { my ($m)=1<<hex($_)&11?' ':''; $m.=substr('AHJPacehklnorstu',hex($_),1) } split //,'2fde0abe76c36c914586c';