I've run into a bit of a snag using an 'alter session' command with 
DBI/DBD::Oracle.

Perl 5.6.1
DBI 1.32
DBD::Oracle 1.12
Oracle 8.1.7.0
SuSE Linux 7.1

When the command 
'alter session set events '10046 trace name context forever, level 8'
is used from sqlplus, the result is an oracle trace file containing wait data.

This works with no problem.  It does not seem to be working from 
Perl and DBI however.  I've googles for similar problems and came
up empty.

Here's a relevant test case

....
$dbh->do(q{alter session set events '10046 trace name context forever, level 
8'});
$dbh->disconnect;
....

This should generate an Oracle trace file, but I get nothing.

Here's a level 5 DBI trace:

============================================================
    DBI::db=HASH(0x81e7108) trace level set to 5 in DBI 1.32-nothread
    -> do in DBD::_::db for DBD::Oracle::db 
(DBI::db=HASH(0x8214680)~0x81e7108 'alter session set events '10046 trace 
name context forever1   -> prepare for DBD::Oracle::db 
(DBI::db=HASH(0x81e7108)~INNER 'alter session set events '10046 trace name 
context forever, level 8'' u    
dbih_setup_handle(DBI::st=HASH(0x82183e8)=>DBI::st=HASH(0x81f45b4), 
DBD::Oracle::st, 82183f4, Null!)
    dbih_make_com(DBI::db=HASH(0x81e7108), DBD::Oracle::st, 208) thr#(nil)
    dbih_setup_attrib(DBI::st=HASH(0x81f45b4), Err, DBI::db=HASH(0x81e7108)) 
SCALAR(0x81e7288) (already defined)
    dbih_setup_attrib(DBI::st=HASH(0x81f45b4), State, 
DBI::db=HASH(0x81e7108)) SCALAR(0x817be8c) (already defined)
    dbih_setup_attrib(DBI::st=HASH(0x81f45b4), Errstr, 
DBI::db=HASH(0x81e7108)) SCALAR(0x81e72ac) (already defined)
    dbih_setup_attrib(DBI::st=HASH(0x81f45b4), Debug, 
DBI::db=HASH(0x81e7108)) 5 (already defined)
    dbih_setup_attrib(DBI::st=HASH(0x81f45b4), FetchHashKeyName, 
DBI::db=HASH(0x81e7108)) 'NAME' (already defined)
    dbih_setup_attrib(DBI::st=HASH(0x81f45b4), HandleError, 
DBI::db=HASH(0x81e7108)) undef (not defined)
    dbd_st_prepare'd sql ALTER
    dbd_describe skipped for ALTER
1   <- prepare= DBI::st=HASH(0x82183e8) at 
/usr/local/lib/perl5/site_perl/5.6.1/i686-linux/DBI.pm line 1220 via ./x.pl 
line 61
    -> execute for DBD::Oracle::st (DBI::st=HASH(0x82183e8)~0x81f45b4)
    dbd_st_execute ALTER (out0, lob0)...
    dbd_st_execute ALTER returned (SUCCESS, rpc0, fn52, out0)
    <- execute= '0E0' at 
/usr/local/lib/perl5/site_perl/5.6.1/i686-linux/DBI.pm line 1221 via ./x.pl 
line 61
    -> rows for DBD::Oracle::st (DBI::st=HASH(0x82183e8)~0x81f45b4)
    <- rows= 0 at /usr/local/lib/perl5/site_perl/5.6.1/i686-linux/DBI.pm line 
1222 via ./x.pl line 61
    <- do= '0E0' at ./x.pl line 61
    -> DESTROY for DBD::Oracle::st (DBI::st=HASH(0x81f45b4)~INNER)
    <- DESTROY= undef at ./x.pl line 62
    -> disconnect for DBD::Oracle::db (DBI::db=HASH(0x8214680)~0x81e7108)
    <- disconnect= 1 at ./x.pl line 62
    -> DESTROY for DBD::Oracle::db (DBI::db=HASH(0x81e7108)~INNER)
    <- DESTROY= undef

============================================================
It appears to have executed successfully, but it really hasn't,

Thanks for any clues you can offer to this problem.

Jared


Reply via email to