Up Prev Next
From: Michael Peppler <mpeppler at MBAY dot NET>
Subject: RE: return only a subset of a result
Date: May 22 1998 2:21PM
Phil Groce writes:
> use Sybase::CTLib;
> $dbh = new Sybase::CTLib 'user', 'pass', 'server';
> $dbh->ct_sql('set rowcount 10');
> $dbh->ct_execute('your query here');
You can also use ct_option() to set the rowcount (and other SET
$dbh->ct_option(CS_SET, CS_ROW_COUNT, 10, CS_INT_TYPE);
> What's really fun is playing with 'set showplan on' and other diagnostics.
> Has anyone experimented with DBCC's thru Sybperl? (Not something I'd
> personally try except on a test box, incidentally....)
The latest sybperl release (2.09_04) has a dbcc.pl script (in the eg/
directory) which runs checkdb, chackalloc and checkcatalog. It mails
any error messages back to the user, and stores the full log of the
session in a file. I've found that script to be quite usefull.
Michael Peppler -||- Data Migrations Inc.
firstname.lastname@example.org -||- http://www.mbay.net/~mpeppler
Int. Sybase User Group -||- http://www.isug.com