cancel
Showing results for 
Search instead for 
Did you mean: 

ASA whether there is like SQL event viewer!

ximen
Participant
0 Kudos
2,033

How do I open and operating and save the client software passed the query in order to track!

Accepted Solutions (0)

Answers (1)

Answers (1)

MarkCulp
Participant

I think you are asking for a way to see what queries the client sends to the server?

If this is correct then you should take a look at Request Logging in the documentation. To get started, add

-zr all -zo somefile.txt

to your server command line, then run your client application, and when done shutdown your server and take a look at the contents of somefile.txt.

You could also use Diagnostic Tracing if you are using SQLA 16.

If your client interface is ODBC on Windows then you could just turn on ODBC's TRACING capability.

HTH

Breck_Carter
Participant

To answer confusion with certainty the Jedi way this is not, in this forum a danger there is of losing what sanity remains 🙂

VolkerBarth
Contributor

I'd say Mark's semantical analysis of this question is way beyond my abilities (and my willingness):)

Breck_Carter
Participant

Be a badge for posting a question written like Yoda speaks, there should. Hmmmmmm. - translated by Google

Former Member
0 Kudos

To add to Mark's request logging suggestions, here some SQL that may do the trick :

-- connect to the datbase with dbisql and run -- to start request logging for all connections

CALL dbo.sa_server_option( 'RequestFilterConn', -1 );

CALL dbo.sa_server_option( 'RequestFilterDB', -1 );

CALL dbo.sa_server_option( 'RequestLogFile', 'C:UsersPublicDocumentsreq.log' );

CALL dbo.sa_server_option( 'RequestLogNumFiles', 0 );

CALL dbo.sa_server_option( 'RequestLogging', 'all' );

-- run your application .. e.g..

select * from sysobjects;

-- stop request logging

CALL dbo.sa_server_option( 'RequestFilterConn', -1 );

CALL dbo.sa_server_option( 'RequestFilterDB', -1 );

CALL dbo.sa_server_option( 'RequestLogging', 'none' );

CALL dbo.sa_server_option( 'RequestFilterConn', -1 );

CALL dbo.sa_server_option( 'RequestFilterDB', -1 );

CALL dbo.sa_server_option( 'RequestLogFile', '' );

-- import request log file into global temp tables for analysis

call sa_get_request_times('C:UsersPublicDocumentsreq.log');

call sa_get_request_profile('C:UsersPublicDocumentsreq.log');

-- review request log order by the the time it took

select * From satmp_request_time order by millisecs desc;

-- see if there was any blocking

select * From satmp_request_block;

-- list host variables

select * from satmp_request_hostvar;

-- also check aggregate view on queries with their averages etc..

select * From satmp_request_profile;