You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-user@db.apache.org by Pavel Bortnovskiy <pb...@jefferies.com> on 2012/06/05 16:30:55 UTC

SYSCS_DIAG.TRANSACTION_TABLE

Hello, all:

While trying to debug an anomaly within my app, I wanted to see all the active transactions within Derby (in-memory mode).
However, accessing SYSCS_DIAG.TRANSACTION_TABLE  table didn't prove very useful, as it is not possible to identify what statements those transactions execute, with the exception of one - the select from that table itself.

[cid:image001.png@01CD4306.49B6BD70]

Is there any other way to get more diag information?
Can I find the statements' text by XIDs elsewhere?

Thanks,
Pavel.
Jefferies archives and monitors outgoing and incoming e-mail. The contents of this email, including any attachments, are confidential to the ordinary user of the email address to which it was addressed. If you are not the addressee of this email you may not copy, forward, disclose or otherwise use it or any part of it in any form whatsoever. This email may be produced at the request of regulators or in connection with civil litigation. Jefferies accepts no liability for any errors or omissions arising as a result of transmission. Use by other than intended recipients is prohibited. In the United Kingdom, Jefferies operates as Jefferies International Limited; registered in England: no. 1978621; registered office: Vintners Place, 68 Upper Thames Street, London EC4V 3BJ. Jefferies International Limited is authorised and regulated by the Financial Services Authority.

RE: SYSCS_DIAG.TRANSACTION_TABLE

Posted by Pavel Bortnovskiy <pb...@jefferies.com>.
Excellent! Thank you, Rick for your prompt response.

-----Original Message-----
From: Rick Hillegas [mailto:rick.hillegas@oracle.com]
Sent: Tuesday, June 05, 2012 12:30 PM
To: derby-user@db.apache.org
Subject: Re: SYSCS_DIAG.TRANSACTION_TABLE

Hi Pavel,

Note that the SQL_TEXT column will be null for any transaction which is not currently executing a statement. If you turn on statement logging (-Dderby.language.logStatementText=true), then your statement text will be logged to derby.log. You can use the syscs_diag.error_log_reader() vti to see what statements were run in each transaction. So the following sequence of calls may give you a lot of useful information:

select * from syscs_diag.transaction_table;

select * from table (syscs_diag.error_log_reader()) as t1;

Hope this helps,
-Rick

On 6/5/12 7:30 AM, Pavel Bortnovskiy wrote:
>
> Hello, all:
>
> While trying to debug an anomaly within my app, I wanted to see all
> the active transactions within Derby (in-memory mode).
>
> However, accessing SYSCS_DIAG.TRANSACTION_TABLE table didn't prove
> very useful, as it is not possible to identify what statements those
> transactions execute, with the exception of one - the select from that
> table itself.
>
> Is there any other way to get more diag information?
>
> Can I find the statements' text by XIDs elsewhere?
>
> Thanks,
>
> Pavel.
>
>
>             Jefferies archives and monitors outgoing and incoming
>             e-mail. The contents of this email, including any
>             attachments, are confidential to the ordinary user of the
>             email address to which it was addressed. If you are not
>             the addressee of this email you may not copy, forward,
>             disclose or otherwise use it or any part of it in any form
>             whatsoever. This email may be produced at the request of
>             regulators or in connection with civil litigation.
>             Jefferies accepts no liability for any errors or omissions
>             arising as a result of transmission. Use by other than
>             intended recipients is prohibited. In the United Kingdom,
>             Jefferies operates as Jefferies International Limited;
>             registered in England: no. 1978621; registered office:
>             Vintners Place, 68 Upper Thames Street, London EC4V 3BJ.
>             Jefferies International Limited is authorised and
>             regulated by the Financial Services Authority.
>


Jefferies archives and monitors outgoing and incoming e-mail. The contents of this email, including any attachments, are confidential to the ordinary user of the email address to which it was addressed. If you are not the addressee of this email you may not copy, forward, disclose or otherwise use it or any part of it in any form whatsoever. This email may be produced at the request of regulators or in connection with civil litigation. Jefferies accepts no liability for any errors or omissions arising as a result of transmission. Use by other than intended recipients is prohibited. In the United Kingdom, Jefferies operates as Jefferies International Limited; registered in England: no. 1978621; registered office: Vintners Place, 68 Upper Thames Street, London EC4V 3BJ. Jefferies International Limited is authorised and regulated by the Financial Services Authority.

Re: SYSCS_DIAG.TRANSACTION_TABLE

Posted by Rick Hillegas <ri...@oracle.com>.
Hi Pavel,

Note that the SQL_TEXT column will be null for any transaction which is 
not currently executing a statement. If you turn on statement logging 
(-Dderby.language.logStatementText=true), then your statement text will 
be logged to derby.log. You can use the syscs_diag.error_log_reader() 
vti to see what statements were run in each transaction. So the 
following sequence of calls may give you a lot of useful information:

select * from syscs_diag.transaction_table;

select * from table (syscs_diag.error_log_reader()) as t1;

Hope this helps,
-Rick

On 6/5/12 7:30 AM, Pavel Bortnovskiy wrote:
>
> Hello, all:
>
> While trying to debug an anomaly within my app, I wanted to see all 
> the active transactions within Derby (in-memory mode).
>
> However, accessing SYSCS_DIAG.TRANSACTION_TABLE table didn’t prove 
> very useful, as it is not possible to identify what statements those 
> transactions execute, with the exception of one – the select from that 
> table itself.
>
> Is there any other way to get more diag information?
>
> Can I find the statements’ text by XIDs elsewhere?
>
> Thanks,
>
> Pavel.
>
>
>             Jefferies archives and monitors outgoing and incoming
>             e-mail. The contents of this email, including any
>             attachments, are confidential to the ordinary user of the
>             email address to which it was addressed. If you are not
>             the addressee of this email you may not copy, forward,
>             disclose or otherwise use it or any part of it in any form
>             whatsoever. This email may be produced at the request of
>             regulators or in connection with civil litigation.
>             Jefferies accepts no liability for any errors or omissions
>             arising as a result of transmission. Use by other than
>             intended recipients is prohibited. In the United Kingdom,
>             Jefferies operates as Jefferies International Limited;
>             registered in England: no. 1978621; registered office:
>             Vintners Place, 68 Upper Thames Street, London EC4V 3BJ.
>             Jefferies International Limited is authorised and
>             regulated by the Financial Services Authority.
>