Thanks for the answers. It has me on the right track, but I'm still having some growing pains. I created a new perl script that implements the "showplan" example from DBI::Sybase document. The problem is that I don't seem to get anything in $msg within the error handler. I get values in $err, $sev, $state, $line, $sql & $err_type. $server and $proc are undefined. $msg is blank. I experienced the same behaviour in a "dbcc checkdb" script I was working on earlier. I could post the "showplan" code if needed, but I'm pretty sure is functionally equivalent to the example. Thanks in advance. I hope it's not a RTFM problem. ;-)