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: Eli Perl <eperl at Bear dot COM>
Subject: Re: running dbcc via Sybperl
Date: Jul 24 1998 4:33PM

Michael:
isql/10.0.4/P-EBF7430/sun_svr4/SPARC Solaris 2.3/1/Wed Jul  9 23:18:54 PDT 1997
SQL Server/11.0.3.2/P/Sun_svr4/OS 5.4/SWR 7578 Rollup/OPT/Mon Nov  3 22:19:21 PST 1997

The script is a simple isql-like processor. It reads the input file which contains the T-SQL
I want to execute and either loops through the result table if there is one or the
message_handler takes over.
So when  my input.sql file contains 'sp_sysmon 5' it gives me exactly what I want, but 'dbcc
page (5, 23587)' returns nothing in the message handler output file. (I know that the page
is valid because it gives me what I want when I set TRACEON 3604 and then run it via isql.)
Do I have to turn 3604 on first?
Thanks for your help

Eli Perl


Michael Peppler wrote:

> Eli Perl writes:
>  > Thanks, but I am using the handler included in the sybperl distribution, and it works
>  > fine for everything else.
>
> What does your script do exactly?
>
> Also, what versions of Sybase (both server and OpenClient) do you use?
>
> Michael
>
>  >
>  > Raja Sambamurty wrote:
>  >
>  > > Eli,
>  > >
>  > > It works fine, except remember that all the non-select statements go the
>  > > the mesg/error handlers. So make sure that you have the handlers setup
>  > > in your perl script. I have a working version that I could share with
>  > > you, if you want.
>  > >
>  > > Raja
>  > > >
>  > > >All:
>  > > >
>  > > >When I try to run a dbcc page in a sybperl script, I get
>  > > >this error:
>  > > >
>  > > >'Sybase error: Attempt to print unknown token.'
>  > > >
>  > > >If I go in via ISQL and use TRACEON 3604 ro redirect the
>  > > >output (of the eact same dbcc page command) to my session,
>  > > >everything's fine. How can I do this in Sybperl?
>  > > >
>  > > >Eli Perl
>  > > >
>  > > >End
>  > > >
>  > > >
>  > > >
>  > > >
>  > > >***********************************************************************************
>  > > >Bear Stearns is not responsible for any recommendation, solicitation,
>  > > offer or
>  > > >agreement or any information about any transaction, customer account or
>  > > account
>  > > >activity contained in this communication.
>  > > >***********************************************************************************
>  > > >
>  > > >
>  > > >
>  > >
>  > > ______________________________________________________
>  > > Get Your Private, Free Email at http://www.hotmail.com
>  >
>  >
>  >
>  >
>  >
>  > ***********************************************************************************
>  > Bear Stearns is not responsible for any recommendation, solicitation, offer or
>  > agreement or any information about any transaction, customer account or account
>  > activity contained in this communication.
>  > ***********************************************************************************
>  >
>  >
>  >
>
> --
> Michael Peppler         -||-  Data Migrations Inc.
> mpeppler@mbay.net       -||-  http://www.mbay.net/~mpeppler
> Int. Sybase User Group  -||-  http://www.isug.com





***********************************************************************************
Bear Stearns is not responsible for any recommendation, solicitation, offer or
agreement or any information about any transaction, customer account or account
activity contained in this communication.
***********************************************************************************