|
|
sybperl-l Archive
Up Prev Next
From: Michael Peppler <mpeppler at peppler dot org>
Subject: Re: capturing sp_showplan output
Date: Sep 4 2001 11:49PM
Jason_Price@cargill.com writes:
> I'm trying to figure out how to capture the sp_showplan output from
> within sybperl. The only thing I seem to be able to capture is a
> return value. Using my usual methods to verify output
> (ct_sql("sp_showplan , null, null, null", sub {print @_})), I
> still just get the return value of 0.
>
> Obviously, showplan does not print to STDOUT or STDERR. Does anyone
> know of a way I can capture this output?
As Steven said - sp_showplan (and a lot of other utility calls in
Sybase) return their information via the server callback handler (or
the message handler, for DBlibrary).
You need to create an ad-hoc server callback handler that captures and
prints out the appropriate information.
Michael
--
Michael Peppler - Data Migrations Inc. - http://www.mbay.net/~mpeppler
mpeppler@peppler.org - mpeppler@mbay.net
International Sybase User Group - http://www.isug.com
|