PEPPLER.ORG
Michael Peppler
Sybase Consulting
Menu
Home
Sybase on Linux
Install Guide for Sybase on Linux
General Sybase Resources
General Perl Resources
Freeware
Sybperl
Sybase::Simple
DBD::Sybase
BCP Tool
Bug Tracker
Mailing List Archive
Downloads Directory
FAQs
Sybase on Linux FAQ
Sybperl FAQ
Personal
Michael Peppler's resume

sybperl-l Archive

Up    Prev    Next    

From: Michael Peppler <mpeppler at peppler dot org>
Subject: Re: newbie quest: trace sql from dbi::sybase
Date: Apr 22 2004 1:56PM

On Thu, 2004-04-22 at 15:18, fake name wrote:
> I'm trying to convert a very large CGI from dbi::mysql code to dbi::sybase 
> and am running into some SQL problems (as expected).
> 
> How can I easily print out all the sql being sent to the server?
> 
> I have used the showerrortext value for errors, but I want to see all the 
> SQL. I guess I can always use db audting as a last resort.

DBI->trace() should enable that at some level, although you'll get some
additional stuff. Try it with DBI->trace(1) and see if that is enough to
print the SQL.

Alternatively, run it through ribo if you don't want to enable auditing
on your server.

Michael
-- 
Michael Peppler                              Data Migrations, Inc.
mpeppler@peppler.org                       http://www.peppler.org/
Sybase T-SQL/OpenClient/OpenServer/C/Perl developer available for short
or long term contract positions - http://www.peppler.org/resume.html