Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

tracing sql issued by one user ? ( ASA 9.02)

3 posts in General Discussion Last posting was on 2008-02-18 15:55:57.0Z
ps <ps Posted on 2008-02-18 10:10:10.0Z
From: ps <ps@.>
User-Agent: Thunderbird 2.0.0.9 (Windows/20071031)
MIME-Version: 1.0
Newsgroups: ianywhere.public.general
Subject: tracing sql issued by one user ? ( ASA 9.02)
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <47b95982$1@forums-1-dub>
Date: 18 Feb 2008 02:10:10 -0800
X-Trace: forums-1-dub 1203329410 10.22.241.152 (18 Feb 2008 02:10:10 -0800)
X-Original-Trace: 18 Feb 2008 02:10:10 -0800, vip152.sybase.com
Lines: 8
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:6720
Article PK: 4964

Hi,
I have checked the doc, but I cannot find a way to trace in a table or
in a file all the sql statements issued by one specific user. Is there a
way to do this on asa9? Is it possible to activate that behaviour
dynamically ( without starting/stopping the db ) ?
Thanks

Philip


Breck Carter [sqlanywhere.blogspot.com] Posted on 2008-02-18 14:35:44.0Z
From: "Breck Carter [sqlanywhere.blogspot.com]" <NOSPAM__breck.carter@gmail.com>
Newsgroups: ianywhere.public.general
Subject: Re: tracing sql issued by one user ? ( ASA 9.02)
Organization: RisingRoad Professional Services
Reply-To: NOSPAM__breck.carter@gmail.com
Message-ID: <fs5jr35ubtn0d8dvs5njcrmaqtjnfb0dfs@4ax.com>
References: <47b95982$1@forums-1-dub>
X-Newsreader: Forte Agent 2.0/32.640
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Date: 18 Feb 2008 06:35:44 -0800
X-Trace: forums-1-dub 1203345344 10.22.241.152 (18 Feb 2008 06:35:44 -0800)
X-Original-Trace: 18 Feb 2008 06:35:44 -0800, vip152.sybase.com
Lines: 48
X-Authenticated-User: TeamSybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:6721
Article PK: 4966

The general topic is "Request Level Logging", and the particular
feature you want is probably this...

ASA SQL Reference

System Procedures and Functions

System and catalog stored procedures

sa_server_option system procedure

...

RequestFilterConn

Filter the request logging information so that only information for a
particular connection is logged. This can help reduce the size of the
request log file when monitoring a server with many active connections
or multiple databases. You can obtain the connection ID by executing
the following:

CALL sa_conn_info()To specify a specific connection to be logged once
you have obtained the connection ID, execute the following:

CALL sa_server_option( 'RequestFilterConn', connection-id )Filtering
remains in effect until it is explicitly reset, or until the database
server is shut down. To reset filtering, use the following statement:

CALL sa_server_option( 'RequestFilterConn', -1)

Breck

On 18 Feb 2008 02:10:10 -0800, ps <ps@.> wrote:

>Hi,
>I have checked the doc, but I cannot find a way to trace in a table or
>in a file all the sql statements issued by one specific user. Is there a
>way to do this on asa9? Is it possible to activate that behaviour
>dynamically ( without starting/stopping the db ) ?
>Thanks
>
>Philip

--
Breck Carter http://sqlanywhere.blogspot.com/

RisingRoad SQL Anywhere and MobiLink Professional Services
breck.carter@risingroad.com


ps <ps Posted on 2008-02-18 15:55:57.0Z
From: ps <ps@.>
User-Agent: Thunderbird 2.0.0.9 (Windows/20071031)
MIME-Version: 1.0
Newsgroups: ianywhere.public.general
Subject: Re: tracing sql issued by one user ? ( ASA 9.02)
References: <47b95982$1@forums-1-dub> <fs5jr35ubtn0d8dvs5njcrmaqtjnfb0dfs@4ax.com>
In-Reply-To: <fs5jr35ubtn0d8dvs5njcrmaqtjnfb0dfs@4ax.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <47b9aa8d$1@forums-1-dub>
Date: 18 Feb 2008 07:55:57 -0800
X-Trace: forums-1-dub 1203350157 10.22.241.152 (18 Feb 2008 07:55:57 -0800)
X-Original-Trace: 18 Feb 2008 07:55:57 -0800, vip152.sybase.com
Lines: 54
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:6722
Article PK: 4967

That's exactly what I needed.
Thanks a lot, Breck

Philip

Breck Carter [sqlanywhere.blogspot.com] wrote:
> The general topic is "Request Level Logging", and the particular
> feature you want is probably this...
>
> ASA SQL Reference
>
> System Procedures and Functions
>
> System and catalog stored procedures
>
> sa_server_option system procedure
>
> ...
>
> RequestFilterConn
>
> Filter the request logging information so that only information for a
> particular connection is logged. This can help reduce the size of the
> request log file when monitoring a server with many active connections
> or multiple databases. You can obtain the connection ID by executing
> the following:
>
> CALL sa_conn_info()To specify a specific connection to be logged once
> you have obtained the connection ID, execute the following:
>
> CALL sa_server_option( 'RequestFilterConn', connection-id )Filtering
> remains in effect until it is explicitly reset, or until the database
> server is shut down. To reset filtering, use the following statement:
>
> CALL sa_server_option( 'RequestFilterConn', -1)
>
> Breck
>
> On 18 Feb 2008 02:10:10 -0800, ps <ps@.> wrote:
>
>> Hi,
>> I have checked the doc, but I cannot find a way to trace in a table or
>> in a file all the sql statements issued by one specific user. Is there a
>> way to do this on asa9? Is it possible to activate that behaviour
>> dynamically ( without starting/stopping the db ) ?
>> Thanks
>>
>> Philip
>
> --
> Breck Carter http://sqlanywhere.blogspot.com/
>
> RisingRoad SQL Anywhere and MobiLink Professional Services
> breck.carter@risingroad.com