dbTalk Databases Forums  

How see Select statement ...

sybase.public.sqlanywhere.general sybase.public.sqlanywhere.general


Discuss How see Select statement ... in the sybase.public.sqlanywhere.general forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Nicola Cisternino
 
Posts: n/a

Default How see Select statement ... - 04-27-2006 , 07:24 AM






Hi all,
I'm using ASA 9.0.1.
How I can see (using Sybase Central) or log ANY sql statement (SELECT
query too ....) is executed from ASA engine ?
Thanks.

Reply With Quote
  #2  
Old   
Paul Horan[TeamSybase]
 
Posts: n/a

Default Re: How see Select statement ... - 04-27-2006 , 08:25 AM






This will write all sql statements processed to a text file:

call sa_server_option( 'request_level_logging', 'SQL' );
call sa_server_option( 'request_level_log_file', 'c:\theLogFile.txt' );

Then turn it off with:
call sa_server_option( 'request_level_logging', 'none' );
call sa_server_option( 'request_level_log_file', '' );

--
Paul Horan[TeamSybase]
Cynergy Systems
www.cynergysystems.com

"Nicola Cisternino" <ncister (AT) cointa (DOT) it> wrote

Quote:
Hi all,
I'm using ASA 9.0.1.
How I can see (using Sybase Central) or log ANY sql statement (SELECT
query too ....) is executed from ASA engine ?
Thanks.



Reply With Quote
  #3  
Old   
Greg Fenton
 
Posts: n/a

Default Re: How see Select statement ... - 04-27-2006 , 01:24 PM



Nicola Cisternino wrote:
Quote:
How I can see (using Sybase Central) or log ANY sql statement (SELECT
query too ....) is executed from ASA engine ?
As an alternative to Paul's response, from Sybase Central:

1. right click the server icon
2. select "Properties"
3. click the "Options" tab
4. check "Enable request logging"
5. enter the path to a log file
6. click "OK"

You can analyse the log file after it has accumulated SQL statements
using the stored procedures sa_get_request_profile() and
sa_get_request_times().

In the SQL Anywhere 9.x online docs, see:

ASA SQL User's Guide
Monitoring and Improving Performance
Performance analysis tools
- Request logging

Hope this helps,
greg.fenton
--
Greg Fenton
Consultant, Solution Services, iAnywhere Solutions
--------
Visit the iAnywhere Solutions Developer Community
Whitepapers, TechDocs, Downloads
http://www.ianywhere.com/developer/


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.